403Webshell
Server IP : 18.193.92.211  /  Your IP : 216.73.216.128
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux ip-10-0-0-90 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/t357.darmas.de/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/t357.darmas.de/public_html/chunk-CQNY3EF2.js
import{c as dr,e as Cn}from"./chunk-TSRGIXR5.js";var Pn=Cn((cn,Tr)=>{(function(Rt){typeof cn=="object"&&typeof Tr<"u"?Tr.exports=Rt():typeof define=="function"&&define.amd?define([],Rt):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).p5=Rt()})(function(){var Rt,An,Ln;return(function t(W,C,p){function m(g,y){if(!C[g]){if(!W[g]){var o=typeof dr=="function"&&dr;if(!y&&o)return o(g,!0);if(u)return u(g,!0);throw(y=new Error("Cannot find module '"+g+"'")).code="MODULE_NOT_FOUND",y}o=C[g]={exports:{}},W[g][0].call(o.exports,function(a){return m(W[g][1][a]||a)},o,o.exports,t,W,C,p)}return C[g].exports}for(var u=typeof dr=="function"&&dr,f=0;f<p.length;f++)m(p[f]);return m})({1:[function(t,W,C){"use strict";C.byteLength=function(i){var i=o(i),r=i[0],i=i[1];return 3*(r+i)/4-i},C.toByteArray=function(a){var r,i,n=o(a),s=n[0],n=n[1],l=new u((function(v,S){return 3*(v+S)/4-S})(s,n)),c=0,d=0<n?s-4:s;for(i=0;i<d;i+=4)r=m[a.charCodeAt(i)]<<18|m[a.charCodeAt(i+1)]<<12|m[a.charCodeAt(i+2)]<<6|m[a.charCodeAt(i+3)],l[c++]=r>>16&255,l[c++]=r>>8&255,l[c++]=255&r;return n===2&&(r=m[a.charCodeAt(i)]<<2|m[a.charCodeAt(i+1)]>>4,l[c++]=255&r),n===1&&(r=m[a.charCodeAt(i)]<<10|m[a.charCodeAt(i+1)]<<4|m[a.charCodeAt(i+2)]>>2,l[c++]=r>>8&255,l[c++]=255&r),l},C.fromByteArray=function(a){for(var r,i=a.length,s=i%3,n=[],l=0,c=i-s;l<c;l+=16383)n.push((function(d,v,S){for(var E,_=[],x=v;x<S;x+=3)E=(d[x]<<16&16711680)+(d[x+1]<<8&65280)+(255&d[x+2]),_.push((function(O){return p[O>>18&63]+p[O>>12&63]+p[O>>6&63]+p[63&O]})(E));return _.join("")})(a,l,c<l+16383?c:l+16383));return s==1?(r=a[i-1],n.push(p[r>>2]+p[r<<4&63]+"==")):s==2&&(r=(a[i-2]<<8)+a[i-1],n.push(p[r>>10]+p[r>>4&63]+p[r<<2&63]+"=")),n.join("")};for(var p=[],m=[],u=typeof Uint8Array<"u"?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,y=f.length;g<y;++g)p[g]=f[g],m[f.charCodeAt(g)]=g;function o(a){var r=a.length;if(0<r%4)throw new Error("Invalid string. Length must be a multiple of 4");return a=a.indexOf("="),r=(a=a===-1?r:a)===r?0:4-a%4,[a,r]}m[45]=62,m[95]=63},{}],2:[function(t,W,C){},{}],3:[function(t,W,C){},{}],4:[function(t,W,C){(function(o){"use strict";var m=t("base64-js"),u=t("ieee754"),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null,g=(C.Buffer=o,C.SlowBuffer=function(L){return+L!=L&&(L=0),o.alloc(+L)},C.INSPECT_MAX_BYTES=50,2147483647);function y(L){if(g<L)throw new RangeError('The value "'+L+'" is invalid for option "size"');return L=new Uint8Array(L),Object.setPrototypeOf(L,o.prototype),L}function o(L,j,R){if(typeof L!="number")return a(L,j,R);if(typeof j=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(L)}function a(L,j,R){if(typeof L=="string"){var N=L,X=j;if(o.isEncoding(X=typeof X=="string"&&X!==""?X:"utf8"))return K=0|l(N,X),re=y(K),re=(N=re.write(N,X))!==K?re.slice(0,N):re;throw new TypeError("Unknown encoding: "+X)}if(ArrayBuffer.isView(L))return s(L);if(L!=null){if(H(L,ArrayBuffer)||L&&H(L.buffer,ArrayBuffer)){var K=L,N=j,re=R;if(N<0||K.byteLength<N)throw new RangeError('"offset" is outside of buffer bounds');if(K.byteLength<N+(re||0))throw new RangeError('"length" is outside of buffer bounds');return K=N===void 0&&re===void 0?new Uint8Array(K):re===void 0?new Uint8Array(K,N):new Uint8Array(K,N,re),Object.setPrototypeOf(K,o.prototype),K}if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');if(X=L.valueOf&&L.valueOf(),X!=null&&X!==L)return o.from(X,j,R);var ie=(function(ee){{var ae,ue;if(o.isBuffer(ee))return ae=0|n(ee.length),(ue=y(ae)).length!==0&&ee.copy(ue,0,0,ae),ue}if(ee.length!==void 0)return typeof ee.length!="number"||Y(ee.length)?y(0):s(ee);if(ee.type==="Buffer"&&Array.isArray(ee.data))return s(ee.data)})(L);if(ie)return ie;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return o.from(L[Symbol.toPrimitive]("string"),j,R)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}function r(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function i(L){return r(L),y(L<0?0:0|n(L))}function s(L){for(var j=L.length<0?0:0|n(L.length),R=y(j),N=0;N<j;N+=1)R[N]=255&L[N];return R}function n(L){if(g<=L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return 0|L}function l(L,j){if(o.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||H(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var R=L.length,N=2<arguments.length&&arguments[2]===!0;if(!N&&R===0)return 0;for(var X=!1;;)switch(j){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return z(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*R;case"hex":return R>>>1;case"base64":return G(L).length;default:if(X)return N?-1:z(L).length;j=(""+j).toLowerCase(),X=!0}}function c(L,j,R){var N,X=!1;if((j=j===void 0||j<0?0:j)>this.length||(R=R===void 0||R>this.length?this.length:R)<=0||(R>>>=0)<=(j>>>=0))return"";for(L=L||"utf8";;)switch(L){case"hex":var K=this,he=j,re=R,ue=K.length;(!re||re<0||ue<re)&&(re=ue);for(var ie="",ee=he=!he||he<0?0:he;ee<re;++ee)ie+=oe[K[ee]];return ie;case"utf8":case"utf-8":return x(this,j,R);case"ascii":var ae=this,ue=j,Q=R,le="";Q=Math.min(ae.length,Q);for(var fe=ue;fe<Q;++fe)le+=String.fromCharCode(127&ae[fe]);return le;case"latin1":case"binary":var ve=this,he=j,me=R,_e="";me=Math.min(ve.length,me);for(var Ae=he;Ae<me;++Ae)_e+=String.fromCharCode(ve[Ae]);return _e;case"base64":return Se=this,N=R,(Ge=j)===0&&N===Se.length?m.fromByteArray(Se):m.fromByteArray(Se.slice(Ge,N));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var Se=j,Ge=R,Ne=this.slice(Se,Ge),Be="",He=0;He<Ne.length;He+=2)Be+=String.fromCharCode(Ne[He]+256*Ne[He+1]);return Be;default:if(X)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),X=!0}}function d(L,j,R){var N=L[j];L[j]=L[R],L[R]=N}function v(L,j,R,N,X){if(L.length===0)return-1;if(typeof R=="string"?(N=R,R=0):2147483647<R?R=2147483647:R<-2147483648&&(R=-2147483648),(R=(R=Y(R=+R)?X?0:L.length-1:R)<0?L.length+R:R)>=L.length){if(X)return-1;R=L.length-1}else if(R<0){if(!X)return-1;R=0}if(typeof j=="string"&&(j=o.from(j,N)),o.isBuffer(j))return j.length===0?-1:S(L,j,R,N,X);if(typeof j=="number")return j&=255,typeof Uint8Array.prototype.indexOf=="function"?(X?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(L,j,R):S(L,[j],R,N,X);throw new TypeError("val must be string, number or Buffer")}function S(L,j,R,N,X){var K=1,re=L.length,ie=j.length;if(N!==void 0&&((N=String(N).toLowerCase())==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(L.length<2||j.length<2)return-1;re/=K=2,ie/=2,R/=2}function ee(fe,ve){return K===1?fe[ve]:fe.readUInt16BE(ve*K)}if(X)for(var ae=-1,ue=R;ue<re;ue++)if(ee(L,ue)===ee(j,ae===-1?0:ue-ae)){if(ue-(ae=ae===-1?ue:ae)+1===ie)return ae*K}else ae!==-1&&(ue-=ue-ae),ae=-1;else for(ue=R=re<R+ie?re-ie:R;0<=ue;ue--){for(var Q=!0,le=0;le<ie;le++)if(ee(L,ue+le)!==ee(j,le)){Q=!1;break}if(Q)return ue}return-1}function E(L,j,R,N){return U((function(X){for(var K=[],re=0;re<X.length;++re)K.push(255&X.charCodeAt(re));return K})(j),L,R,N)}function _(L,j,R,N){return U((function(X,K){for(var re,ie,ee=[],ae=0;ae<X.length&&!((K-=2)<0);++ae)ie=X.charCodeAt(ae),re=ie>>8,ie=ie%256,ee.push(ie),ee.push(re);return ee})(j,L.length-R),L,R,N)}function x(L,j,R){R=Math.min(L.length,R);for(var N=[],X=j;X<R;){var K,re,ie,ee,ae=L[X],ue=null,Q=239<ae?4:223<ae?3:191<ae?2:1;if(X+Q<=R)switch(Q){case 1:ae<128&&(ue=ae);break;case 2:(192&(K=L[X+1]))==128&&127<(ee=(31&ae)<<6|63&K)&&(ue=ee);break;case 3:K=L[X+1],re=L[X+2],(192&K)==128&&(192&re)==128&&2047<(ee=(15&ae)<<12|(63&K)<<6|63&re)&&(ee<55296||57343<ee)&&(ue=ee);break;case 4:K=L[X+1],re=L[X+2],ie=L[X+3],(192&K)==128&&(192&re)==128&&(192&ie)==128&&65535<(ee=(15&ae)<<18|(63&K)<<12|(63&re)<<6|63&ie)&&ee<1114112&&(ue=ee)}ue===null?(ue=65533,Q=1):65535<ue&&(ue-=65536,N.push(ue>>>10&1023|55296),ue=56320|1023&ue),N.push(ue),X+=Q}var le=N,fe=le.length;if(fe<=O)return String.fromCharCode.apply(String,le);for(var ve="",he=0;he<fe;)ve+=String.fromCharCode.apply(String,le.slice(he,he+=O));return ve}C.kMaxLength=g,(o.TYPED_ARRAY_SUPPORT=(function(){try{var L=new Uint8Array(1),j={foo:function(){return 42}};return Object.setPrototypeOf(j,Uint8Array.prototype),Object.setPrototypeOf(L,j),L.foo()===42}catch{return!1}})())||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=a,Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(L,j,R){return j=j,R=R,r(L=L),!(L<=0)&&j!==void 0?typeof R=="string"?y(L).fill(j,R):y(L).fill(j):y(L)},o.allocUnsafe=i,o.allocUnsafeSlow=i,o.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==o.prototype},o.compare=function(L,j){if(H(L,Uint8Array)&&(L=o.from(L,L.offset,L.byteLength)),H(j,Uint8Array)&&(j=o.from(j,j.offset,j.byteLength)),!o.isBuffer(L)||!o.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===j)return 0;for(var R=L.length,N=j.length,X=0,K=Math.min(R,N);X<K;++X)if(L[X]!==j[X]){R=L[X],N=j[X];break}return R<N?-1:N<R?1:0},o.isEncoding=function(L){switch(String(L).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(L,j){if(!Array.isArray(L))throw new TypeError('"list" argument must be an Array of Buffers');if(L.length===0)return o.alloc(0);if(j===void 0)for(X=j=0;X<L.length;++X)j+=L[X].length;for(var R=o.allocUnsafe(j),N=0,X=0;X<L.length;++X){var K=L[X];if(H(K,Uint8Array)&&(K=o.from(K)),!o.isBuffer(K))throw new TypeError('"list" argument must be an Array of Buffers');K.copy(R,N),N+=K.length}return R},o.byteLength=l,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var L=this.length;if(L%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var j=0;j<L;j+=2)d(this,j,j+1);return this},o.prototype.swap32=function(){var L=this.length;if(L%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var j=0;j<L;j+=4)d(this,j,j+3),d(this,j+1,j+2);return this},o.prototype.swap64=function(){var L=this.length;if(L%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var j=0;j<L;j+=8)d(this,j,j+7),d(this,j+1,j+6),d(this,j+2,j+5),d(this,j+3,j+4);return this},o.prototype.toLocaleString=o.prototype.toString=function(){var L=this.length;return L===0?"":arguments.length===0?x(this,0,L):c.apply(this,arguments)},o.prototype.equals=function(L){if(o.isBuffer(L))return this===L||o.compare(this,L)===0;throw new TypeError("Argument must be a Buffer")},o.prototype.inspect=function(){var j="",L=C.INSPECT_MAX_BYTES,j=this.toString("hex",0,L).replace(/(.{2})/g,"$1 ").trim();return this.length>L&&(j+=" ... "),"<Buffer "+j+">"},f&&(o.prototype[f]=o.prototype.inspect),o.prototype.compare=function(L,j,R,N,X){if(H(L,Uint8Array)&&(L=o.from(L,L.offset,L.byteLength)),!o.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(R===void 0&&(R=L?L.length:0),N===void 0&&(N=0),X===void 0&&(X=this.length),(j=j===void 0?0:j)<0||R>L.length||N<0||X>this.length)throw new RangeError("out of range index");if(X<=N&&R<=j)return 0;if(X<=N)return-1;if(R<=j)return 1;if(this===L)return 0;for(var K=(X>>>=0)-(N>>>=0),re=(R>>>=0)-(j>>>=0),ie=Math.min(K,re),ee=this.slice(N,X),ae=L.slice(j,R),ue=0;ue<ie;++ue)if(ee[ue]!==ae[ue]){K=ee[ue],re=ae[ue];break}return K<re?-1:re<K?1:0},o.prototype.includes=function(L,j,R){return this.indexOf(L,j,R)!==-1},o.prototype.indexOf=function(L,j,R){return v(this,L,j,R,!0)},o.prototype.lastIndexOf=function(L,j,R){return v(this,L,j,R,!1)},o.prototype.write=function(L,j,R,N){if(j===void 0)N="utf8",R=this.length,j=0;else if(R===void 0&&typeof j=="string")N=j,R=this.length,j=0;else{if(!isFinite(j))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");j>>>=0,isFinite(R)?(R>>>=0,N===void 0&&(N="utf8")):(N=R,R=void 0)}var X=this.length-j;if((R===void 0||X<R)&&(R=X),0<L.length&&(R<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");N=N||"utf8";for(var K,re,ie,ee=!1;;)switch(N){case"hex":var ae=this,ue=L,Q=j,le=R,fe=(Q=Number(Q)||0,ae.length-Q);(!le||fe<(le=Number(le)))&&(le=fe),(fe=ue.length)/2<le&&(le=fe/2);for(var ve=0;ve<le;++ve){var he=parseInt(ue.substr(2*ve,2),16);if(Y(he))return ve;ae[Q+ve]=he}return ve;case"utf8":case"utf-8":return fe=j,ie=R,U(z(L,(re=this).length-fe),re,fe,ie);case"ascii":return E(this,L,j,R);case"latin1":case"binary":return E(this,L,j,R);case"base64":return re=this,ie=j,K=R,U(G(L),re,ie,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,L,j,R);default:if(ee)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),ee=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function T(L,j,R){if(L%1!=0||L<0)throw new RangeError("offset is not uint");if(R<L+j)throw new RangeError("Trying to access beyond buffer length")}function P(L,j,R,N,X,K){if(!o.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(X<j||j<K)throw new RangeError('"value" argument is out of bounds');if(R+N>L.length)throw new RangeError("Index out of range")}function M(L,j,R,N){if(R+N>L.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function F(L,j,R,N,X){return j=+j,R>>>=0,X||M(L,0,R,4),u.write(L,j,R,N,23,4),R+4}function D(L,j,R,N,X){return j=+j,R>>>=0,X||M(L,0,R,8),u.write(L,j,R,N,52,8),R+8}o.prototype.slice=function(L,j){var R=this.length,R=((L=~~L)<0?(L+=R)<0&&(L=0):R<L&&(L=R),(j=j===void 0?R:~~j)<0?(j+=R)<0&&(j=0):R<j&&(j=R),j<L&&(j=L),this.subarray(L,j));return Object.setPrototypeOf(R,o.prototype),R},o.prototype.readUIntLE=function(L,j,R){L>>>=0,j>>>=0,R||T(L,j,this.length);for(var N=this[L],X=1,K=0;++K<j&&(X*=256);)N+=this[L+K]*X;return N},o.prototype.readUIntBE=function(L,j,R){L>>>=0,j>>>=0,R||T(L,j,this.length);for(var N=this[L+--j],X=1;0<j&&(X*=256);)N+=this[L+--j]*X;return N},o.prototype.readUInt8=function(L,j){return L>>>=0,j||T(L,1,this.length),this[L]},o.prototype.readUInt16LE=function(L,j){return L>>>=0,j||T(L,2,this.length),this[L]|this[L+1]<<8},o.prototype.readUInt16BE=function(L,j){return L>>>=0,j||T(L,2,this.length),this[L]<<8|this[L+1]},o.prototype.readUInt32LE=function(L,j){return L>>>=0,j||T(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+16777216*this[L+3]},o.prototype.readUInt32BE=function(L,j){return L>>>=0,j||T(L,4,this.length),16777216*this[L]+(this[L+1]<<16|this[L+2]<<8|this[L+3])},o.prototype.readIntLE=function(L,j,R){L>>>=0,j>>>=0,R||T(L,j,this.length);for(var N=this[L],X=1,K=0;++K<j&&(X*=256);)N+=this[L+K]*X;return(X*=128)<=N&&(N-=Math.pow(2,8*j)),N},o.prototype.readIntBE=function(L,j,R){L>>>=0,j>>>=0,R||T(L,j,this.length);for(var N=j,X=1,K=this[L+--N];0<N&&(X*=256);)K+=this[L+--N]*X;return(X*=128)<=K&&(K-=Math.pow(2,8*j)),K},o.prototype.readInt8=function(L,j){return L>>>=0,j||T(L,1,this.length),128&this[L]?-1*(255-this[L]+1):this[L]},o.prototype.readInt16LE=function(L,j){return L>>>=0,j||T(L,2,this.length),j=this[L]|this[L+1]<<8,32768&j?4294901760|j:j},o.prototype.readInt16BE=function(L,j){return L>>>=0,j||T(L,2,this.length),j=this[L+1]|this[L]<<8,32768&j?4294901760|j:j},o.prototype.readInt32LE=function(L,j){return L>>>=0,j||T(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},o.prototype.readInt32BE=function(L,j){return L>>>=0,j||T(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},o.prototype.readFloatLE=function(L,j){return L>>>=0,j||T(L,4,this.length),u.read(this,L,!0,23,4)},o.prototype.readFloatBE=function(L,j){return L>>>=0,j||T(L,4,this.length),u.read(this,L,!1,23,4)},o.prototype.readDoubleLE=function(L,j){return L>>>=0,j||T(L,8,this.length),u.read(this,L,!0,52,8)},o.prototype.readDoubleBE=function(L,j){return L>>>=0,j||T(L,8,this.length),u.read(this,L,!1,52,8)},o.prototype.writeUIntLE=function(L,j,R,N){L=+L,j>>>=0,R>>>=0,N||P(this,L,j,R,Math.pow(2,8*R)-1,0);var X=1,K=0;for(this[j]=255&L;++K<R&&(X*=256);)this[j+K]=L/X&255;return j+R},o.prototype.writeUIntBE=function(L,j,R,N){L=+L,j>>>=0,R>>>=0,N||P(this,L,j,R,Math.pow(2,8*R)-1,0);var X=R-1,K=1;for(this[j+X]=255&L;0<=--X&&(K*=256);)this[j+X]=L/K&255;return j+R},o.prototype.writeUInt8=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,1,255,0),this[j]=255&L,j+1},o.prototype.writeUInt16LE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,2,65535,0),this[j]=255&L,this[j+1]=L>>>8,j+2},o.prototype.writeUInt16BE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,2,65535,0),this[j]=L>>>8,this[j+1]=255&L,j+2},o.prototype.writeUInt32LE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,4,4294967295,0),this[j+3]=L>>>24,this[j+2]=L>>>16,this[j+1]=L>>>8,this[j]=255&L,j+4},o.prototype.writeUInt32BE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,4,4294967295,0),this[j]=L>>>24,this[j+1]=L>>>16,this[j+2]=L>>>8,this[j+3]=255&L,j+4},o.prototype.writeIntLE=function(L,j,R,N){L=+L,j>>>=0,N||P(this,L,j,R,(N=Math.pow(2,8*R-1))-1,-N);var X=0,K=1,re=0;for(this[j]=255&L;++X<R&&(K*=256);)L<0&&re===0&&this[j+X-1]!==0&&(re=1),this[j+X]=(L/K>>0)-re&255;return j+R},o.prototype.writeIntBE=function(L,j,R,N){L=+L,j>>>=0,N||P(this,L,j,R,(N=Math.pow(2,8*R-1))-1,-N);var X=R-1,K=1,re=0;for(this[j+X]=255&L;0<=--X&&(K*=256);)L<0&&re===0&&this[j+X+1]!==0&&(re=1),this[j+X]=(L/K>>0)-re&255;return j+R},o.prototype.writeInt8=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,1,127,-128),this[j]=255&(L=L<0?255+L+1:L),j+1},o.prototype.writeInt16LE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,2,32767,-32768),this[j]=255&L,this[j+1]=L>>>8,j+2},o.prototype.writeInt16BE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,2,32767,-32768),this[j]=L>>>8,this[j+1]=255&L,j+2},o.prototype.writeInt32LE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,4,2147483647,-2147483648),this[j]=255&L,this[j+1]=L>>>8,this[j+2]=L>>>16,this[j+3]=L>>>24,j+4},o.prototype.writeInt32BE=function(L,j,R){return L=+L,j>>>=0,R||P(this,L,j,4,2147483647,-2147483648),this[j]=(L=L<0?4294967295+L+1:L)>>>24,this[j+1]=L>>>16,this[j+2]=L>>>8,this[j+3]=255&L,j+4},o.prototype.writeFloatLE=function(L,j,R){return F(this,L,j,!0,R)},o.prototype.writeFloatBE=function(L,j,R){return F(this,L,j,!1,R)},o.prototype.writeDoubleLE=function(L,j,R){return D(this,L,j,!0,R)},o.prototype.writeDoubleBE=function(L,j,R){return D(this,L,j,!1,R)},o.prototype.copy=function(L,j,R,N){if(!o.isBuffer(L))throw new TypeError("argument should be a Buffer");if(R=R||0,N||N===0||(N=this.length),j>=L.length&&(j=L.length),(N=0<N&&N<R?R:N)===R||L.length===0||this.length===0)return 0;if((j=j||0)<0)throw new RangeError("targetStart out of bounds");if(R<0||R>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length);var X=(N=L.length-j<N-R?L.length-j+R:N)-R;if(this===L&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(j,R,N);else if(this===L&&R<j&&j<N)for(var K=X-1;0<=K;--K)L[K+j]=this[K+R];else Uint8Array.prototype.set.call(L,this.subarray(R,N),j);return X},o.prototype.fill=function(L,j,R,N){if(typeof L=="string"){if(typeof j=="string"?(N=j,j=0,R=this.length):typeof R=="string"&&(N=R,R=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!o.isEncoding(N))throw new TypeError("Unknown encoding: "+N);var X;L.length===1&&(X=L.charCodeAt(0),(N==="utf8"&&X<128||N==="latin1")&&(L=X))}else typeof L=="number"?L&=255:typeof L=="boolean"&&(L=Number(L));if(j<0||this.length<j||this.length<R)throw new RangeError("Out of range index");var K;if(!(R<=j))if(j>>>=0,R=R===void 0?this.length:R>>>0,typeof(L=L||0)=="number")for(K=j;K<R;++K)this[K]=L;else{var re=o.isBuffer(L)?L:o.from(L,N),ie=re.length;if(ie===0)throw new TypeError('The value "'+L+'" is invalid for argument "value"');for(K=0;K<R-j;++K)this[K+j]=re[K%ie]}return this};var A=/[^+/0-9A-Za-z-_]/g;function z(L,j){j=j||1/0;for(var R,N=L.length,X=null,K=[],re=0;re<N;++re){if(55295<(R=L.charCodeAt(re))&&R<57344){if(!X){if(56319<R){-1<(j-=3)&&K.push(239,191,189);continue}if(re+1===N){-1<(j-=3)&&K.push(239,191,189);continue}X=R;continue}if(R<56320){-1<(j-=3)&&K.push(239,191,189),X=R;continue}R=65536+(X-55296<<10|R-56320)}else X&&-1<(j-=3)&&K.push(239,191,189);if(X=null,R<128){if(--j<0)break;K.push(R)}else if(R<2048){if((j-=2)<0)break;K.push(R>>6|192,63&R|128)}else if(R<65536){if((j-=3)<0)break;K.push(R>>12|224,R>>6&63|128,63&R|128)}else{if(!(R<1114112))throw new Error("Invalid code point");if((j-=4)<0)break;K.push(R>>18|240,R>>12&63|128,R>>6&63|128,63&R|128)}}return K}function G(L){return m.toByteArray((function(j){if((j=(j=j.split("=")[0]).trim().replace(A,"")).length<2)return"";for(;j.length%4!=0;)j+="=";return j})(L))}function U(L,j,R,N){for(var X=0;X<N&&!(X+R>=j.length||X>=L.length);++X)j[X+R]=L[X];return X}function H(L,j){return L instanceof j||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===j.name}function Y(L){return L!=L}var oe=(function(){for(var L="0123456789abcdef",j=new Array(256),R=0;R<16;++R)for(var N=16*R,X=0;X<16;++X)j[N+X]=L[R]+L[X];return j})()}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:4,ieee754:254}],5:[function(t,W,C){W.exports=function(p){if(typeof p!="function")throw TypeError(String(p)+" is not a function");return p}},{}],6:[function(t,W,C){var p=t("../internals/is-object");W.exports=function(m){if(p(m)||m===null)return m;throw TypeError("Can't set "+String(m)+" as a prototype")}},{"../internals/is-object":75}],7:[function(u,W,C){var p=u("../internals/well-known-symbol"),m=u("../internals/object-create"),u=u("../internals/object-define-property"),f=p("unscopables"),g=Array.prototype;g[f]==null&&u.f(g,f,{configurable:!0,value:m(null)}),W.exports=function(y){g[f][y]=!0}},{"../internals/object-create":91,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],8:[function(t,W,C){"use strict";var p=t("../internals/string-multibyte").charAt;W.exports=function(m,u,f){return u+(f?p(m,u).length:1)}},{"../internals/string-multibyte":125}],9:[function(t,W,C){W.exports=function(p,m,u){if(p instanceof m)return p;throw TypeError("Incorrect "+(u?u+" ":"")+"invocation")}},{}],10:[function(t,W,C){var p=t("../internals/is-object");W.exports=function(m){if(p(m))return m;throw TypeError(String(m)+" is not an object")}},{"../internals/is-object":75}],11:[function(t,W,C){W.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},{}],12:[function(M,W,C){"use strict";function p(D){return y(D)&&o(F,a(D))}var m,u=M("../internals/array-buffer-native"),f=M("../internals/descriptors"),g=M("../internals/global"),y=M("../internals/is-object"),o=M("../internals/has"),a=M("../internals/classof"),r=M("../internals/create-non-enumerable-property"),i=M("../internals/redefine"),s=M("../internals/object-define-property").f,n=M("../internals/object-get-prototype-of"),l=M("../internals/object-set-prototype-of"),O=M("../internals/well-known-symbol"),M=M("../internals/uid"),c=g.Int8Array,d=c&&c.prototype,v=g.Uint8ClampedArray,v=v&&v.prototype,S=c&&n(c),E=d&&n(d),_=Object.prototype,x=_.isPrototypeOf,O=O("toStringTag"),T=M("TYPED_ARRAY_TAG"),P=u&&!!l&&a(g.opera)!=="Opera",M=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};for(m in F)g[m]||(P=!1);if((!P||typeof S!="function"||S===Function.prototype)&&(S=function(){throw TypeError("Incorrect invocation")},P))for(m in F)g[m]&&l(g[m],S);if((!P||!E||E===_)&&(E=S.prototype,P))for(m in F)g[m]&&l(g[m].prototype,E);if(P&&n(v)!==E&&l(v,E),f&&!o(E,O))for(m in M=!0,s(E,O,{get:function(){return y(this)?this[T]:void 0}}),F)g[m]&&r(g[m],T,m);W.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:M&&T,aTypedArray:function(D){if(p(D))return D;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(D){if(l){if(x.call(S,D))return D}else for(var A in F)if(o(F,m)&&(A=g[A],A&&(D===A||x.call(A,D))))return D;throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(D,A,z){if(f){if(z)for(var G in F)G=g[G],G&&o(G.prototype,D)&&delete G.prototype[D];E[D]&&!z||i(E,D,!z&&P&&d[D]||A)}},exportTypedArrayStaticMethod:function(D,A,z){var G,U;if(f){if(l){if(z)for(G in F)(U=g[G])&&o(U,D)&&delete U[D];if(S[D]&&!z)return;try{return i(S,D,!z&&P&&c[D]||A)}catch{}}for(G in F)!(U=g[G])||U[D]&&!z||i(U,D,A)}},isView:function(D){return D=a(D),D==="DataView"||o(F,D)},isTypedArray:p,TypedArray:S,TypedArrayPrototype:E}},{"../internals/array-buffer-native":11,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/global":60,"../internals/has":61,"../internals/is-object":75,"../internals/object-define-property":93,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/uid":147,"../internals/well-known-symbol":150}],13:[function(R,W,C){"use strict";function p(Q){return[255&Q]}function m(Q){return[255&Q,Q>>8&255]}function u(Q){return[255&Q,Q>>8&255,Q>>16&255,Q>>24&255]}function f(Q){return Q[3]<<24|Q[2]<<16|Q[1]<<8|Q[0]}function g(Q){return K(Q,23,4)}function y(Q){return K(Q,52,8)}function o(Q,le){M(Q[H],le,{get:function(){return A(this)[le]}})}function a(_e,le,me,ve){if(me=_(me),_e=A(_e),me+le>_e.byteLength)throw X(Y);var he=A(_e.buffer).bytes,me=me+_e.byteOffset,_e=he.slice(me,me+le);return ve?_e:_e.reverse()}function r(Q,le,fe,ve,he,me){if(fe=_(fe),Q=A(Q),fe+le>Q.byteLength)throw X(Y);for(var _e=A(Q.buffer).bytes,Ae=fe+Q.byteOffset,Se=ve(+he),Ge=0;Ge<le;Ge++)_e[Ae+Ge]=Se[me?Ge:le-Ge-1]}var i=R("../internals/global"),s=R("../internals/descriptors"),n=R("../internals/array-buffer-native"),l=R("../internals/create-non-enumerable-property"),c=R("../internals/redefine-all"),d=R("../internals/fails"),v=R("../internals/an-instance"),S=R("../internals/to-integer"),E=R("../internals/to-length"),_=R("../internals/to-index"),x=R("../internals/ieee754"),O=R("../internals/object-get-prototype-of"),T=R("../internals/object-set-prototype-of"),P=R("../internals/object-get-own-property-names").f,M=R("../internals/object-define-property").f,F=R("../internals/array-fill"),D=R("../internals/set-to-string-tag"),R=R("../internals/internal-state"),A=R.get,z=R.set,G="ArrayBuffer",U="DataView",H="prototype",Y="Wrong index",oe=i[G],L=oe,j=i[U],R=j&&j[H],N=Object.prototype,X=i.RangeError,K=x.pack,re=x.unpack;if(n){if(!d(function(){oe(1)})||!d(function(){new oe(-1)})||d(function(){return new oe,new oe(1.5),new oe(NaN),oe.name!=G})){for(var ie,i=(L=function(fe){return v(this,L),new oe(_(fe))})[H]=oe[H],ee=P(oe),ae=0;ee.length>ae;)(ie=ee[ae++])in L||l(L,ie,oe[ie]);i.constructor=L}T&&O(R)!==N&&T(R,N);var x=new j(new L(2)),ue=R.setInt8;x.setInt8(0,2147483648),x.setInt8(1,2147483649),!x.getInt8(0)&&x.getInt8(1)||c(R,{setInt8:function(le,fe){ue.call(this,le,fe<<24>>24)},setUint8:function(le,fe){ue.call(this,le,fe<<24>>24)}},{unsafe:!0})}else L=function(Q){v(this,L,G),Q=_(Q),z(this,{bytes:F.call(new Array(Q),0),byteLength:Q}),s||(this.byteLength=Q)},j=function(Q,he,fe){v(this,j,U),v(Q,L,U);var ve=A(Q).byteLength,he=S(he);if(he<0||ve<he)throw X("Wrong offset");if(ve<he+(fe=fe===void 0?ve-he:E(fe)))throw X("Wrong length");z(this,{buffer:Q,byteLength:fe,byteOffset:he}),s||(this.buffer=Q,this.byteLength=fe,this.byteOffset=he)},s&&(o(L,"byteLength"),o(j,"buffer"),o(j,"byteLength"),o(j,"byteOffset")),c(j[H],{getInt8:function(Q){return a(this,1,Q)[0]<<24>>24},getUint8:function(Q){return a(this,1,Q)[0]},getInt16:function(Q){return Q=a(this,2,Q,1<arguments.length?arguments[1]:void 0),(Q[1]<<8|Q[0])<<16>>16},getUint16:function(Q){return Q=a(this,2,Q,1<arguments.length?arguments[1]:void 0),Q[1]<<8|Q[0]},getInt32:function(Q){return f(a(this,4,Q,1<arguments.length?arguments[1]:void 0))},getUint32:function(Q){return f(a(this,4,Q,1<arguments.length?arguments[1]:void 0))>>>0},getFloat32:function(Q){return re(a(this,4,Q,1<arguments.length?arguments[1]:void 0),23)},getFloat64:function(Q){return re(a(this,8,Q,1<arguments.length?arguments[1]:void 0),52)},setInt8:function(Q,le){r(this,1,Q,p,le)},setUint8:function(Q,le){r(this,1,Q,p,le)},setInt16:function(Q,le){r(this,2,Q,m,le,2<arguments.length?arguments[2]:void 0)},setUint16:function(Q,le){r(this,2,Q,m,le,2<arguments.length?arguments[2]:void 0)},setInt32:function(Q,le){r(this,4,Q,u,le,2<arguments.length?arguments[2]:void 0)},setUint32:function(Q,le){r(this,4,Q,u,le,2<arguments.length?arguments[2]:void 0)},setFloat32:function(Q,le){r(this,4,Q,g,le,2<arguments.length?arguments[2]:void 0)},setFloat64:function(Q,le){r(this,8,Q,y,le,2<arguments.length?arguments[2]:void 0)}});D(L,G),D(j,U),W.exports={ArrayBuffer:L,DataView:j}},{"../internals/an-instance":9,"../internals/array-buffer-native":11,"../internals/array-fill":15,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/ieee754":66,"../internals/internal-state":71,"../internals/object-define-property":93,"../internals/object-get-own-property-names":96,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine-all":109,"../internals/set-to-string-tag":119,"../internals/to-index":135,"../internals/to-integer":137,"../internals/to-length":138}],14:[function(t,W,C){"use strict";var p=t("../internals/to-object"),m=t("../internals/to-absolute-index"),u=t("../internals/to-length"),f=Math.min;W.exports=[].copyWithin||function(s,y){var o=p(this),a=u(o.length),r=m(s,a),i=m(y,a),s=2<arguments.length?arguments[2]:void 0,n=f((s===void 0?a:m(s,a))-i,a-r),l=1;for(i<r&&r<i+n&&(l=-1,i+=n-1,r+=n-1);0<n--;)i in o?o[r]=o[i]:delete o[r],r+=l,i+=l;return o}},{"../internals/to-absolute-index":134,"../internals/to-length":138,"../internals/to-object":139}],15:[function(t,W,C){"use strict";var p=t("../internals/to-object"),m=t("../internals/to-absolute-index"),u=t("../internals/to-length");W.exports=function(f){for(var g=p(this),y=u(g.length),a=arguments.length,o=m(1<a?arguments[1]:void 0,y),a=2<a?arguments[2]:void 0,r=a===void 0?y:m(a,y);o<r;)g[o++]=f;return g}},{"../internals/to-absolute-index":134,"../internals/to-length":138,"../internals/to-object":139}],16:[function(u,W,C){"use strict";var p=u("../internals/array-iteration").forEach,m=u("../internals/array-method-is-strict"),u=u("../internals/array-method-uses-to-length"),m=m("forEach"),u=u("forEach");W.exports=m&&u?[].forEach:function(f){return p(this,f,1<arguments.length?arguments[1]:void 0)}},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23}],17:[function(t,W,C){"use strict";var p=t("../internals/function-bind-context"),m=t("../internals/to-object"),u=t("../internals/call-with-safe-iteration-closing"),f=t("../internals/is-array-iterator-method"),g=t("../internals/to-length"),y=t("../internals/create-property"),o=t("../internals/get-iterator-method");W.exports=function(v){var r,i,s,n,l,c,d=m(v),v=typeof this=="function"?this:Array,S=arguments.length,E=1<S?arguments[1]:void 0,_=E!==void 0,x=o(d),O=0;if(_&&(E=p(E,2<S?arguments[2]:void 0,2)),x==null||v==Array&&f(x))for(i=new v(r=g(d.length));O<r;O++)c=_?E(d[O],O):d[O],y(i,O,c);else for(l=(n=x.call(d)).next,i=new v;!(s=l.call(n)).done;O++)c=_?u(n,E,[s.value,O],!0):s.value,y(i,O,c);return i.length=O,i}},{"../internals/call-with-safe-iteration-closing":26,"../internals/create-property":40,"../internals/function-bind-context":55,"../internals/get-iterator-method":58,"../internals/is-array-iterator-method":72,"../internals/to-length":138,"../internals/to-object":139}],18:[function(t,W,C){function p(g){return function(y,o,a){var r,i=m(y),s=u(i.length),n=f(a,s);if(g&&o!=o){for(;n<s;)if((r=i[n++])!=r)return!0}else for(;n<s;n++)if((g||n in i)&&i[n]===o)return g||n||0;return!g&&-1}}var m=t("../internals/to-indexed-object"),u=t("../internals/to-length"),f=t("../internals/to-absolute-index");W.exports={includes:p(!0),indexOf:p(!1)}},{"../internals/to-absolute-index":134,"../internals/to-indexed-object":136,"../internals/to-length":138}],19:[function(t,W,C){function p(a){var r=a==1,i=a==2,s=a==3,n=a==4,l=a==6,c=a==5||l;return function(d,v,S,E){for(var _,x,O=f(d),T=u(O),P=m(v,S,3),M=g(T.length),F=0,v=E||y,D=r?v(d,M):i?v(d,0):void 0;F<M;F++)if((c||F in T)&&(x=P(_=T[F],F,O),a)){if(r)D[F]=x;else if(x)switch(a){case 3:return!0;case 5:return _;case 6:return F;case 2:o.call(D,_)}else if(n)return!1}return l?-1:s||n?n:D}}var m=t("../internals/function-bind-context"),u=t("../internals/indexed-object"),f=t("../internals/to-object"),g=t("../internals/to-length"),y=t("../internals/array-species-create"),o=[].push;W.exports={forEach:p(0),map:p(1),filter:p(2),some:p(3),every:p(4),find:p(5),findIndex:p(6)}},{"../internals/array-species-create":25,"../internals/function-bind-context":55,"../internals/indexed-object":67,"../internals/to-length":138,"../internals/to-object":139}],20:[function(a,W,C){"use strict";var p=a("../internals/to-indexed-object"),m=a("../internals/to-integer"),u=a("../internals/to-length"),o=a("../internals/array-method-is-strict"),a=a("../internals/array-method-uses-to-length"),f=Math.min,g=[].lastIndexOf,y=!!g&&1/[1].lastIndexOf(1,-0)<0,o=o("lastIndexOf"),a=a("indexOf",{ACCESSORS:!0,1:0});W.exports=y||!o||!a?function(r){if(y)return g.apply(this,arguments)||0;var i=p(this),s=u(i.length),n=s-1;for((n=1<arguments.length?f(n,m(arguments[1])):n)<0&&(n=s+n);0<=n;n--)if(n in i&&i[n]===r)return n||0;return-1}:g},{"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/to-indexed-object":136,"../internals/to-integer":137,"../internals/to-length":138}],21:[function(t,W,C){var p=t("../internals/fails"),m=t("../internals/well-known-symbol"),u=t("../internals/engine-v8-version"),f=m("species");W.exports=function(g){return 51<=u||!p(function(){var y=[];return(y.constructor={})[f]=function(){return{foo:1}},y[g](Boolean).foo!==1})}},{"../internals/engine-v8-version":48,"../internals/fails":51,"../internals/well-known-symbol":150}],22:[function(t,W,C){"use strict";var p=t("../internals/fails");W.exports=function(m,u){var f=[][m];return!!f&&p(function(){f.call(null,u||function(){throw 1},1)})}},{"../internals/fails":51}],23:[function(t,W,C){function p(o){throw o}var m=t("../internals/descriptors"),u=t("../internals/fails"),f=t("../internals/has"),g=Object.defineProperty,y={};W.exports=function(o,a){var r,i,s,n;return f(y,o)?y[o]:(r=[][o],i=!!f(a=a||{},"ACCESSORS")&&a.ACCESSORS,s=f(a,0)?a[0]:p,n=f(a,1)?a[1]:void 0,y[o]=!!r&&!u(function(){if(i&&!m)return!0;var l={length:-1};i?g(l,1,{enumerable:!0,get:p}):l[1]=1,r.call(l,s,n)}))}},{"../internals/descriptors":43,"../internals/fails":51,"../internals/has":61}],24:[function(t,W,C){function p(y){return function(o,a,r,i){m(a);var s=u(o),n=f(s),l=g(s.length),c=y?l-1:0,d=y?-1:1;if(r<2)for(;;){if(c in n){i=n[c],c+=d;break}if(c+=d,y?c<0:l<=c)throw TypeError("Reduce of empty array with no initial value")}for(;y?0<=c:c<l;c+=d)c in n&&(i=a(i,n[c],c,s));return i}}var m=t("../internals/a-function"),u=t("../internals/to-object"),f=t("../internals/indexed-object"),g=t("../internals/to-length");W.exports={left:p(!1),right:p(!0)}},{"../internals/a-function":5,"../internals/indexed-object":67,"../internals/to-length":138,"../internals/to-object":139}],25:[function(t,W,C){var p=t("../internals/is-object"),m=t("../internals/is-array"),u=t("../internals/well-known-symbol")("species");W.exports=function(f,g){var y;return new((y=m(f)&&(typeof(y=f.constructor)=="function"&&(y===Array||m(y.prototype))||p(y)&&(y=y[u])===null)?void 0:y)===void 0?Array:y)(g===0?0:g)}},{"../internals/is-array":73,"../internals/is-object":75,"../internals/well-known-symbol":150}],26:[function(t,W,C){var p=t("../internals/an-object");W.exports=function(m,u,f,g){try{return g?u(p(f)[0],f[1]):u(f)}catch(y){throw g=m.return,g!==void 0&&p(g.call(m)),y}}},{"../internals/an-object":10}],27:[function(t,W,C){var p=t("../internals/well-known-symbol")("iterator"),m=!1;try{var u=0,f={next:function(){return{done:!!u++}},return:function(){m=!0}};f[p]=function(){return this},Array.from(f,function(){throw 2})}catch{}W.exports=function(g,y){if(!y&&!m)return!1;var o=!1;try{var a={};a[p]=function(){return{next:function(){return{done:o=!0}}}},g(a)}catch{}return o}},{"../internals/well-known-symbol":150}],28:[function(t,W,C){var p={}.toString;W.exports=function(m){return p.call(m).slice(8,-1)}},{}],29:[function(t,W,C){var p=t("../internals/to-string-tag-support"),m=t("../internals/classof-raw"),u=t("../internals/well-known-symbol")("toStringTag"),f=m((function(){return arguments})())=="Arguments";W.exports=p?m:function(g){var y;return g===void 0?"Undefined":g===null?"Null":typeof(y=(function(o,a){try{return o[a]}catch{}})(g=Object(g),u))=="string"?y:f?m(g):(y=m(g))=="Object"&&typeof g.callee=="function"?"Arguments":y}},{"../internals/classof-raw":28,"../internals/to-string-tag-support":143,"../internals/well-known-symbol":150}],30:[function(s,W,C){"use strict";var p=s("../internals/object-define-property").f,m=s("../internals/object-create"),u=s("../internals/redefine-all"),f=s("../internals/function-bind-context"),g=s("../internals/an-instance"),y=s("../internals/iterate"),o=s("../internals/define-iterator"),a=s("../internals/set-species"),r=s("../internals/descriptors"),i=s("../internals/internal-metadata").fastKey,s=s("../internals/internal-state"),n=s.set,l=s.getterFor;W.exports={getConstructor:function(c,d,v,S){function E(T,P,M){var F,D=O(T),A=_(T,P);return A?A.value=M:(D.last=A={index:F=i(P,!0),key:P,value:M,previous:P=D.last,next:void 0,removed:!1},D.first||(D.first=A),P&&(P.next=A),r?D.size++:T.size++,F!=="F"&&(D.index[F]=A)),T}function _(F,P){var M,F=O(F),D=i(P);if(D!=="F")return F.index[D];for(M=F.first;M;M=M.next)if(M.key==P)return M}var x=c(function(T,P){g(T,x,d),n(T,{type:d,index:m(null),first:void 0,last:void 0,size:0}),r||(T.size=0),P!=null&&y(P,T[S],T,v)}),O=l(d);return u(x.prototype,{clear:function(){for(var T=O(this),P=T.index,M=T.first;M;)M.removed=!0,M.previous&&(M.previous=M.previous.next=void 0),delete P[M.index],M=M.next;T.first=T.last=void 0,r?T.size=0:this.size=0},delete:function(D){var P,M,F=O(this),D=_(this,D);return D&&(P=D.next,M=D.previous,delete F.index[D.index],D.removed=!0,M&&(M.next=P),P&&(P.previous=M),F.first==D&&(F.first=P),F.last==D&&(F.last=M),r?F.size--:this.size--),!!D},forEach:function(T){for(var P,M=O(this),F=f(T,1<arguments.length?arguments[1]:void 0,3);P=P?P.next:M.first;)for(F(P.value,P.key,this);P&&P.removed;)P=P.previous},has:function(T){return!!_(this,T)}}),u(x.prototype,v?{get:function(T){return T=_(this,T),T&&T.value},set:function(T,P){return E(this,T===0?0:T,P)}}:{add:function(T){return E(this,T=T===0?0:T,T)}}),r&&p(x.prototype,"size",{get:function(){return O(this).size}}),x},setStrong:function(c,d,v){var S=d+" Iterator",E=l(d),_=l(S);o(c,d,function(x,O){n(this,{type:S,target:x,state:E(x),kind:O,last:void 0})},function(){for(var x=_(this),O=x.kind,T=x.last;T&&T.removed;)T=T.previous;return x.target&&(x.last=T=T?T.next:x.state.first)?O=="keys"?{value:T.key,done:!1}:O=="values"?{value:T.value,done:!1}:{value:[T.key,T.value],done:!1}:{value:x.target=void 0,done:!0}},v?"entries":"values",!v,!0),a(d)}}},{"../internals/an-instance":9,"../internals/define-iterator":41,"../internals/descriptors":43,"../internals/function-bind-context":55,"../internals/internal-metadata":70,"../internals/internal-state":71,"../internals/iterate":78,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/redefine-all":109,"../internals/set-species":118}],31:[function(n,W,C){"use strict";function p(E){return E.frozen||(E.frozen=new m)}function m(){this.entries=[]}function u(E,_){return d(E.entries,function(x){return x[0]===_})}var f=n("../internals/redefine-all"),g=n("../internals/internal-metadata").getWeakData,y=n("../internals/an-object"),o=n("../internals/is-object"),a=n("../internals/an-instance"),r=n("../internals/iterate"),i=n("../internals/array-iteration"),s=n("../internals/has"),n=n("../internals/internal-state"),l=n.set,c=n.getterFor,d=i.find,v=i.findIndex,S=0;m.prototype={get:function(E){if(E=u(this,E),E)return E[1]},has:function(E){return!!u(this,E)},set:function(E,_){var x=u(this,E);x?x[1]=_:this.entries.push([E,_])},delete:function(E){var _=v(this.entries,function(x){return x[0]===E});return~_&&this.entries.splice(_,1),!!~_}},W.exports={getConstructor:function(E,_,x,O){function T(F,D,A){var z=M(F),G=g(y(D),!0);return G===!0?p(z).set(D,A):G[z.id]=A,F}var P=E(function(F,D){a(F,P,_),l(F,{type:_,id:S++,frozen:void 0}),D!=null&&r(D,F[O],F,x)}),M=c(_);return f(P.prototype,{delete:function(F){var D,A=M(this);return!!o(F)&&((D=g(F))===!0?p(A).delete(F):D&&s(D,A.id)&&delete D[A.id])},has:function(F){var D,A=M(this);return!!o(F)&&((D=g(F))===!0?p(A).has(F):D&&s(D,A.id))}}),f(P.prototype,x?{get:function(F){var D,A=M(this);if(o(F))return(D=g(F))===!0?p(A).get(F):D?D[A.id]:void 0},set:function(F,D){return T(this,F,D)}}:{add:function(F){return T(this,F,!0)}}),P}}},{"../internals/an-instance":9,"../internals/an-object":10,"../internals/array-iteration":19,"../internals/has":61,"../internals/internal-metadata":70,"../internals/internal-state":71,"../internals/is-object":75,"../internals/iterate":78,"../internals/redefine-all":109}],32:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/global"),u=t("../internals/is-forced"),f=t("../internals/redefine"),g=t("../internals/internal-metadata"),y=t("../internals/iterate"),o=t("../internals/an-instance"),a=t("../internals/is-object"),r=t("../internals/fails"),i=t("../internals/check-correctness-of-iteration"),s=t("../internals/set-to-string-tag"),n=t("../internals/inherit-if-required");W.exports=function(l,c,d){function v(G){var U=D[G];f(D,G,G=="add"?function(H){return U.call(this,H===0?0:H),this}:G=="delete"?function(H){return!(P&&!a(H))&&U.call(this,H===0?0:H)}:G=="get"?function(H){return P&&!a(H)?void 0:U.call(this,H===0?0:H)}:G=="has"?function(H){return!(P&&!a(H))&&U.call(this,H===0?0:H)}:function(H,Y){return U.call(this,H===0?0:H,Y),this})}var S,E,_,x,O,T=l.indexOf("Map")!==-1,P=l.indexOf("Weak")!==-1,M=T?"set":"add",F=m[l],D=F&&F.prototype,A=F,z={};return u(l,typeof F!="function"||!(P||D.forEach&&!r(function(){new F().entries().next()})))?(A=d.getConstructor(c,l,T,M),g.REQUIRED=!0):u(l,!0)&&(E=(S=new A)[M](P?{}:-0,1)!=S,_=r(function(){S.has(1)}),x=i(function(G){new F(G)}),O=!P&&r(function(){for(var G=new F,U=5;U--;)G[M](U,U);return!G.has(-0)}),x||(((A=c(function(G,U){return o(G,A,l),G=n(new F,G,A),U!=null&&y(U,G[M],G,T),G})).prototype=D).constructor=A),(_||O)&&(v("delete"),v("has"),T&&v("get")),(O||E)&&v(M),P&&D.clear&&delete D.clear),z[l]=A,p({global:!0,forced:A!=F},z),s(A,l),P||d.setStrong(A,l,T),A}},{"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/export":50,"../internals/fails":51,"../internals/global":60,"../internals/inherit-if-required":68,"../internals/internal-metadata":70,"../internals/is-forced":74,"../internals/is-object":75,"../internals/iterate":78,"../internals/redefine":110,"../internals/set-to-string-tag":119}],33:[function(t,W,C){var p=t("../internals/has"),m=t("../internals/own-keys"),u=t("../internals/object-get-own-property-descriptor"),f=t("../internals/object-define-property");W.exports=function(g,y){for(var o=m(y),a=f.f,r=u.f,i=0;i<o.length;i++){var s=o[i];p(g,s)||a(g,s,r(y,s))}}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/own-keys":105}],34:[function(t,W,C){var p=t("../internals/well-known-symbol")("match");W.exports=function(m){var u=/./;try{"/./"[m](u)}catch{try{return u[p]=!1,"/./"[m](u)}catch{}}return!1}},{"../internals/well-known-symbol":150}],35:[function(t,W,C){t=t("../internals/fails"),W.exports=!t(function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype})},{"../internals/fails":51}],36:[function(t,W,C){var p=t("../internals/require-object-coercible"),m=/"/g;W.exports=function(o,f,g,y){var o=String(p(o)),a="<"+f;return g!==""&&(a+=" "+g+'="'+String(y).replace(m,"&quot;")+'"'),a+">"+o+"</"+f+">"}},{"../internals/require-object-coercible":115}],37:[function(t,W,C){"use strict";function p(){return this}var m=t("../internals/iterators-core").IteratorPrototype,u=t("../internals/object-create"),f=t("../internals/create-property-descriptor"),g=t("../internals/set-to-string-tag"),y=t("../internals/iterators");W.exports=function(o,a,r){return a+=" Iterator",o.prototype=u(m,{next:f(1,r)}),g(o,a,!1,!0),y[a]=p,o}},{"../internals/create-property-descriptor":39,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-create":91,"../internals/set-to-string-tag":119}],38:[function(t,W,C){var p=t("../internals/descriptors"),m=t("../internals/object-define-property"),u=t("../internals/create-property-descriptor");W.exports=p?function(f,g,y){return m.f(f,g,u(1,y))}:function(f,g,y){return f[g]=y,f}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/object-define-property":93}],39:[function(t,W,C){W.exports=function(p,m){return{enumerable:!(1&p),configurable:!(2&p),writable:!(4&p),value:m}}},{}],40:[function(t,W,C){"use strict";var p=t("../internals/to-primitive"),m=t("../internals/object-define-property"),u=t("../internals/create-property-descriptor");W.exports=function(f,g,y){g=p(g),g in f?m.f(f,g,u(0,y)):f[g]=y}},{"../internals/create-property-descriptor":39,"../internals/object-define-property":93,"../internals/to-primitive":142}],41:[function(n,W,C){"use strict";function p(){return this}var m=n("../internals/export"),u=n("../internals/create-iterator-constructor"),f=n("../internals/object-get-prototype-of"),g=n("../internals/object-set-prototype-of"),y=n("../internals/set-to-string-tag"),o=n("../internals/create-non-enumerable-property"),a=n("../internals/redefine"),r=n("../internals/well-known-symbol"),i=n("../internals/is-pure"),s=n("../internals/iterators"),n=n("../internals/iterators-core"),l=n.IteratorPrototype,c=n.BUGGY_SAFARI_ITERATORS,d=r("iterator"),v="values",S="entries";W.exports=function(E,_,x,z,T,P,M){u(x,_,z);function F(L){if(L===T&&Y)return Y;if(!c&&L in U)return U[L];switch(L){case"keys":case v:case S:return function(){return new x(this,L)}}return function(){return new x(this)}}var D,A,z=_+" Iterator",G=!1,U=E.prototype,H=U[d]||U["@@iterator"]||T&&U[T],Y=!c&&H||F(T),oe=_=="Array"&&U.entries||H;if(oe&&(oe=f(oe.call(new E)),l!==Object.prototype&&oe.next&&(i||f(oe)===l||(g?g(oe,l):typeof oe[d]!="function"&&o(oe,d,p)),y(oe,z,!0,!0),i&&(s[z]=p))),T==v&&H&&H.name!==v&&(G=!0,Y=function(){return H.call(this)}),i&&!M||U[d]===Y||o(U,d,Y),s[_]=Y,T)if(D={values:F(v),keys:P?Y:F("keys"),entries:F(S)},M)for(A in D)!c&&!G&&A in U||a(U,A,D[A]);else m({target:_,proto:!0,forced:c||G},D);return D}},{"../internals/create-iterator-constructor":37,"../internals/create-non-enumerable-property":38,"../internals/export":50,"../internals/is-pure":76,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/well-known-symbol":150}],42:[function(t,W,C){var p=t("../internals/path"),m=t("../internals/has"),u=t("../internals/well-known-symbol-wrapped"),f=t("../internals/object-define-property").f;W.exports=function(g){var y=p.Symbol||(p.Symbol={});m(y,g)||f(y,g,{value:u.f(g)})}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/path":106,"../internals/well-known-symbol-wrapped":149}],43:[function(t,W,C){t=t("../internals/fails"),W.exports=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":51}],44:[function(m,W,C){var p=m("../internals/global"),m=m("../internals/is-object"),u=p.document,f=m(u)&&m(u.createElement);W.exports=function(g){return f?u.createElement(g):{}}},{"../internals/global":60,"../internals/is-object":75}],45:[function(t,W,C){W.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],46:[function(t,W,C){t=t("../internals/engine-user-agent"),W.exports=/(iphone|ipod|ipad).*applewebkit/i.test(t)},{"../internals/engine-user-agent":47}],47:[function(t,W,C){t=t("../internals/get-built-in"),W.exports=t("navigator","userAgent")||""},{"../internals/get-built-in":57}],48:[function(u,W,C){var p,m,f=u("../internals/global"),u=u("../internals/engine-user-agent"),f=f.process,f=f&&f.versions,f=f&&f.v8;f?m=(p=f.split("."))[0]+p[1]:u&&(!(p=u.match(/Edge\/(\d+)/))||74<=p[1])&&(p=u.match(/Chrome\/(\d+)/))&&(m=p[1]),W.exports=m&&+m},{"../internals/engine-user-agent":47,"../internals/global":60}],49:[function(t,W,C){W.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],50:[function(t,W,C){var p=t("../internals/global"),m=t("../internals/object-get-own-property-descriptor").f,u=t("../internals/create-non-enumerable-property"),f=t("../internals/redefine"),g=t("../internals/set-global"),y=t("../internals/copy-constructor-properties"),o=t("../internals/is-forced");W.exports=function(a,r){var i,s,n,l=a.target,c=a.global,d=a.stat,v=c?p:d?p[l]||g(l,{}):(p[l]||{}).prototype;if(v)for(i in r){if(s=r[i],n=a.noTargetGet?(n=m(v,i))&&n.value:v[i],!o(c?i:l+(d?".":"#")+i,a.forced)&&n!==void 0){if(typeof s==typeof n)continue;y(s,n)}(a.sham||n&&n.sham)&&u(s,"sham",!0),f(v,i,s,a)}}},{"../internals/copy-constructor-properties":33,"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/is-forced":74,"../internals/object-get-own-property-descriptor":94,"../internals/redefine":110,"../internals/set-global":117}],51:[function(t,W,C){W.exports=function(p){try{return!!p()}catch{return!0}}},{}],52:[function(r,W,C){"use strict";r("../modules/es.regexp.exec");var p=r("../internals/redefine"),m=r("../internals/fails"),u=r("../internals/well-known-symbol"),f=r("../internals/regexp-exec"),g=r("../internals/create-non-enumerable-property"),y=u("species"),o=!m(function(){var n=/./;return n.exec=function(){var l=[];return l.groups={a:"7"},l},"".replace(n,"$<a>")!=="7"}),a="a".replace(/./,"$0")==="$0",r=u("replace"),i=!!/./[r]&&/./[r]("a","$0")==="",s=!m(function(){var l=/(?:)/,n=l.exec,l=(l.exec=function(){return n.apply(this,arguments)},"ab".split(l));return l.length!==2||l[0]!=="a"||l[1]!=="b"});W.exports=function(n,l,c,d){var v,S,E=u(n),_=!m(function(){var O={};return O[E]=function(){return 7},""[n](O)!=7}),x=_&&!m(function(){var O=!1,T=/a/;return n==="split"&&((T={constructor:{}}).constructor[y]=function(){return T},T.flags="",T[E]=/./[E]),T.exec=function(){return O=!0,null},T[E](""),!O});_&&x&&(n!=="replace"||o&&a&&!i)&&(n!=="split"||s)||(v=/./[E],c=(x=c(E,""[n],function(O,T,P,M,F){return T.exec===f?_&&!F?{done:!0,value:v.call(T,P,M)}:{done:!0,value:O.call(P,T,M)}:{done:!1}},{REPLACE_KEEPS_$0:a,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:i}))[0],S=x[1],p(String.prototype,n,c),p(RegExp.prototype,E,l==2?function(O,T){return S.call(O,this,T)}:function(O){return S.call(O,this)})),d&&g(RegExp.prototype[E],"sham",!0)}},{"../internals/create-non-enumerable-property":38,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-exec":112,"../internals/well-known-symbol":150,"../modules/es.regexp.exec":195}],53:[function(t,W,C){"use strict";function p(g,y,o,a,r,i,s,n){for(var l,c=r,d=0,v=!!s&&f(s,n,3);d<a;){if(d in o){if(l=v?v(o[d],d,y):o[d],0<i&&m(l))c=p(g,y,l,u(l.length),c,i-1)-1;else{if(9007199254740991<=c)throw TypeError("Exceed the acceptable array length");g[c]=l}c++}d++}return c}var m=t("../internals/is-array"),u=t("../internals/to-length"),f=t("../internals/function-bind-context");W.exports=p},{"../internals/function-bind-context":55,"../internals/is-array":73,"../internals/to-length":138}],54:[function(t,W,C){t=t("../internals/fails"),W.exports=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})},{"../internals/fails":51}],55:[function(t,W,C){var p=t("../internals/a-function");W.exports=function(m,u,f){if(p(m),u===void 0)return m;switch(f){case 0:return function(){return m.call(u)};case 1:return function(g){return m.call(u,g)};case 2:return function(g,y){return m.call(u,g,y)};case 3:return function(g,y,o){return m.call(u,g,y,o)}}return function(){return m.apply(u,arguments)}}},{"../internals/a-function":5}],56:[function(t,W,C){"use strict";var p=t("../internals/a-function"),m=t("../internals/is-object"),u=[].slice,f={};W.exports=Function.bind||function(g){var y=p(this),o=u.call(arguments,1),a=function(){var r=o.concat(u.call(arguments));if(this instanceof a){var i=y,s=r.length,n=r;if(!(s in f)){for(var l=[],c=0;c<s;c++)l[c]="a["+c+"]";f[s]=Function("C,a","return new C("+l.join(",")+")")}return f[s](i,n)}return y.apply(g,r)};return m(y.prototype)&&(a.prototype=y.prototype),a}},{"../internals/a-function":5,"../internals/is-object":75}],57:[function(t,W,C){function p(f){return typeof f=="function"?f:void 0}var m=t("../internals/path"),u=t("../internals/global");W.exports=function(f,g){return arguments.length<2?p(m[f])||p(u[f]):m[f]&&m[f][g]||u[f]&&u[f][g]}},{"../internals/global":60,"../internals/path":106}],58:[function(t,W,C){var p=t("../internals/classof"),m=t("../internals/iterators"),u=t("../internals/well-known-symbol")("iterator");W.exports=function(f){if(f!=null)return f[u]||f["@@iterator"]||m[p(f)]}},{"../internals/classof":29,"../internals/iterators":80,"../internals/well-known-symbol":150}],59:[function(t,W,C){var p=t("../internals/an-object"),m=t("../internals/get-iterator-method");W.exports=function(u){var f=m(u);if(typeof f!="function")throw TypeError(String(u)+" is not iterable");return p(f.call(u))}},{"../internals/an-object":10,"../internals/get-iterator-method":58}],60:[function(t,W,C){(function(p){function m(u){return u&&u.Math==Math&&u}W.exports=m(typeof globalThis=="object"&&globalThis)||m(typeof window=="object"&&window)||m(typeof self=="object"&&self)||m(typeof p=="object"&&p)||Function("return this")()}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],61:[function(t,W,C){var p={}.hasOwnProperty;W.exports=function(m,u){return p.call(m,u)}},{}],62:[function(t,W,C){W.exports={}},{}],63:[function(t,W,C){var p=t("../internals/global");W.exports=function(m,u){var f=p.console;f&&f.error&&(arguments.length===1?f.error(m):f.error(m,u))}},{"../internals/global":60}],64:[function(t,W,C){t=t("../internals/get-built-in"),W.exports=t("document","documentElement")},{"../internals/get-built-in":57}],65:[function(t,W,C){var p=t("../internals/descriptors"),m=t("../internals/fails"),u=t("../internals/document-create-element");W.exports=!p&&!m(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":43,"../internals/document-create-element":44,"../internals/fails":51}],66:[function(t,W,C){var p=Math.abs,m=Math.pow,u=Math.floor,f=Math.log,g=Math.LN2;W.exports={pack:function(y,o,c){var r,i,s,n=new Array(c),l=8*c-o-1,c=(1<<l)-1,d=c>>1,v=o===23?m(2,-24)-m(2,-77):0,S=y<0||y===0&&1/y<0?1:0,E=0;for((y=p(y))!=y||y===1/0?(i=y!=y?1:0,r=c):(r=u(f(y)/g),y*(s=m(2,-r))<1&&(r--,s*=2),2<=(y+=1<=r+d?v/s:v*m(2,1-d))*s&&(r++,s/=2),c<=r+d?(i=0,r=c):1<=r+d?(i=(y*s-1)*m(2,o),r+=d):(i=y*m(2,d-1)*m(2,o),r=0));8<=o;n[E++]=255&i,i/=256,o-=8);for(r=r<<o|i,l+=o;0<l;n[E++]=255&r,r/=256,l-=8);return n[--E]|=128*S,n},unpack:function(y,o){var a,r=y.length,c=8*r-o-1,i=(1<<c)-1,s=i>>1,n=c-7,l=r-1,c=y[l--],d=127&c;for(c>>=7;0<n;d=256*d+y[l],l--,n-=8);for(a=d&(1<<-n)-1,d>>=-n,n+=o;0<n;a=256*a+y[l],l--,n-=8);if(d===0)d=1-s;else{if(d===i)return a?NaN:c?-1/0:1/0;a+=m(2,o),d-=s}return(c?-1:1)*a*m(2,d-o)}}},{}],67:[function(t,W,C){var p=t("../internals/fails"),m=t("../internals/classof-raw"),u="".split;W.exports=p(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return m(f)=="String"?u.call(f,""):Object(f)}:Object},{"../internals/classof-raw":28,"../internals/fails":51}],68:[function(t,W,C){var p=t("../internals/is-object"),m=t("../internals/object-set-prototype-of");W.exports=function(u,f,g){return m&&typeof(f=f.constructor)=="function"&&f!==g&&p(f=f.prototype)&&f!==g.prototype&&m(u,f),u}},{"../internals/is-object":75,"../internals/object-set-prototype-of":102}],69:[function(p,W,C){var p=p("../internals/shared-store"),m=Function.toString;typeof p.inspectSource!="function"&&(p.inspectSource=function(u){return m.call(u)}),W.exports=p.inspectSource},{"../internals/shared-store":121}],70:[function(t,W,C){function p(n){g(n,a,{value:{objectID:"O"+ ++r,weakData:{}}})}var m=t("../internals/hidden-keys"),u=t("../internals/is-object"),f=t("../internals/has"),g=t("../internals/object-define-property").f,y=t("../internals/uid"),o=t("../internals/freezing"),a=y("meta"),r=0,i=Object.isExtensible||function(){return!0},s=W.exports={REQUIRED:!1,fastKey:function(n,l){if(!u(n))return typeof n=="symbol"?n:(typeof n=="string"?"S":"P")+n;if(!f(n,a)){if(!i(n))return"F";if(!l)return"E";p(n)}return n[a].objectID},getWeakData:function(n,l){if(!f(n,a)){if(!i(n))return!0;if(!l)return!1;p(n)}return n[a].weakData},onFreeze:function(n){return o&&s.REQUIRED&&i(n)&&!f(n,a)&&p(n),n}};m[a]=!0},{"../internals/freezing":54,"../internals/has":61,"../internals/hidden-keys":62,"../internals/is-object":75,"../internals/object-define-property":93,"../internals/uid":147}],71:[function(c,W,C){var p,m,u,f,g,y,o,a,r=c("../internals/native-weak-map"),d=c("../internals/global"),i=c("../internals/is-object"),s=c("../internals/create-non-enumerable-property"),n=c("../internals/has"),l=c("../internals/shared-key"),c=c("../internals/hidden-keys"),d=d.WeakMap;o=r?(p=new d,m=p.get,u=p.has,f=p.set,g=function(v,S){return f.call(p,v,S),S},y=function(v){return m.call(p,v)||{}},function(v){return u.call(p,v)}):(c[a=l("state")]=!0,g=function(v,S){return s(v,a,S),S},y=function(v){return n(v,a)?v[a]:{}},function(v){return n(v,a)}),W.exports={set:g,get:y,has:o,enforce:function(v){return o(v)?y(v):g(v,{})},getterFor:function(v){return function(S){if(i(S)&&(S=y(S)).type===v)return S;throw TypeError("Incompatible receiver, "+v+" required")}}}},{"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/has":61,"../internals/hidden-keys":62,"../internals/is-object":75,"../internals/native-weak-map":86,"../internals/shared-key":120}],72:[function(t,W,C){var p=t("../internals/well-known-symbol"),m=t("../internals/iterators"),u=p("iterator"),f=Array.prototype;W.exports=function(g){return g!==void 0&&(m.Array===g||f[u]===g)}},{"../internals/iterators":80,"../internals/well-known-symbol":150}],73:[function(t,W,C){var p=t("../internals/classof-raw");W.exports=Array.isArray||function(m){return p(m)=="Array"}},{"../internals/classof-raw":28}],74:[function(t,W,C){function p(a,r){return(a=g[f(a)])==o||a!=y&&(typeof r=="function"?m(r):!!r)}var m=t("../internals/fails"),u=/#|\.prototype\./,f=p.normalize=function(a){return String(a).replace(u,".").toLowerCase()},g=p.data={},y=p.NATIVE="N",o=p.POLYFILL="P";W.exports=p},{"../internals/fails":51}],75:[function(t,W,C){W.exports=function(p){return typeof p=="object"?p!==null:typeof p=="function"}},{}],76:[function(t,W,C){W.exports=!1},{}],77:[function(t,W,C){var p=t("../internals/is-object"),m=t("../internals/classof-raw"),u=t("../internals/well-known-symbol")("match");W.exports=function(f){var g;return p(f)&&((g=f[u])!==void 0?!!g:m(f)=="RegExp")}},{"../internals/classof-raw":28,"../internals/is-object":75,"../internals/well-known-symbol":150}],78:[function(t,W,C){function p(a,r){this.stopped=a,this.result=r}var m=t("../internals/an-object"),u=t("../internals/is-array-iterator-method"),f=t("../internals/to-length"),g=t("../internals/function-bind-context"),y=t("../internals/get-iterator-method"),o=t("../internals/call-with-safe-iteration-closing");(W.exports=function(a,r,i,s,n){var l,c,d,v,S,E,_=g(r,i,s?2:1);if(n)l=a;else{if(typeof(r=y(a))!="function")throw TypeError("Target is not iterable");if(u(r)){for(c=0,d=f(a.length);c<d;c++)if((v=s?_(m(E=a[c])[0],E[1]):_(a[c]))&&v instanceof p)return v;return new p(!1)}l=r.call(a)}for(S=l.next;!(E=S.call(l)).done;)if(typeof(v=o(l,_,E.value,s))=="object"&&v&&v instanceof p)return v;return new p(!1)}).stop=function(a){return new p(!0,a)}},{"../internals/an-object":10,"../internals/call-with-safe-iteration-closing":26,"../internals/function-bind-context":55,"../internals/get-iterator-method":58,"../internals/is-array-iterator-method":72,"../internals/to-length":138}],79:[function(y,W,C){"use strict";var p,m,u=y("../internals/object-get-prototype-of"),f=y("../internals/create-non-enumerable-property"),g=y("../internals/has"),o=y("../internals/well-known-symbol"),y=y("../internals/is-pure"),o=o("iterator"),a=!1;[].keys&&("next"in(m=[].keys())?(u=u(u(m)))!==Object.prototype&&(p=u):a=!0),p==null&&(p={}),y||g(p,o)||f(p,o,function(){return this}),W.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:a}},{"../internals/create-non-enumerable-property":38,"../internals/has":61,"../internals/is-pure":76,"../internals/object-get-prototype-of":98,"../internals/well-known-symbol":150}],80:[function(t,W,C){W.exports={}},{}],81:[function(t,W,C){W.exports=Math.sign||function(p){return(p=+p)==0||p!=p?p:p<0?-1:1}},{}],82:[function(s,W,C){var p,m,u,f,g,y,o,a,r=s("../internals/global"),S=s("../internals/object-get-own-property-descriptor").f,v=s("../internals/classof-raw"),i=s("../internals/task").set,s=s("../internals/engine-is-ios"),n=r.MutationObserver||r.WebKitMutationObserver,l=r.process,c=r.Promise,d=v(l)=="process",v=S(r,"queueMicrotask"),S=v&&v.value;S||(p=function(){var E,_;for(d&&(E=l.domain)&&E.exit();m;){_=m.fn,m=m.next;try{_()}catch(x){throw m?f():u=void 0,x}}u=void 0,E&&E.enter()},f=d?function(){l.nextTick(p)}:n&&!s?(g=!0,y=document.createTextNode(""),new n(p).observe(y,{characterData:!0}),function(){y.data=g=!g}):c&&c.resolve?(o=c.resolve(void 0),a=o.then,function(){a.call(o,p)}):function(){i.call(r,p)}),W.exports=S||function(E){E={fn:E,next:void 0},u&&(u.next=E),m||(m=E,f()),u=E}},{"../internals/classof-raw":28,"../internals/engine-is-ios":46,"../internals/global":60,"../internals/object-get-own-property-descriptor":94,"../internals/task":132}],83:[function(t,W,C){t=t("../internals/global"),W.exports=t.Promise},{"../internals/global":60}],84:[function(t,W,C){t=t("../internals/fails"),W.exports=!!Object.getOwnPropertySymbols&&!t(function(){return!String(Symbol())})},{"../internals/fails":51}],85:[function(t,W,C){var p=t("../internals/fails"),m=t("../internals/well-known-symbol"),u=t("../internals/is-pure"),f=m("iterator");W.exports=!p(function(){var g=new URL("b?a=1&b=2&c=3","http://a"),y=g.searchParams,o="";return g.pathname="c%20d",y.forEach(function(a,r){y.delete("b"),o+=r+a}),u&&!g.toJSON||!y.sort||g.href!=="http://a/c%20d?a=1&c=3"||y.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!y[f]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||o!=="a1c3"||new URL("http://x",void 0).host!=="x"})},{"../internals/fails":51,"../internals/is-pure":76,"../internals/well-known-symbol":150}],86:[function(p,W,C){var m=p("../internals/global"),p=p("../internals/inspect-source"),m=m.WeakMap;W.exports=typeof m=="function"&&/native code/.test(p(m))},{"../internals/global":60,"../internals/inspect-source":69}],87:[function(t,W,C){"use strict";function p(u){var f,g;this.promise=new u(function(y,o){if(f!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");f=y,g=o}),this.resolve=m(f),this.reject=m(g)}var m=t("../internals/a-function");W.exports.f=function(u){return new p(u)}},{"../internals/a-function":5}],88:[function(t,W,C){var p=t("../internals/is-regexp");W.exports=function(m){if(p(m))throw TypeError("The method doesn't accept regular expressions");return m}},{"../internals/is-regexp":77}],89:[function(t,W,C){var p=t("../internals/global").isFinite;W.exports=Number.isFinite||function(m){return typeof m=="number"&&p(m)}},{"../internals/global":60}],90:[function(t,W,C){"use strict";var p=t("../internals/descriptors"),m=t("../internals/fails"),u=t("../internals/object-keys"),f=t("../internals/object-get-own-property-symbols"),g=t("../internals/object-property-is-enumerable"),y=t("../internals/to-object"),o=t("../internals/indexed-object"),a=Object.assign,r=Object.defineProperty;W.exports=!a||m(function(){var i,s,n,l;return!(!p||a({b:1},a(r({},"a",{enumerable:!0,get:function(){r(this,"b",{value:3,enumerable:!1})}}),{b:2})).b===1)||(s={},l="abcdefghijklmnopqrst",(i={})[n=Symbol()]=7,l.split("").forEach(function(c){s[c]=c}),a({},i)[n]!=7||u(a({},s)).join("")!=l)})?function(i,s){for(var n=y(i),l=arguments.length,c=1,d=f.f,v=g.f;c<l;)for(var S,E=o(arguments[c++]),_=d?u(E).concat(d(E)):u(E),x=_.length,O=0;O<x;)S=_[O++],p&&!v.call(E,S)||(n[S]=E[S]);return n}:a},{"../internals/descriptors":43,"../internals/fails":51,"../internals/indexed-object":67,"../internals/object-get-own-property-symbols":97,"../internals/object-keys":100,"../internals/object-property-is-enumerable":101,"../internals/to-object":139}],91:[function(r,W,C){function p(){}var m,u=r("../internals/an-object"),f=r("../internals/object-define-properties"),g=r("../internals/enum-bug-keys"),y=r("../internals/hidden-keys"),o=r("../internals/html"),a=r("../internals/document-create-element"),r=r("../internals/shared-key"),i="prototype",s="script",n=r("IE_PROTO"),l=function(d){return"<"+s+">"+d+"</"+s+">"},c=function(){try{m=document.domain&&new ActiveXObject("htmlfile")}catch{}c=m?((d=m).write(l("")),d.close(),v=d.parentWindow.Object,d=null,v):(d=a("iframe"),v="java"+s+":",d.style.display="none",o.appendChild(d),d.src=String(v),(v=d.contentWindow.document).open(),v.write(l("document.F=Object")),v.close(),v.F);for(var d,v,S=g.length;S--;)delete c[i][g[S]];return c()};y[n]=!0,W.exports=Object.create||function(d,v){var S;return d!==null?(p[i]=u(d),S=new p,p[i]=null,S[n]=d):S=c(),v===void 0?S:f(S,v)}},{"../internals/an-object":10,"../internals/document-create-element":44,"../internals/enum-bug-keys":49,"../internals/hidden-keys":62,"../internals/html":64,"../internals/object-define-properties":92,"../internals/shared-key":120}],92:[function(t,W,C){var p=t("../internals/descriptors"),m=t("../internals/object-define-property"),u=t("../internals/an-object"),f=t("../internals/object-keys");W.exports=p?Object.defineProperties:function(g,y){u(g);for(var o,a=f(y),r=a.length,i=0;i<r;)m.f(g,o=a[i++],y[o]);return g}},{"../internals/an-object":10,"../internals/descriptors":43,"../internals/object-define-property":93,"../internals/object-keys":100}],93:[function(t,W,C){var p=t("../internals/descriptors"),m=t("../internals/ie8-dom-define"),u=t("../internals/an-object"),f=t("../internals/to-primitive"),g=Object.defineProperty;C.f=p?g:function(y,o,a){if(u(y),o=f(o,!0),u(a),m)try{return g(y,o,a)}catch{}if("get"in a||"set"in a)throw TypeError("Accessors not supported");return"value"in a&&(y[o]=a.value),y}},{"../internals/an-object":10,"../internals/descriptors":43,"../internals/ie8-dom-define":65,"../internals/to-primitive":142}],94:[function(t,W,C){var p=t("../internals/descriptors"),m=t("../internals/object-property-is-enumerable"),u=t("../internals/create-property-descriptor"),f=t("../internals/to-indexed-object"),g=t("../internals/to-primitive"),y=t("../internals/has"),o=t("../internals/ie8-dom-define"),a=Object.getOwnPropertyDescriptor;C.f=p?a:function(r,i){if(r=f(r),i=g(i,!0),o)try{return a(r,i)}catch{}if(y(r,i))return u(!m.f.call(r,i),r[i])}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/has":61,"../internals/ie8-dom-define":65,"../internals/object-property-is-enumerable":101,"../internals/to-indexed-object":136,"../internals/to-primitive":142}],95:[function(t,W,C){var p=t("../internals/to-indexed-object"),m=t("../internals/object-get-own-property-names").f,u={}.toString,f=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];W.exports.f=function(g){if(!f||u.call(g)!="[object Window]")return m(p(g));try{return m(g)}catch{return f.slice()}}},{"../internals/object-get-own-property-names":96,"../internals/to-indexed-object":136}],96:[function(t,W,C){var p=t("../internals/object-keys-internal"),m=t("../internals/enum-bug-keys").concat("length","prototype");C.f=Object.getOwnPropertyNames||function(u){return p(u,m)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":99}],97:[function(t,W,C){C.f=Object.getOwnPropertySymbols},{}],98:[function(f,W,C){var p=f("../internals/has"),m=f("../internals/to-object"),u=f("../internals/shared-key"),f=f("../internals/correct-prototype-getter"),g=u("IE_PROTO"),y=Object.prototype;W.exports=f?Object.getPrototypeOf:function(o){return o=m(o),p(o,g)?o[g]:typeof o.constructor=="function"&&o instanceof o.constructor?o.constructor.prototype:o instanceof Object?y:null}},{"../internals/correct-prototype-getter":35,"../internals/has":61,"../internals/shared-key":120,"../internals/to-object":139}],99:[function(t,W,C){var p=t("../internals/has"),m=t("../internals/to-indexed-object"),u=t("../internals/array-includes").indexOf,f=t("../internals/hidden-keys");W.exports=function(g,y){var o,a=m(g),r=0,i=[];for(o in a)!p(f,o)&&p(a,o)&&i.push(o);for(;y.length>r;)!p(a,o=y[r++])||~u(i,o)||i.push(o);return i}},{"../internals/array-includes":18,"../internals/has":61,"../internals/hidden-keys":62,"../internals/to-indexed-object":136}],100:[function(t,W,C){var p=t("../internals/object-keys-internal"),m=t("../internals/enum-bug-keys");W.exports=Object.keys||function(u){return p(u,m)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":99}],101:[function(t,W,C){"use strict";var p={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,u=m&&!p.call({1:2},1);C.f=u?function(f){return f=m(this,f),!!f&&f.enumerable}:p},{}],102:[function(t,W,C){var p=t("../internals/an-object"),m=t("../internals/a-possible-prototype");W.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var u,f=!1,g={};try{(u=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(g,[]),f=g instanceof Array}catch{}return function(y,o){return p(y),m(o),f?u.call(y,o):y.__proto__=o,y}})():void 0)},{"../internals/a-possible-prototype":6,"../internals/an-object":10}],103:[function(t,W,C){function p(y){return function(o){for(var a,r=f(o),i=u(r),s=i.length,n=0,l=[];n<s;)a=i[n++],m&&!g.call(r,a)||l.push(y?[a,r[a]]:r[a]);return l}}var m=t("../internals/descriptors"),u=t("../internals/object-keys"),f=t("../internals/to-indexed-object"),g=t("../internals/object-property-is-enumerable").f;W.exports={entries:p(!0),values:p(!1)}},{"../internals/descriptors":43,"../internals/object-keys":100,"../internals/object-property-is-enumerable":101,"../internals/to-indexed-object":136}],104:[function(t,W,C){"use strict";var p=t("../internals/to-string-tag-support"),m=t("../internals/classof");W.exports=p?{}.toString:function(){return"[object "+m(this)+"]"}},{"../internals/classof":29,"../internals/to-string-tag-support":143}],105:[function(t,W,C){var p=t("../internals/get-built-in"),m=t("../internals/object-get-own-property-names"),u=t("../internals/object-get-own-property-symbols"),f=t("../internals/an-object");W.exports=p("Reflect","ownKeys")||function(g){var y=m.f(f(g)),o=u.f;return o?y.concat(o(g)):y}},{"../internals/an-object":10,"../internals/get-built-in":57,"../internals/object-get-own-property-names":96,"../internals/object-get-own-property-symbols":97}],106:[function(t,W,C){t=t("../internals/global"),W.exports=t},{"../internals/global":60}],107:[function(t,W,C){W.exports=function(p){try{return{error:!1,value:p()}}catch(m){return{error:!0,value:m}}}},{}],108:[function(t,W,C){var p=t("../internals/an-object"),m=t("../internals/is-object"),u=t("../internals/new-promise-capability");W.exports=function(f,g){return p(f),m(g)&&g.constructor===f?g:((0,(f=u.f(f)).resolve)(g),f.promise)}},{"../internals/an-object":10,"../internals/is-object":75,"../internals/new-promise-capability":87}],109:[function(t,W,C){var p=t("../internals/redefine");W.exports=function(m,u,f){for(var g in u)p(m,g,u[g],f);return m}},{"../internals/redefine":110}],110:[function(y,W,C){var p=y("../internals/global"),m=y("../internals/create-non-enumerable-property"),u=y("../internals/has"),f=y("../internals/set-global"),g=y("../internals/inspect-source"),y=y("../internals/internal-state"),o=y.get,a=y.enforce,r=String(String).split("String");(W.exports=function(i,s,n,v){var c=!!v&&!!v.unsafe,d=!!v&&!!v.enumerable,v=!!v&&!!v.noTargetGet;typeof n=="function"&&(typeof s!="string"||u(n,"name")||m(n,"name",s),a(n).source=r.join(typeof s=="string"?s:"")),i===p?d?i[s]=n:f(s,n):(c?!v&&i[s]&&(d=!0):delete i[s],d?i[s]=n:m(i,s,n))})(Function.prototype,"toString",function(){return typeof this=="function"&&o(this).source||g(this)})},{"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/has":61,"../internals/inspect-source":69,"../internals/internal-state":71,"../internals/set-global":117}],111:[function(t,W,C){var p=t("./classof-raw"),m=t("./regexp-exec");W.exports=function(u,f){var g=u.exec;if(typeof g=="function"){if(g=g.call(u,f),typeof g!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return g}if(p(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return m.call(u,f)}},{"./classof-raw":28,"./regexp-exec":112}],112:[function(f,W,C){"use strict";var p,m,u=f("./regexp-flags"),f=f("./regexp-sticky-helpers"),g=RegExp.prototype.exec,y=String.prototype.replace,o=g,a=(p=/a/,m=/b*/g,g.call(p,"a"),g.call(m,"a"),p.lastIndex!==0||m.lastIndex!==0),r=f.UNSUPPORTED_Y||f.BROKEN_CARET,i=/()??/.exec("")[1]!==void 0;W.exports=o=a||i||r?function(s){var n,l,c,d,v=this,S=r&&v.sticky,E=u.call(v),_=v.source,x=0,O=s;return S&&((E=E.replace("y","")).indexOf("g")===-1&&(E+="g"),O=String(s).slice(v.lastIndex),0<v.lastIndex&&(!v.multiline||v.multiline&&s[v.lastIndex-1]!==`
`)&&(_="(?: "+_+")",O=" "+O,x++),l=new RegExp("^(?:"+_+")",E)),i&&(l=new RegExp("^"+_+"$(?!\\s)",E)),a&&(n=v.lastIndex),c=g.call(S?l:v,O),S?c?(c.input=c.input.slice(x),c[0]=c[0].slice(x),c.index=v.lastIndex,v.lastIndex+=c[0].length):v.lastIndex=0:a&&c&&(v.lastIndex=v.global?c.index+c[0].length:n),i&&c&&1<c.length&&y.call(c[0],l,function(){for(d=1;d<arguments.length-2;d++)arguments[d]===void 0&&(c[d]=void 0)}),c}:o},{"./regexp-flags":113,"./regexp-sticky-helpers":114}],113:[function(t,W,C){"use strict";var p=t("../internals/an-object");W.exports=function(){var m=p(this),u="";return m.global&&(u+="g"),m.ignoreCase&&(u+="i"),m.multiline&&(u+="m"),m.dotAll&&(u+="s"),m.unicode&&(u+="u"),m.sticky&&(u+="y"),u}},{"../internals/an-object":10}],114:[function(t,W,C){"use strict";t=t("./fails");function p(m,u){return RegExp(m,u)}C.UNSUPPORTED_Y=t(function(){var m=p("a","y");return m.lastIndex=2,m.exec("abcd")!=null}),C.BROKEN_CARET=t(function(){var m=p("^r","gy");return m.lastIndex=2,m.exec("str")!=null})},{"./fails":51}],115:[function(t,W,C){W.exports=function(p){if(p==null)throw TypeError("Can't call method on "+p);return p}},{}],116:[function(t,W,C){W.exports=Object.is||function(p,m){return p===m?p!==0||1/p==1/m:p!=p&&m!=m}},{}],117:[function(t,W,C){var p=t("../internals/global"),m=t("../internals/create-non-enumerable-property");W.exports=function(u,f){try{m(p,u,f)}catch{p[u]=f}return f}},{"../internals/create-non-enumerable-property":38,"../internals/global":60}],118:[function(t,W,C){"use strict";var p=t("../internals/get-built-in"),m=t("../internals/object-define-property"),u=t("../internals/well-known-symbol"),f=t("../internals/descriptors"),g=u("species");W.exports=function(o){var o=p(o),a=m.f;f&&o&&!o[g]&&a(o,g,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":43,"../internals/get-built-in":57,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],119:[function(t,W,C){var p=t("../internals/object-define-property").f,m=t("../internals/has"),u=t("../internals/well-known-symbol")("toStringTag");W.exports=function(f,g,y){f&&!m(f=y?f:f.prototype,u)&&p(f,u,{configurable:!0,value:g})}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],120:[function(t,W,C){var p=t("../internals/shared"),m=t("../internals/uid"),u=p("keys");W.exports=function(f){return u[f]||(u[f]=m(f))}},{"../internals/shared":122,"../internals/uid":147}],121:[function(p,W,C){var u=p("../internals/global"),p=p("../internals/set-global"),m="__core-js_shared__",u=u[m]||p(m,{});W.exports=u},{"../internals/global":60,"../internals/set-global":117}],122:[function(t,W,C){var p=t("../internals/is-pure"),m=t("../internals/shared-store");(W.exports=function(u,f){return m[u]||(m[u]=f!==void 0?f:{})})("versions",[]).push({version:"3.6.5",mode:p?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":76,"../internals/shared-store":121}],123:[function(t,W,C){var p=t("../internals/an-object"),m=t("../internals/a-function"),u=t("../internals/well-known-symbol")("species");W.exports=function(y,g){var y=p(y).constructor;return y===void 0||(y=p(y)[u])==null?g:m(y)}},{"../internals/a-function":5,"../internals/an-object":10,"../internals/well-known-symbol":150}],124:[function(t,W,C){var p=t("../internals/fails");W.exports=function(m){return p(function(){var u=""[m]('"');return u!==u.toLowerCase()||3<u.split('"').length})}},{"../internals/fails":51}],125:[function(t,W,C){function p(f){return function(a,r){var o,a=String(u(a)),r=m(r),i=a.length;return r<0||i<=r?f?"":void 0:(o=a.charCodeAt(r))<55296||56319<o||r+1===i||(i=a.charCodeAt(r+1))<56320||57343<i?f?a.charAt(r):o:f?a.slice(r,r+2):i-56320+(o-55296<<10)+65536}}var m=t("../internals/to-integer"),u=t("../internals/require-object-coercible");W.exports={codeAt:p(!1),charAt:p(!0)}},{"../internals/require-object-coercible":115,"../internals/to-integer":137}],126:[function(t,W,C){t=t("../internals/engine-user-agent"),W.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(t)},{"../internals/engine-user-agent":47}],127:[function(t,W,C){function p(y){return function(i,l,n){var i=String(f(i)),s=i.length,n=n===void 0?" ":String(n),l=m(l);return l<=s||n==""?i:((s=u.call(n,g((l=l-s)/n.length))).length>l&&(s=s.slice(0,l)),y?i+s:s+i)}}var m=t("../internals/to-length"),u=t("../internals/string-repeat"),f=t("../internals/require-object-coercible"),g=Math.ceil;W.exports={start:p(!1),end:p(!0)}},{"../internals/require-object-coercible":115,"../internals/string-repeat":129,"../internals/to-length":138}],128:[function(t,W,C){"use strict";function p(c){return c+22+75*(c<26)}function m(c){var d,v=[],S=(c=(function(H){for(var Y=[],oe=0,L=H.length;oe<L;){var j,R=H.charCodeAt(oe++);55296<=R&&R<=56319&&oe<L?(64512&(j=H.charCodeAt(oe++)))==56320?Y.push(((1023&R)<<10)+(1023&j)+65536):(Y.push(R),oe--):Y.push(R)}return Y})(c)).length,E=128,_=0,x=72;for(M=0;M<c.length;M++)(d=c[M])<128&&v.push(l(d));var O=v.length,T=O;for(O&&v.push("-");T<S;){for(var P=u,M=0;M<c.length;M++)E<=(d=c[M])&&d<P&&(P=d);var F=T+1;if(P-E>n((u-_)/F))throw RangeError(i);for(_+=(P-E)*F,E=P,M=0;M<c.length;M++){if((d=c[M])<E&&++_>u)throw RangeError(i);if(d==E){for(var D=_,A=f;;A+=f){var z=A<=x?1:x+g<=A?g:A-x;if(D<z)break;var G=D-z,U=f-z;v.push(l(p(z+G%U))),D=n(G/U)}v.push(l(p(D))),x=(function(H,Y,oe){var L=0;for(H=oe?n(H/o):H>>1,H+=n(H/Y);s*g>>1<H;L+=f)H=n(H/s);return n(L+(s+1)*H/(H+y))})(_,F,T==O),_=0,++T}}++_,++E}return v.join("")}var u=2147483647,f=36,g=26,y=38,o=700,a=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",s=f-1,n=Math.floor,l=String.fromCharCode;W.exports=function(c){for(var d,v=[],S=c.toLowerCase().replace(r,".").split("."),E=0;E<S.length;E++)d=S[E],v.push(a.test(d)?"xn--"+m(d):d);return v.join(".")}},{}],129:[function(t,W,C){"use strict";var p=t("../internals/to-integer"),m=t("../internals/require-object-coercible");W.exports="".repeat||function(u){var f=String(m(this)),g="",y=p(u);if(y<0||y==1/0)throw RangeError("Wrong number of repetitions");for(;0<y;(y>>>=1)&&(f+=f))1&y&&(g+=f);return g}},{"../internals/require-object-coercible":115,"../internals/to-integer":137}],130:[function(t,W,C){var p=t("../internals/fails"),m=t("../internals/whitespaces");W.exports=function(u){return p(function(){return!!m[u]()||"\u200B\x85\u180E"[u]()!="\u200B\x85\u180E"||m[u].name!==u})}},{"../internals/fails":51,"../internals/whitespaces":151}],131:[function(u,W,C){function p(y){return function(o){return o=String(m(o)),1&y&&(o=o.replace(f,"")),o=2&y?o.replace(g,""):o}}var m=u("../internals/require-object-coercible"),u="["+u("../internals/whitespaces")+"]",f=RegExp("^"+u+u+"*"),g=RegExp(u+u+"*$");W.exports={start:p(1),end:p(2),trim:p(3)}},{"../internals/require-object-coercible":115,"../internals/whitespaces":151}],132:[function(s,W,C){function p(T){return function(){O(T)}}function m(T){O(T.data)}function u(T){g.postMessage(T+"",n.protocol+"//"+n.host)}var f,g=s("../internals/global"),y=s("../internals/fails"),o=s("../internals/classof-raw"),a=s("../internals/function-bind-context"),r=s("../internals/html"),i=s("../internals/document-create-element"),s=s("../internals/engine-is-ios"),n=g.location,l=g.setImmediate,c=g.clearImmediate,d=g.process,v=g.MessageChannel,S=g.Dispatch,E=0,_={},x="onreadystatechange",O=function(T){var P;_.hasOwnProperty(T)&&(P=_[T],delete _[T],P())};l&&c||(l=function(T){for(var P=[],M=1;M<arguments.length;)P.push(arguments[M++]);return _[++E]=function(){(typeof T=="function"?T:Function(T)).apply(void 0,P)},f(E),E},c=function(T){delete _[T]},o(d)=="process"?f=function(T){d.nextTick(p(T))}:S&&S.now?f=function(T){S.now(p(T))}:v&&!s?(s=(o=new v).port2,o.port1.onmessage=m,f=a(s.postMessage,s,1)):!g.addEventListener||typeof postMessage!="function"||g.importScripts||y(u)||n.protocol==="file:"?f=x in i("script")?function(T){r.appendChild(i("script"))[x]=function(){r.removeChild(this),O(T)}}:function(T){setTimeout(p(T),0)}:(f=u,g.addEventListener("message",m,!1))),W.exports={set:l,clear:c}},{"../internals/classof-raw":28,"../internals/document-create-element":44,"../internals/engine-is-ios":46,"../internals/fails":51,"../internals/function-bind-context":55,"../internals/global":60,"../internals/html":64}],133:[function(t,W,C){var p=t("../internals/classof-raw");W.exports=function(m){if(typeof m!="number"&&p(m)!="Number")throw TypeError("Incorrect invocation");return+m}},{"../internals/classof-raw":28}],134:[function(t,W,C){var p=t("../internals/to-integer"),m=Math.max,u=Math.min;W.exports=function(f,g){return f=p(f),f<0?m(f+g,0):u(f,g)}},{"../internals/to-integer":137}],135:[function(t,W,C){var p=t("../internals/to-integer"),m=t("../internals/to-length");W.exports=function(f){if(f===void 0)return 0;var f=p(f),g=m(f);if(f!==g)throw RangeError("Wrong length or index");return g}},{"../internals/to-integer":137,"../internals/to-length":138}],136:[function(t,W,C){var p=t("../internals/indexed-object"),m=t("../internals/require-object-coercible");W.exports=function(u){return p(m(u))}},{"../internals/indexed-object":67,"../internals/require-object-coercible":115}],137:[function(t,W,C){var p=Math.ceil,m=Math.floor;W.exports=function(u){return isNaN(u=+u)?0:(0<u?m:p)(u)}},{}],138:[function(t,W,C){var p=t("../internals/to-integer"),m=Math.min;W.exports=function(u){return 0<u?m(p(u),9007199254740991):0}},{"../internals/to-integer":137}],139:[function(t,W,C){var p=t("../internals/require-object-coercible");W.exports=function(m){return Object(p(m))}},{"../internals/require-object-coercible":115}],140:[function(t,W,C){var p=t("../internals/to-positive-integer");W.exports=function(m,u){if(m=p(m),m%u)throw RangeError("Wrong offset");return m}},{"../internals/to-positive-integer":141}],141:[function(t,W,C){var p=t("../internals/to-integer");W.exports=function(m){if(m=p(m),m<0)throw RangeError("The argument can't be less than 0");return m}},{"../internals/to-integer":137}],142:[function(t,W,C){var p=t("../internals/is-object");W.exports=function(m,u){if(!p(m))return m;var f,g;if(u&&typeof(f=m.toString)=="function"&&!p(g=f.call(m))||typeof(f=m.valueOf)=="function"&&!p(g=f.call(m))||!u&&typeof(f=m.toString)=="function"&&!p(g=f.call(m)))return g;throw TypeError("Can't convert object to primitive value")}},{"../internals/is-object":75}],143:[function(t,W,C){var p={};p[t("../internals/well-known-symbol")("toStringTag")]="z",W.exports=String(p)==="[object z]"},{"../internals/well-known-symbol":150}],144:[function(t,W,C){"use strict";function p(he,me){for(var _e=0,Ae=me.length,Se=new(Q(he))(Ae);_e<Ae;)Se[_e]=me[_e++];return Se}function m(he,me){j(he,me,{get:function(){return oe(this)[me]}})}function u(he){return he instanceof K||(he=O(he))=="ArrayBuffer"||he=="SharedArrayBuffer"}function f(he,me){return le(he)&&typeof me!="symbol"&&me in he&&String(+me)==String(me)}function g(he,me){return f(he,me=_(me,!0))?c(2,he[me]):R(he,me)}function y(he,me,_e){return!(f(he,me=_(me,!0))&&T(_e)&&x(_e,"value"))||x(_e,"get")||x(_e,"set")||_e.configurable||x(_e,"writable")&&!_e.writable||x(_e,"enumerable")&&!_e.enumerable?j(he,me,_e):(he[me]=_e.value,he)}var o=t("../internals/export"),a=t("../internals/global"),r=t("../internals/descriptors"),i=t("../internals/typed-array-constructors-require-wrappers"),s=t("../internals/array-buffer-view-core"),n=t("../internals/array-buffer"),l=t("../internals/an-instance"),c=t("../internals/create-property-descriptor"),d=t("../internals/create-non-enumerable-property"),v=t("../internals/to-length"),S=t("../internals/to-index"),E=t("../internals/to-offset"),_=t("../internals/to-primitive"),x=t("../internals/has"),O=t("../internals/classof"),T=t("../internals/is-object"),P=t("../internals/object-create"),M=t("../internals/object-set-prototype-of"),F=t("../internals/object-get-own-property-names").f,D=t("../internals/typed-array-from"),A=t("../internals/array-iteration").forEach,z=t("../internals/set-species"),G=t("../internals/object-define-property"),U=t("../internals/object-get-own-property-descriptor"),H=t("../internals/internal-state"),Y=t("../internals/inherit-if-required"),oe=H.get,L=H.set,j=G.f,R=U.f,N=Math.round,X=a.RangeError,K=n.ArrayBuffer,re=n.DataView,ie=s.NATIVE_ARRAY_BUFFER_VIEWS,ee=s.TYPED_ARRAY_TAG,ae=s.TypedArray,ue=s.TypedArrayPrototype,Q=s.aTypedArrayConstructor,le=s.isTypedArray,fe="BYTES_PER_ELEMENT",ve="Wrong length";r?(ie||(U.f=g,G.f=y,m(ue,"buffer"),m(ue,"byteOffset"),m(ue,"byteLength"),m(ue,"length")),o({target:"Object",stat:!0,forced:!ie},{getOwnPropertyDescriptor:g,defineProperty:y}),W.exports=function(ge,me,_e){function Ae(xe,Z){j(xe,Z,{get:function(){var $=this,q=Z;return($=oe($)).view[Ne](q*Se+$.byteOffset,!0)},set:function($){var q=this,te=Z;q=oe(q),_e&&($=($=N($))<0?0:255<$?255:255&$),q.view[Be](te*Se+q.byteOffset,$,!0)},enumerable:!0})}var Se=ge.match(/\d+$/)[0]/8,Ge=ge+(_e?"Clamped":"")+"Array",Ne="get"+ge,Be="set"+ge,He=a[Ge],Ve=He,ge=Ve&&Ve.prototype,Ce={};ie?i&&(Ve=me(function(xe,Z,$,q){return l(xe,Ve,Ge),Y(T(Z)?u(Z)?q!==void 0?new He(Z,E($,Se),q):$!==void 0?new He(Z,E($,Se)):new He(Z):le(Z)?p(Ve,Z):D.call(Ve,Z):new He(S(Z)),xe,Ve)}),M&&M(Ve,ae),A(F(He),function(xe){xe in Ve||d(Ve,xe,He[xe])}),Ve.prototype=ge):(Ve=me(function(xe,Z,$,q){l(xe,Ve,Ge);var te,pe,je=0,ke=0;if(T(Z)){if(!u(Z))return le(Z)?p(Ve,Z):D.call(Ve,Z);var Ie=Z,ke=E($,Se),$=Z.byteLength;if(q===void 0){if($%Se||(te=$-ke)<0)throw X(ve)}else if($<(te=v(q)*Se)+ke)throw X(ve);pe=te/Se}else pe=S(Z),Ie=new K(te=pe*Se);for(L(xe,{buffer:Ie,byteOffset:ke,byteLength:te,length:pe,view:new re(Ie)});je<pe;)Ae(xe,je++)}),M&&M(Ve,ae),ge=Ve.prototype=P(ue)),ge.constructor!==Ve&&d(ge,"constructor",Ve),ee&&d(ge,ee,Ge),Ce[Ge]=Ve,o({global:!0,forced:Ve!=He,sham:!ie},Ce),fe in Ve||d(Ve,fe,Se),fe in ge||d(ge,fe,Se),z(Ge)}):W.exports=function(){}},{"../internals/an-instance":9,"../internals/array-buffer":13,"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/export":50,"../internals/global":60,"../internals/has":61,"../internals/inherit-if-required":68,"../internals/internal-state":71,"../internals/is-object":75,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/object-set-prototype-of":102,"../internals/set-species":118,"../internals/to-index":135,"../internals/to-length":138,"../internals/to-offset":140,"../internals/to-primitive":142,"../internals/typed-array-constructors-require-wrappers":145,"../internals/typed-array-from":146}],145:[function(f,W,C){var p=f("../internals/global"),m=f("../internals/fails"),u=f("../internals/check-correctness-of-iteration"),f=f("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,g=p.ArrayBuffer,y=p.Int8Array;W.exports=!f||!m(function(){y(1)})||!m(function(){new y(-1)})||!u(function(o){new y,new y(null),new y(1.5),new y(o)},!0)||m(function(){return new y(new g(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":12,"../internals/check-correctness-of-iteration":27,"../internals/fails":51,"../internals/global":60}],146:[function(t,W,C){var p=t("../internals/to-object"),m=t("../internals/to-length"),u=t("../internals/get-iterator-method"),f=t("../internals/is-array-iterator-method"),g=t("../internals/function-bind-context"),y=t("../internals/array-buffer-view-core").aTypedArrayConstructor;W.exports=function(o){var a,r,i,s,n,l,c=p(o),d=arguments.length,v=1<d?arguments[1]:void 0,S=v!==void 0,E=u(c);if(E!=null&&!f(E))for(l=(n=E.call(c)).next,c=[];!(s=l.call(n)).done;)c.push(s.value);for(S&&2<d&&(v=g(v,arguments[2],2)),r=m(c.length),i=new(y(this))(r),a=0;a<r;a++)i[a]=S?v(c[a],a):c[a];return i}},{"../internals/array-buffer-view-core":12,"../internals/function-bind-context":55,"../internals/get-iterator-method":58,"../internals/is-array-iterator-method":72,"../internals/to-length":138,"../internals/to-object":139}],147:[function(t,W,C){var p=0,m=Math.random();W.exports=function(u){return"Symbol("+String(u===void 0?"":u)+")_"+(++p+m).toString(36)}},{}],148:[function(t,W,C){t=t("../internals/native-symbol"),W.exports=t&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":84}],149:[function(t,W,C){t=t("../internals/well-known-symbol"),C.f=t},{"../internals/well-known-symbol":150}],150:[function(y,W,C){var p=y("../internals/global"),m=y("../internals/shared"),u=y("../internals/has"),f=y("../internals/uid"),g=y("../internals/native-symbol"),y=y("../internals/use-symbol-as-uid"),o=m("wks"),a=p.Symbol,r=y?a:a&&a.withoutSetter||f;W.exports=function(i){return u(o,i)||(g&&u(a,i)?o[i]=a[i]:o[i]=r("Symbol."+i)),o[i]}},{"../internals/global":60,"../internals/has":61,"../internals/native-symbol":84,"../internals/shared":122,"../internals/uid":147,"../internals/use-symbol-as-uid":148}],151:[function(t,W,C){W.exports=`	
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],152:[function(u,W,C){"use strict";var p=u("../internals/export"),m=u("../internals/global"),g=u("../internals/array-buffer"),u=u("../internals/set-species"),f="ArrayBuffer",g=g[f];p({global:!0,forced:m[f]!==g},{ArrayBuffer:g}),u(f)},{"../internals/array-buffer":13,"../internals/export":50,"../internals/global":60,"../internals/set-species":118}],153:[function(c,W,C){"use strict";var p=c("../internals/export"),m=c("../internals/fails"),u=c("../internals/is-array"),f=c("../internals/is-object"),g=c("../internals/to-object"),y=c("../internals/to-length"),o=c("../internals/create-property"),a=c("../internals/array-species-create"),r=c("../internals/array-method-has-species-support"),l=c("../internals/well-known-symbol"),c=c("../internals/engine-v8-version"),i=l("isConcatSpreadable"),s=9007199254740991,n="Maximum allowed index exceeded",l=51<=c||!m(function(){var d=[];return d[i]=!1,d.concat()[0]!==d}),c=r("concat");p({target:"Array",proto:!0,forced:!l||!c},{concat:function(d){for(var v,S,E,_,x,O=g(this),T=a(O,0),P=0,M=-1,F=arguments.length;M<F;M++)if(x=void 0,!f(_=E=M===-1?O:arguments[M])||((x=_[i])!==void 0?!x:!u(_))){if(s<=P)throw TypeError(n);o(T,P++,E)}else{if(S=y(E.length),s<P+S)throw TypeError(n);for(v=0;v<S;v++,P++)v in E&&o(T,P,E[v])}return T.length=P,T}})},{"../internals/array-method-has-species-support":21,"../internals/array-species-create":25,"../internals/create-property":40,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/fails":51,"../internals/is-array":73,"../internals/is-object":75,"../internals/to-length":138,"../internals/to-object":139,"../internals/well-known-symbol":150}],154:[function(u,W,C){var p=u("../internals/export"),m=u("../internals/array-copy-within"),u=u("../internals/add-to-unscopables");p({target:"Array",proto:!0},{copyWithin:m}),u("copyWithin")},{"../internals/add-to-unscopables":7,"../internals/array-copy-within":14,"../internals/export":50}],155:[function(f,W,C){"use strict";var p=f("../internals/export"),m=f("../internals/array-iteration").every,u=f("../internals/array-method-is-strict"),f=f("../internals/array-method-uses-to-length"),u=u("every"),f=f("every");p({target:"Array",proto:!0,forced:!u||!f},{every:function(g){return m(this,g,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],156:[function(u,W,C){var p=u("../internals/export"),m=u("../internals/array-fill"),u=u("../internals/add-to-unscopables");p({target:"Array",proto:!0},{fill:m}),u("fill")},{"../internals/add-to-unscopables":7,"../internals/array-fill":15,"../internals/export":50}],157:[function(f,W,C){"use strict";var p=f("../internals/export"),m=f("../internals/array-iteration").filter,u=f("../internals/array-method-has-species-support"),f=f("../internals/array-method-uses-to-length"),u=u("filter"),f=f("filter");p({target:"Array",proto:!0,forced:!u||!f},{filter:function(g){return m(this,g,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/export":50}],158:[function(y,W,C){"use strict";var p=y("../internals/export"),m=y("../internals/array-iteration").findIndex,u=y("../internals/add-to-unscopables"),y=y("../internals/array-method-uses-to-length"),f="findIndex",g=!0,y=y(f);f in[]&&Array(1)[f](function(){g=!1}),p({target:"Array",proto:!0,forced:g||!y},{findIndex:function(o){return m(this,o,1<arguments.length?arguments[1]:void 0)}}),u(f)},{"../internals/add-to-unscopables":7,"../internals/array-iteration":19,"../internals/array-method-uses-to-length":23,"../internals/export":50}],159:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/flatten-into-array"),u=t("../internals/to-object"),f=t("../internals/to-length"),g=t("../internals/a-function"),y=t("../internals/array-species-create");p({target:"Array",proto:!0},{flatMap:function(o){var a,r=u(this),i=f(r.length);return g(o),(a=y(r,0)).length=m(a,r,r,i,0,1,o,1<arguments.length?arguments[1]:void 0),a}})},{"../internals/a-function":5,"../internals/array-species-create":25,"../internals/export":50,"../internals/flatten-into-array":53,"../internals/to-length":138,"../internals/to-object":139}],160:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/flatten-into-array"),u=t("../internals/to-object"),f=t("../internals/to-length"),g=t("../internals/to-integer"),y=t("../internals/array-species-create");p({target:"Array",proto:!0},{flat:function(){var o=arguments.length?arguments[0]:void 0,a=u(this),r=f(a.length),i=y(a,0);return i.length=m(i,a,a,r,0,o===void 0?1:g(o)),i}})},{"../internals/array-species-create":25,"../internals/export":50,"../internals/flatten-into-array":53,"../internals/to-integer":137,"../internals/to-length":138,"../internals/to-object":139}],161:[function(m,W,C){"use strict";var p=m("../internals/export"),m=m("../internals/array-for-each");p({target:"Array",proto:!0,forced:[].forEach!=m},{forEach:m})},{"../internals/array-for-each":16,"../internals/export":50}],162:[function(t,W,C){var p=t("../internals/export"),m=t("../internals/array-from");p({target:"Array",stat:!0,forced:!t("../internals/check-correctness-of-iteration")(function(u){Array.from(u)})},{from:m})},{"../internals/array-from":17,"../internals/check-correctness-of-iteration":27,"../internals/export":50}],163:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/array-includes").includes,u=t("../internals/add-to-unscopables");p({target:"Array",proto:!0,forced:!t("../internals/array-method-uses-to-length")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(f){return m(this,f,1<arguments.length?arguments[1]:void 0)}}),u("includes")},{"../internals/add-to-unscopables":7,"../internals/array-includes":18,"../internals/array-method-uses-to-length":23,"../internals/export":50}],164:[function(y,W,C){"use strict";var p=y("../internals/export"),m=y("../internals/array-includes").indexOf,g=y("../internals/array-method-is-strict"),y=y("../internals/array-method-uses-to-length"),u=[].indexOf,f=!!u&&1/[1].indexOf(1,-0)<0,g=g("indexOf"),y=y("indexOf",{ACCESSORS:!0,1:0});p({target:"Array",proto:!0,forced:f||!g||!y},{indexOf:function(o){return f?u.apply(this,arguments)||0:m(this,o,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-includes":18,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],165:[function(g,W,C){"use strict";var p=g("../internals/to-indexed-object"),m=g("../internals/add-to-unscopables"),u=g("../internals/iterators"),f=g("../internals/internal-state"),g=g("../internals/define-iterator"),y="Array Iterator",o=f.set,a=f.getterFor(y);W.exports=g(Array,"Array",function(r,i){o(this,{type:y,target:p(r),index:0,kind:i})},function(){var r=a(this),i=r.target,s=r.kind,n=r.index++;return!i||n>=i.length?{value:r.target=void 0,done:!0}:s=="keys"?{value:n,done:!1}:s=="values"?{value:i[n],done:!1}:{value:[n,i[n]],done:!1}},"values"),u.Arguments=u.Array,m("keys"),m("values"),m("entries")},{"../internals/add-to-unscopables":7,"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/iterators":80,"../internals/to-indexed-object":136}],166:[function(g,W,C){"use strict";var p=g("../internals/export"),f=g("../internals/indexed-object"),m=g("../internals/to-indexed-object"),g=g("../internals/array-method-is-strict"),u=[].join,f=f!=Object,g=g("join",",");p({target:"Array",proto:!0,forced:f||!g},{join:function(y){return u.call(m(this),y===void 0?",":y)}})},{"../internals/array-method-is-strict":22,"../internals/export":50,"../internals/indexed-object":67,"../internals/to-indexed-object":136}],167:[function(m,W,C){var p=m("../internals/export"),m=m("../internals/array-last-index-of");p({target:"Array",proto:!0,forced:m!==[].lastIndexOf},{lastIndexOf:m})},{"../internals/array-last-index-of":20,"../internals/export":50}],168:[function(f,W,C){"use strict";var p=f("../internals/export"),m=f("../internals/array-iteration").map,u=f("../internals/array-method-has-species-support"),f=f("../internals/array-method-uses-to-length"),u=u("map"),f=f("map");p({target:"Array",proto:!0,forced:!u||!f},{map:function(g){return m(this,g,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/export":50}],169:[function(i,W,C){"use strict";var p=i("../internals/export"),m=i("../internals/is-object"),u=i("../internals/is-array"),f=i("../internals/to-absolute-index"),g=i("../internals/to-length"),y=i("../internals/to-indexed-object"),o=i("../internals/create-property"),a=i("../internals/well-known-symbol"),r=i("../internals/array-method-has-species-support"),i=i("../internals/array-method-uses-to-length"),r=r("slice"),i=i("slice",{ACCESSORS:!0,0:0,1:2}),s=a("species"),n=[].slice,l=Math.max;p({target:"Array",proto:!0,forced:!r||!i},{slice:function(c,d){var v,S,E,_=y(this),x=g(_.length),O=f(c,x),T=f(d===void 0?x:d,x);if(u(_)&&((v=typeof(v=_.constructor)=="function"&&(v===Array||u(v.prototype))||m(v)&&(v=v[s])===null?void 0:v)===Array||v===void 0))return n.call(_,O,T);for(S=new(v===void 0?Array:v)(l(T-O,0)),E=0;O<T;O++,E++)O in _&&o(S,E,_[O]);return S.length=E,S}})},{"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/create-property":40,"../internals/export":50,"../internals/is-array":73,"../internals/is-object":75,"../internals/to-absolute-index":134,"../internals/to-indexed-object":136,"../internals/to-length":138,"../internals/well-known-symbol":150}],170:[function(f,W,C){"use strict";var p=f("../internals/export"),m=f("../internals/array-iteration").some,u=f("../internals/array-method-is-strict"),f=f("../internals/array-method-uses-to-length"),u=u("some"),f=f("some");p({target:"Array",proto:!0,forced:!u||!f},{some:function(g){return m(this,g,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],171:[function(r,W,C){"use strict";var p=r("../internals/export"),m=r("../internals/to-absolute-index"),u=r("../internals/to-integer"),f=r("../internals/to-length"),g=r("../internals/to-object"),y=r("../internals/array-species-create"),o=r("../internals/create-property"),a=r("../internals/array-method-has-species-support"),r=r("../internals/array-method-uses-to-length"),a=a("splice"),r=r("splice",{ACCESSORS:!0,0:0,1:2}),i=Math.max,s=Math.min;p({target:"Array",proto:!0,forced:!a||!r},{splice:function(P,l){var c,d,v,S,E,_,x=g(this),O=f(x.length),T=m(P,O),P=arguments.length;if(P===0?c=d=0:d=P===1?(c=0,O-T):(c=P-2,s(i(u(l),0),O-T)),9007199254740991<O+c-d)throw TypeError("Maximum allowed length exceeded");for(v=y(x,d),S=0;S<d;S++)(E=T+S)in x&&o(v,S,x[E]);if(c<(v.length=d)){for(S=T;S<O-d;S++)_=S+c,(E=S+d)in x?x[_]=x[E]:delete x[_];for(S=O;O-d+c<S;S--)delete x[S-1]}else if(d<c)for(S=O-d;T<S;S--)_=S+c-1,(E=S+d-1)in x?x[_]=x[E]:delete x[_];for(S=0;S<c;S++)x[S+T]=arguments[S+2];return x.length=O-d+c,v}})},{"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/array-species-create":25,"../internals/create-property":40,"../internals/export":50,"../internals/to-absolute-index":134,"../internals/to-integer":137,"../internals/to-length":138,"../internals/to-object":139}],172:[function(t,W,C){t("../internals/add-to-unscopables")("flatMap")},{"../internals/add-to-unscopables":7}],173:[function(t,W,C){t("../internals/add-to-unscopables")("flat")},{"../internals/add-to-unscopables":7}],174:[function(m,W,C){var p=m("../internals/descriptors"),m=m("../internals/object-define-property").f,u=Function.prototype,f=u.toString,g=/^\s*function ([^ (]*)/;!p||"name"in u||m(u,"name",{configurable:!0,get:function(){try{return f.call(this).match(g)[1]}catch{return""}}})},{"../internals/descriptors":43,"../internals/object-define-property":93}],175:[function(m,W,C){"use strict";var p=m("../internals/collection"),m=m("../internals/collection-strong");W.exports=p("Map",function(u){return function(){return u(this,arguments.length?arguments[0]:void 0)}},m)},{"../internals/collection":32,"../internals/collection-strong":30}],176:[function(p,W,C){var p=p("../internals/export"),m=Math.hypot,u=Math.abs,f=Math.sqrt;p({target:"Math",stat:!0,forced:!!m&&m(1/0,NaN)!==1/0},{hypot:function(g,y){for(var o,a,r=0,i=0,s=arguments.length,n=0;i<s;)n<(o=u(arguments[i++]))?(r=r*(a=n/o)*a+1,n=o):r+=0<o?(a=o/n)*a:o;return n===1/0?1/0:n*f(r)}})},{"../internals/export":50}],177:[function(p,W,C){var p=p("../internals/export"),m=Math.log,u=Math.LN2;p({target:"Math",stat:!0},{log2:function(f){return m(f)/u}})},{"../internals/export":50}],178:[function(t,W,C){t("../internals/export")({target:"Math",stat:!0},{sign:t("../internals/math-sign")})},{"../internals/export":50,"../internals/math-sign":81}],179:[function(t,W,C){"use strict";function p(M){var F,D,A,z,G,U,H,Y=r(M,!1);if(typeof Y=="string"&&2<Y.length){if((M=(Y=d(Y)).charCodeAt(0))===43||M===45){if((F=Y.charCodeAt(2))===88||F===120)return NaN}else if(M===48){switch(Y.charCodeAt(1)){case 66:case 98:D=2,A=49;break;case 79:case 111:D=8,A=55;break;default:return+Y}for(G=(z=Y.slice(2)).length,U=0;U<G;U++)if((H=z.charCodeAt(U))<48||A<H)return NaN;return parseInt(z,D)}}return+Y}var m=t("../internals/descriptors"),u=t("../internals/global"),f=t("../internals/is-forced"),g=t("../internals/redefine"),y=t("../internals/has"),o=t("../internals/classof-raw"),a=t("../internals/inherit-if-required"),r=t("../internals/to-primitive"),i=t("../internals/fails"),s=t("../internals/object-create"),n=t("../internals/object-get-own-property-names").f,l=t("../internals/object-get-own-property-descriptor").f,c=t("../internals/object-define-property").f,d=t("../internals/string-trim").trim,v="Number",S=u[v],E=S.prototype,_=o(s(E))==v;if(f(v,!S(" 0o1")||!S("0b1")||S("+0x1"))){for(var x,O=function(F){var F=arguments.length<1?0:F,D=this;return D instanceof O&&(_?i(function(){E.valueOf.call(D)}):o(D)!=v)?a(new S(p(F)),D,O):p(F)},T=m?n(S):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),P=0;T.length>P;P++)y(S,x=T[P])&&!y(O,x)&&c(O,x,l(S,x));(O.prototype=E).constructor=O,g(u,v,O)}},{"../internals/classof-raw":28,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/has":61,"../internals/inherit-if-required":68,"../internals/is-forced":74,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/string-trim":131,"../internals/to-primitive":142}],180:[function(t,W,C){t("../internals/export")({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},{"../internals/export":50}],181:[function(t,W,C){t("../internals/export")({target:"Number",stat:!0},{isFinite:t("../internals/number-is-finite")})},{"../internals/export":50,"../internals/number-is-finite":89}],182:[function(y,W,C){"use strict";function p(r,i,s){return i===0?s:i%2==1?p(r,i-1,s*r):p(r*r,i/2,s)}var m=y("../internals/export"),u=y("../internals/to-integer"),f=y("../internals/this-number-value"),g=y("../internals/string-repeat"),y=y("../internals/fails"),o=1 .toFixed,a=Math.floor;m({target:"Number",proto:!0,forced:o&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128")||!y(function(){o.call({})})},{toFixed:function(v){function i(x,O){for(var T=-1,P=O;++T<6;)P+=x*S[T],S[T]=P%1e7,P=a(P/1e7)}function s(x){for(var O=6,T=0;0<=--O;)T+=S[O],S[O]=a(T/x),T=T%x*1e7}function n(){for(var x,O=6,T="";0<=--O;)T===""&&O!==0&&S[O]===0||(x=String(S[O]),T=T===""?x:T+g.call("0",7-x.length)+x);return T}var l,c,d=f(this),v=u(v),S=[0,0,0,0,0,0],E="",_="0";if(v<0||20<v)throw RangeError("Incorrect fraction digits");if(d!=d)return"NaN";if(d<=-1e21||1e21<=d)return String(d);if(d<0&&(E="-",d=-d),1e-21<d)if(d=(l=(function(x){for(var O=0,T=x;4096<=T;)O+=12,T/=4096;for(;2<=T;)O+=1,T/=2;return O})(d*p(2,69,1))-69)<0?d*p(2,-l,1):d/p(2,l,1),d*=4503599627370496,0<(l=52-l)){for(i(0,d),c=v;7<=c;)i(1e7,0),c-=7;for(i(p(10,c,1),0),c=l-1;23<=c;)s(1<<23),c-=23;s(1<<c),i(1,1),s(2),_=n()}else i(0,d),i(1<<-l,0),_=n()+g.call("0",v);return _=0<v?E+((d=_.length)<=v?"0."+g.call("0",v-d)+_:_.slice(0,d-v)+"."+_.slice(d-v)):E+_}})},{"../internals/export":50,"../internals/fails":51,"../internals/string-repeat":129,"../internals/this-number-value":133,"../internals/to-integer":137}],183:[function(m,W,C){var p=m("../internals/export"),m=m("../internals/object-assign");p({target:"Object",stat:!0,forced:Object.assign!==m},{assign:m})},{"../internals/export":50,"../internals/object-assign":90}],184:[function(t,W,C){var p=t("../internals/export"),m=t("../internals/object-to-array").entries;p({target:"Object",stat:!0},{entries:function(u){return m(u)}})},{"../internals/export":50,"../internals/object-to-array":103}],185:[function(t,W,C){var p=t("../internals/export"),m=t("../internals/iterate"),u=t("../internals/create-property");p({target:"Object",stat:!0},{fromEntries:function(f){var g={};return m(f,function(y,o){u(g,y,o)},void 0,!0),g}})},{"../internals/create-property":40,"../internals/export":50,"../internals/iterate":78}],186:[function(f,W,C){var p=f("../internals/export"),g=f("../internals/fails"),m=f("../internals/to-indexed-object"),u=f("../internals/object-get-own-property-descriptor").f,f=f("../internals/descriptors"),g=g(function(){u(1)});p({target:"Object",stat:!0,forced:!f||g,sham:!f},{getOwnPropertyDescriptor:function(y,o){return u(m(y),o)}})},{"../internals/descriptors":43,"../internals/export":50,"../internals/fails":51,"../internals/object-get-own-property-descriptor":94,"../internals/to-indexed-object":136}],187:[function(u,W,C){var p=u("../internals/export"),m=u("../internals/fails"),u=u("../internals/object-get-own-property-names-external").f;p({target:"Object",stat:!0,forced:m(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:u})},{"../internals/export":50,"../internals/fails":51,"../internals/object-get-own-property-names-external":95}],188:[function(g,W,C){var p=g("../internals/export"),m=g("../internals/fails"),u=g("../internals/to-object"),f=g("../internals/object-get-prototype-of"),g=g("../internals/correct-prototype-getter");p({target:"Object",stat:!0,forced:m(function(){f(1)}),sham:!g},{getPrototypeOf:function(y){return f(u(y))}})},{"../internals/correct-prototype-getter":35,"../internals/export":50,"../internals/fails":51,"../internals/object-get-prototype-of":98,"../internals/to-object":139}],189:[function(t,W,C){var p=t("../internals/export"),m=t("../internals/to-object"),u=t("../internals/object-keys");p({target:"Object",stat:!0,forced:t("../internals/fails")(function(){u(1)})},{keys:function(f){return u(m(f))}})},{"../internals/export":50,"../internals/fails":51,"../internals/object-keys":100,"../internals/to-object":139}],190:[function(u,W,C){var p=u("../internals/to-string-tag-support"),m=u("../internals/redefine"),u=u("../internals/object-to-string");p||m(Object.prototype,"toString",u,{unsafe:!0})},{"../internals/object-to-string":104,"../internals/redefine":110,"../internals/to-string-tag-support":143}],191:[function(_e,W,C){"use strict";var p,m,u,f,g=_e("../internals/export"),y=_e("../internals/is-pure"),o=_e("../internals/global"),a=_e("../internals/get-built-in"),r=_e("../internals/native-promise-constructor"),i=_e("../internals/redefine"),s=_e("../internals/redefine-all"),n=_e("../internals/set-to-string-tag"),l=_e("../internals/set-species"),c=_e("../internals/is-object"),d=_e("../internals/a-function"),v=_e("../internals/an-instance"),S=_e("../internals/classof-raw"),E=_e("../internals/inspect-source"),_=_e("../internals/iterate"),x=_e("../internals/check-correctness-of-iteration"),O=_e("../internals/species-constructor"),T=_e("../internals/task").set,P=_e("../internals/microtask"),M=_e("../internals/promise-resolve"),F=_e("../internals/host-report-errors"),D=_e("../internals/new-promise-capability"),A=_e("../internals/perform"),z=_e("../internals/internal-state"),G=_e("../internals/is-forced"),Ae=_e("../internals/well-known-symbol"),U=_e("../internals/engine-v8-version"),H=Ae("species"),Y="Promise",oe=z.get,L=z.set,j=z.getterFor(Y),R=r,N=o.TypeError,X=o.document,K=o.process,re=a("fetch"),ie=D.f,ee=ie,ae=S(K)=="process",ue=!!(X&&X.createEvent&&o.dispatchEvent),Q="unhandledrejection",le="rejectionhandled",fe=1,ve=2,he=1,me=2,_e=G(Y,function(){var Ce,xe;return E(R)===String(R)&&(U===66||!ae&&typeof PromiseRejectionEvent!="function")?!0:!(!y||R.prototype.finally)||!(51<=U&&/native code/.test(R))&&(xe=function(Z){Z(function(){},function(){})},((Ce=R.resolve(1)).constructor={})[H]=xe,!(Ce.then(function(){})instanceof xe))}),Ae=_e||!x(function(Ce){R.all(Ce).catch(function(){})}),Se=function(Ce){var xe;return!(!c(Ce)||typeof(xe=Ce.then)!="function")&&xe},Ge=function(Ce,xe,Z){var $;xe.notified||(xe.notified=!0,$=xe.reactions,P(function(){for(var q,te,pe=xe.value,je=xe.state==fe,ke=0;$.length>ke;){var Ie,Fe,Ue,We=$[ke++],rt=je?We.ok:We.fail,et=We.resolve,Ye=We.reject,tt=We.domain;try{rt?(je||(xe.rejection===me&&(function($e,pt){T.call(o,function(){ae?K.emit("rejectionHandled",$e):Ne(le,$e,pt.value)})})(Ce,xe),xe.rejection=he),rt===!0?Ie=pe:(tt&&tt.enter(),Ie=rt(pe),tt&&(tt.exit(),Ue=!0)),Ie===We.promise?Ye(N("Promise-chain cycle")):(Fe=Se(Ie))?Fe.call(Ie,et,Ye):et(Ie)):Ye(pe)}catch($e){tt&&!Ue&&tt.exit(),Ye($e)}}xe.reactions=[],xe.notified=!1,Z&&!xe.rejection&&(q=Ce,te=xe,T.call(o,function(){var $e=te.value,pt=Be(te);if(pt&&(pt=A(function(){ae?K.emit("unhandledRejection",$e,q):Ne(Q,q,$e)}),te.rejection=ae||Be(te)?me:he,pt.error))throw pt.value}))}))},Ne=function(Ce,xe,Z){var $;ue?(($=X.createEvent("Event")).promise=xe,$.reason=Z,$.initEvent(Ce,!1,!0),o.dispatchEvent($)):$={promise:xe,reason:Z},(xe=o["on"+Ce])?xe($):Ce===Q&&F("Unhandled promise rejection",Z)},Be=function(Ce){return Ce.rejection!==he&&!Ce.parent},He=function(Ce,xe,Z,$){return function(q){Ce(xe,Z,q,$)}},Ve=function(Ce,xe,Z,$){xe.done||(xe.done=!0,(xe=$||xe).value=Z,xe.state=ve,Ge(Ce,xe,!0))},ge=function(Ce,xe,Z,$){if(!xe.done){xe.done=!0,$&&(xe=$);try{if(Ce===Z)throw N("Promise can't be resolved itself");var q=Se(Z);q?P(function(){var te={done:!1};try{q.call(Z,He(ge,Ce,te,xe),He(Ve,Ce,te,xe))}catch(pe){Ve(Ce,te,pe,xe)}}):(xe.value=Z,xe.state=fe,Ge(Ce,xe,!1))}catch(te){Ve(Ce,{done:!1},te,xe)}}};_e&&(R=function(Ce){v(this,R,Y),d(Ce),p.call(this);var xe=oe(this);try{Ce(He(ge,this,xe),He(Ve,this,xe))}catch(Z){Ve(this,xe,Z)}},(p=function(Ce){L(this,{type:Y,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=s(R.prototype,{then:function(Ce,xe){var Z=j(this),$=ie(O(this,R));return $.ok=typeof Ce!="function"||Ce,$.fail=typeof xe=="function"&&xe,$.domain=ae?K.domain:void 0,Z.parent=!0,Z.reactions.push($),Z.state!=0&&Ge(this,Z,!1),$.promise},catch:function(Ce){return this.then(void 0,Ce)}}),m=function(){var Ce=new p,xe=oe(Ce);this.promise=Ce,this.resolve=He(ge,Ce,xe),this.reject=He(Ve,Ce,xe)},D.f=ie=function(Ce){return Ce===R||Ce===u?new m:ee(Ce)},y||typeof r!="function"||(f=r.prototype.then,i(r.prototype,"then",function(Ce,xe){var Z=this;return new R(function($,q){f.call(Z,$,q)}).then(Ce,xe)},{unsafe:!0}),typeof re=="function"&&g({global:!0,enumerable:!0,forced:!0},{fetch:function(Ce){return M(R,re.apply(o,arguments))}}))),g({global:!0,wrap:!0,forced:_e},{Promise:R}),n(R,Y,!1,!0),l(Y),u=a(Y),g({target:Y,stat:!0,forced:_e},{reject:function(Ce){var xe=ie(this);return xe.reject.call(void 0,Ce),xe.promise}}),g({target:Y,stat:!0,forced:y||_e},{resolve:function(Ce){return M(y&&this===u?R:this,Ce)}}),g({target:Y,stat:!0,forced:Ae},{all:function(Ce){var xe=this,Z=ie(xe),$=Z.resolve,q=Z.reject,te=A(function(){var pe=d(xe.resolve),je=[],ke=0,Ie=1;_(Ce,function(Fe){var Ue=ke++,We=!1;je.push(void 0),Ie++,pe.call(xe,Fe).then(function(rt){We||(We=!0,je[Ue]=rt,--Ie||$(je))},q)}),--Ie||$(je)});return te.error&&q(te.value),Z.promise},race:function(Ce){var xe=this,Z=ie(xe),$=Z.reject,q=A(function(){var te=d(xe.resolve);_(Ce,function(pe){te.call(xe,pe).then(Z.resolve,$)})});return q.error&&$(q.value),Z.promise}})},{"../internals/a-function":5,"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/classof-raw":28,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/get-built-in":57,"../internals/global":60,"../internals/host-report-errors":63,"../internals/inspect-source":69,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-object":75,"../internals/is-pure":76,"../internals/iterate":78,"../internals/microtask":82,"../internals/native-promise-constructor":83,"../internals/new-promise-capability":87,"../internals/perform":107,"../internals/promise-resolve":108,"../internals/redefine":110,"../internals/redefine-all":109,"../internals/set-species":118,"../internals/set-to-string-tag":119,"../internals/species-constructor":123,"../internals/task":132,"../internals/well-known-symbol":150}],192:[function(o,W,C){var p=o("../internals/export"),s=o("../internals/get-built-in"),m=o("../internals/a-function"),u=o("../internals/an-object"),f=o("../internals/is-object"),g=o("../internals/object-create"),y=o("../internals/function-bind"),o=o("../internals/fails"),a=s("Reflect","construct"),r=o(function(){function n(){}return!(a(function(){},[],n)instanceof n)}),i=!o(function(){a(function(){})}),s=r||i;p({target:"Reflect",stat:!0,forced:s,sham:s},{construct:function(n,l){m(n),u(l);var c=arguments.length<3?n:m(arguments[2]);if(i&&!r)return a(n,l,c);if(n==c){switch(l.length){case 0:return new n;case 1:return new n(l[0]);case 2:return new n(l[0],l[1]);case 3:return new n(l[0],l[1],l[2]);case 4:return new n(l[0],l[1],l[2],l[3])}var d=[null];return d.push.apply(d,l),new(y.apply(n,d))}return d=c.prototype,c=g(f(d)?d:Object.prototype),d=Function.apply.call(n,c,l),f(d)?d:c}})},{"../internals/a-function":5,"../internals/an-object":10,"../internals/export":50,"../internals/fails":51,"../internals/function-bind":56,"../internals/get-built-in":57,"../internals/is-object":75,"../internals/object-create":91}],193:[function(t,W,C){var p=t("../internals/export"),m=t("../internals/is-object"),u=t("../internals/an-object"),f=t("../internals/has"),g=t("../internals/object-get-own-property-descriptor"),y=t("../internals/object-get-prototype-of");p({target:"Reflect",stat:!0},{get:function o(a,r){var i,s=arguments.length<3?a:arguments[2];return u(a)===s?a[r]:(i=g.f(a,r))?f(i,"value")?i.value:i.get===void 0?void 0:i.get.call(s):m(i=y(a))?o(i,r,s):void 0}})},{"../internals/an-object":10,"../internals/export":50,"../internals/has":61,"../internals/is-object":75,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-prototype-of":98}],194:[function(t,W,C){var p=t("../internals/descriptors"),m=t("../internals/global"),u=t("../internals/is-forced"),f=t("../internals/inherit-if-required"),g=t("../internals/object-define-property").f,y=t("../internals/object-get-own-property-names").f,o=t("../internals/is-regexp"),a=t("../internals/regexp-flags"),r=t("../internals/regexp-sticky-helpers"),i=t("../internals/redefine"),s=t("../internals/fails"),n=t("../internals/internal-state").set,l=t("../internals/set-species"),c=t("../internals/well-known-symbol")("match"),d=m.RegExp,v=d.prototype,S=/a/g,E=/a/g,_=new d(S)!==S,x=r.UNSUPPORTED_Y;if(p&&u("RegExp",!_||x||s(function(){return E[c]=!1,d(S)!=S||d(E)==E||d(S,"i")!="/a/i"}))){for(var O=function(M,F){var D,A=this instanceof O,z=o(M),G=F===void 0;return!A&&z&&M.constructor===O&&G?M:(_?z&&!G&&(M=M.source):M instanceof O&&(G&&(F=a.call(M)),M=M.source),x&&(D=!!F&&-1<F.indexOf("y"))&&(F=F.replace(/y/g,"")),z=f(_?new d(M,F):d(M,F),A?this:v,O),x&&D&&n(z,{sticky:D}),z)},T=y(d),P=0;T.length>P;)(function(M){M in O||g(O,M,{configurable:!0,get:function(){return d[M]},set:function(F){d[M]=F}})})(T[P++]);(v.constructor=O).prototype=v,i(m,"RegExp",O)}l("RegExp")},{"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/inherit-if-required":68,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-regexp":77,"../internals/object-define-property":93,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/regexp-flags":113,"../internals/regexp-sticky-helpers":114,"../internals/set-species":118,"../internals/well-known-symbol":150}],195:[function(m,W,C){"use strict";var p=m("../internals/export"),m=m("../internals/regexp-exec");p({target:"RegExp",proto:!0,forced:/./.exec!==m},{exec:m})},{"../internals/export":50,"../internals/regexp-exec":112}],196:[function(f,W,C){"use strict";var p=f("../internals/redefine"),m=f("../internals/an-object"),o=f("../internals/fails"),u=f("../internals/regexp-flags"),f="toString",g=RegExp.prototype,y=g[f],o=o(function(){return y.call({source:"a",flags:"b"})!="/a/b"}),a=y.name!=f;(o||a)&&p(RegExp.prototype,f,function(){var r=m(this),i=String(r.source),s=r.flags;return"/"+i+"/"+String(s===void 0&&r instanceof RegExp&&!("flags"in g)?u.call(r):s)},{unsafe:!0})},{"../internals/an-object":10,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-flags":113}],197:[function(m,W,C){"use strict";var p=m("../internals/collection"),m=m("../internals/collection-strong");W.exports=p("Set",function(u){return function(){return u(this,arguments.length?arguments[0]:void 0)}},m)},{"../internals/collection":32,"../internals/collection-strong":30}],198:[function(y,W,C){"use strict";var p=y("../internals/export"),m=y("../internals/object-get-own-property-descriptor").f,u=y("../internals/to-length"),f=y("../internals/not-a-regexp"),g=y("../internals/require-object-coercible"),r=y("../internals/correct-is-regexp-logic"),y=y("../internals/is-pure"),o="".endsWith,a=Math.min,r=r("endsWith");p({target:"String",proto:!0,forced:!!(y||r||!(p=m(String.prototype,"endsWith"))||p.writable)&&!r},{endsWith:function(i){var s=String(g(this)),n=(f(i),1<arguments.length?arguments[1]:void 0),l=u(s.length),n=n===void 0?l:a(u(n),l),l=String(i);return o?o.call(s,l,n):s.slice(n-l.length,n)===l}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/is-pure":76,"../internals/not-a-regexp":88,"../internals/object-get-own-property-descriptor":94,"../internals/require-object-coercible":115,"../internals/to-length":138}],199:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/not-a-regexp"),u=t("../internals/require-object-coercible");p({target:"String",proto:!0,forced:!t("../internals/correct-is-regexp-logic")("includes")},{includes:function(f){return!!~String(u(this)).indexOf(m(f),1<arguments.length?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/not-a-regexp":88,"../internals/require-object-coercible":115}],200:[function(u,W,C){"use strict";var p=u("../internals/string-multibyte").charAt,m=u("../internals/internal-state"),u=u("../internals/define-iterator"),f="String Iterator",g=m.set,y=m.getterFor(f);u(String,"String",function(o){g(this,{type:f,string:String(o),index:0})},function(){var o=y(this),a=o.string,r=o.index;return r>=a.length?{value:void 0,done:!0}:(a=p(a,r),o.index+=a.length,{value:a,done:!1})})},{"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/string-multibyte":125}],201:[function(t,W,C){"use strict";var p=t("../internals/fix-regexp-well-known-symbol-logic"),m=t("../internals/an-object"),u=t("../internals/to-length"),f=t("../internals/require-object-coercible"),g=t("../internals/advance-string-index"),y=t("../internals/regexp-exec-abstract");p("match",1,function(o,a,r){return[function(i){var s=f(this),n=i?.[o];return n!==void 0?n.call(i,s):new RegExp(i)[o](String(s))},function(i){var s=r(a,i,this);if(s.done)return s.value;var n=m(i),l=String(this);if(!n.global)return y(n,l);for(var c=n.unicode,d=[],v=n.lastIndex=0;(S=y(n,l))!==null;){var S=String(S[0]);(d[v]=S)===""&&(n.lastIndex=g(l,u(n.lastIndex),c)),v++}return v===0?null:d}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/to-length":138}],202:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/string-pad").start;p({target:"String",proto:!0,forced:t("../internals/string-pad-webkit-bug")},{padStart:function(u){return m(this,u,1<arguments.length?arguments[1]:void 0)}})},{"../internals/export":50,"../internals/string-pad":127,"../internals/string-pad-webkit-bug":126}],203:[function(t,W,C){t("../internals/export")({target:"String",proto:!0},{repeat:t("../internals/string-repeat")})},{"../internals/export":50,"../internals/string-repeat":129}],204:[function(t,W,C){"use strict";var p=t("../internals/fix-regexp-well-known-symbol-logic"),m=t("../internals/an-object"),u=t("../internals/to-object"),f=t("../internals/to-length"),g=t("../internals/to-integer"),y=t("../internals/require-object-coercible"),o=t("../internals/advance-string-index"),a=t("../internals/regexp-exec-abstract"),r=Math.max,i=Math.min,s=Math.floor,n=/\$([$&'`]|\d\d?|<[^>]*>)/g,l=/\$([$&'`]|\d\d?)/g;p("replace",2,function(c,d,v,S){var E=S.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,_=S.REPLACE_KEEPS_$0,x=E?"$":"$0";return[function(O,T){var P=y(this),M=O?.[c];return M!==void 0?M.call(O,P,T):d.call(String(P),O,T)},function(O,T){if(!E&&_||typeof T=="string"&&T.indexOf(x)===-1){var P=v(d,O,this,T);if(P.done)return P.value}for(var M,F=m(O),D=String(this),A=typeof T=="function",z=(A||(T=String(T)),F.global),G=(z&&(M=F.unicode,F.lastIndex=0),[]);(L=a(F,D))!==null&&(G.push(L),z);)String(L[0])===""&&(F.lastIndex=o(D,f(F.lastIndex),M));for(var U,H="",Y=0,oe=0;oe<G.length;oe++){for(var L=G[oe],j=String(L[0]),R=r(i(g(L.index),D.length),0),N=[],X=1;X<L.length;X++)N.push((U=L[X])===void 0?U:String(U));var K=L.groups,re=A?(re=[j].concat(N,R,D),K!==void 0&&re.push(K),String(T.apply(void 0,re))):(function(ie,ee,ae,ue,Q,le){var fe=ae+ie.length,ve=ue.length,he=l;return Q!==void 0&&(Q=u(Q),he=n),d.call(le,he,function(me,_e){var Ae;switch(_e.charAt(0)){case"$":return"$";case"&":return ie;case"`":return ee.slice(0,ae);case"'":return ee.slice(fe);case"<":Ae=Q[_e.slice(1,-1)];break;default:var Se,Ge=+_e;if(Ge==0)return me;if(ve<Ge)return(Se=s(Ge/10))!==0&&Se<=ve?ue[Se-1]===void 0?_e.charAt(1):ue[Se-1]+_e.charAt(1):me;Ae=ue[Ge-1]}return Ae===void 0?"":Ae})})(j,D,R,N,K,T);Y<=R&&(H+=D.slice(Y,R)+re,Y=R+j.length)}return H+D.slice(Y)}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/to-integer":137,"../internals/to-length":138,"../internals/to-object":139}],205:[function(t,W,C){"use strict";var p=t("../internals/fix-regexp-well-known-symbol-logic"),m=t("../internals/an-object"),u=t("../internals/require-object-coercible"),f=t("../internals/same-value"),g=t("../internals/regexp-exec-abstract");p("search",1,function(y,o,a){return[function(r){var i=u(this),s=r?.[y];return s!==void 0?s.call(r,i):new RegExp(r)[y](String(i))},function(r){var i,s=a(o,r,this);return s.done?s.value:(s=m(r),r=String(this),i=s.lastIndex,f(i,0)||(s.lastIndex=0),r=g(s,r),f(s.lastIndex,i)||(s.lastIndex=i),r===null?-1:r.index)}]})},{"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/same-value":116}],206:[function(i,W,C){"use strict";var p=i("../internals/fix-regexp-well-known-symbol-logic"),m=i("../internals/is-regexp"),u=i("../internals/an-object"),f=i("../internals/require-object-coercible"),g=i("../internals/species-constructor"),y=i("../internals/advance-string-index"),o=i("../internals/to-length"),a=i("../internals/regexp-exec-abstract"),r=i("../internals/regexp-exec"),i=i("../internals/fails"),s=[].push,n=Math.min,l=4294967295,c=!i(function(){return!RegExp(l,"y")});p("split",2,function(d,v,S){var E="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||1<".".split(/()()/).length||"".split(/.?/).length?function(_,x){var O=String(f(this)),T=x===void 0?l:x>>>0;if(T==0)return[];if(_===void 0)return[O];if(!m(_))return v.call(O,_,T);for(var P,M,F,D=[],x=(_.ignoreCase?"i":"")+(_.multiline?"m":"")+(_.unicode?"u":"")+(_.sticky?"y":""),A=0,z=new RegExp(_.source,x+"g");(P=r.call(z,O))&&!(A<(M=z.lastIndex)&&(D.push(O.slice(A,P.index)),1<P.length&&P.index<O.length&&s.apply(D,P.slice(1)),F=P[0].length,A=M,D.length>=T));)z.lastIndex===P.index&&z.lastIndex++;return A===O.length?!F&&z.test("")||D.push(""):D.push(O.slice(A)),D.length>T?D.slice(0,T):D}:"0".split(void 0,0).length?function(_,x){return _===void 0&&x===0?[]:v.call(this,_,x)}:v;return[function(_,x){var O=f(this),T=_?.[d];return T!==void 0?T.call(_,O,x):E.call(String(O),_,x)},function(P,x){var O=S(E,P,this,x,E!==v);if(O.done)return O.value;var O=u(P),T=String(this),P=g(O,RegExp),M=O.unicode,F=(O.ignoreCase?"i":"")+(O.multiline?"m":"")+(O.unicode?"u":"")+(c?"y":"g"),D=new P(c?O:"^(?:"+O.source+")",F),A=x===void 0?l:x>>>0;if(A==0)return[];if(T.length===0)return a(D,T)===null?[T]:[];for(var z=0,G=0,U=[];G<T.length;){D.lastIndex=c?G:0;var H,Y=a(D,c?T:T.slice(G));if(Y===null||(H=n(o(D.lastIndex+(c?0:G)),T.length))===z)G=y(T,G,M);else{if(U.push(T.slice(z,G)),U.length===A)return U;for(var oe=1;oe<=Y.length-1;oe++)if(U.push(Y[oe]),U.length===A)return U;G=z=H}}return U.push(T.slice(z)),U}]},!c)},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fails":51,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/is-regexp":77,"../internals/regexp-exec":112,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/species-constructor":123,"../internals/to-length":138}],207:[function(y,W,C){"use strict";var p=y("../internals/export"),m=y("../internals/object-get-own-property-descriptor").f,u=y("../internals/to-length"),f=y("../internals/not-a-regexp"),g=y("../internals/require-object-coercible"),r=y("../internals/correct-is-regexp-logic"),y=y("../internals/is-pure"),o="".startsWith,a=Math.min,r=r("startsWith");p({target:"String",proto:!0,forced:!!(y||r||!(p=m(String.prototype,"startsWith"))||p.writable)&&!r},{startsWith:function(l){var s=String(g(this)),n=(f(l),u(a(1<arguments.length?arguments[1]:void 0,s.length))),l=String(l);return o?o.call(s,l,n):s.slice(n,n+l.length)===l}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/is-pure":76,"../internals/not-a-regexp":88,"../internals/object-get-own-property-descriptor":94,"../internals/require-object-coercible":115,"../internals/to-length":138}],208:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/create-html");p({target:"String",proto:!0,forced:t("../internals/string-html-forced")("sub")},{sub:function(){return m(this,"sub","","")}})},{"../internals/create-html":36,"../internals/export":50,"../internals/string-html-forced":124}],209:[function(t,W,C){"use strict";var p=t("../internals/export"),m=t("../internals/string-trim").trim;p({target:"String",proto:!0,forced:t("../internals/string-trim-forced")("trim")},{trim:function(){return m(this)}})},{"../internals/export":50,"../internals/string-trim":131,"../internals/string-trim-forced":130}],210:[function(n,W,C){"use strict";var p,m,u,f,g,y=n("../internals/export"),o=n("../internals/descriptors"),a=n("../internals/global"),r=n("../internals/has"),i=n("../internals/is-object"),s=n("../internals/object-define-property").f,n=n("../internals/copy-constructor-properties"),l=a.Symbol;!o||typeof l!="function"||"description"in l.prototype&&l().description===void 0||(p={},n(m=function(){var c=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),d=this instanceof m?new l(c):c===void 0?l():l(c);return c===""&&(p[d]=!0),d},l),(a=m.prototype=l.prototype).constructor=m,u=a.toString,f=String(l("test"))=="Symbol(test)",g=/^Symbol\((.*)\)[^)]+$/,s(a,"description",{configurable:!0,get:function(){var c=i(this)?this.valueOf():this,d=u.call(c);return r(p,c)?"":(c=f?d.slice(7,-1):d.replace(g,"$1"))===""?void 0:c}}),y({global:!0,forced:!0},{Symbol:m}))},{"../internals/copy-constructor-properties":33,"../internals/descriptors":43,"../internals/export":50,"../internals/global":60,"../internals/has":61,"../internals/is-object":75,"../internals/object-define-property":93}],211:[function(t,W,C){t("../internals/define-well-known-symbol")("iterator")},{"../internals/define-well-known-symbol":42}],212:[function(ee,W,C){"use strict";function p(q,te){var pe=Ae[q]=O(le[ie]);return ae(pe,{type:re,tag:q,description:te}),r||(pe.description=te),pe}function m(q,je){v(q);var pe=E(je),je=T(pe).concat($(pe));return X(je,function(ke){r&&!Z.call(pe,ke)||xe(q,ke,pe[ke])}),q}function u(je,ke){var pe,je=E(je),ke=_(ke,!0);if(je!==Q||!l(Ae,ke)||l(Se,ke))return!(pe=ve(je,ke))||!l(Ae,ke)||l(je,K)&&je[K][ke]||(pe.enumerable=!0),pe}function f(te){var te=me(E(te)),pe=[];return X(te,function(je){l(Ae,je)||l(Y,je)||pe.push(je)}),pe}var g=ee("../internals/export"),y=ee("../internals/global"),o=ee("../internals/get-built-in"),a=ee("../internals/is-pure"),r=ee("../internals/descriptors"),i=ee("../internals/native-symbol"),s=ee("../internals/use-symbol-as-uid"),n=ee("../internals/fails"),l=ee("../internals/has"),c=ee("../internals/is-array"),d=ee("../internals/is-object"),v=ee("../internals/an-object"),S=ee("../internals/to-object"),E=ee("../internals/to-indexed-object"),_=ee("../internals/to-primitive"),x=ee("../internals/create-property-descriptor"),O=ee("../internals/object-create"),T=ee("../internals/object-keys"),P=ee("../internals/object-get-own-property-names"),M=ee("../internals/object-get-own-property-names-external"),F=ee("../internals/object-get-own-property-symbols"),D=ee("../internals/object-get-own-property-descriptor"),A=ee("../internals/object-define-property"),z=ee("../internals/object-property-is-enumerable"),G=ee("../internals/create-non-enumerable-property"),U=ee("../internals/redefine"),H=ee("../internals/shared"),Be=ee("../internals/shared-key"),Y=ee("../internals/hidden-keys"),oe=ee("../internals/uid"),L=ee("../internals/well-known-symbol"),j=ee("../internals/well-known-symbol-wrapped"),R=ee("../internals/define-well-known-symbol"),N=ee("../internals/set-to-string-tag"),He=ee("../internals/internal-state"),X=ee("../internals/array-iteration").forEach,K=Be("hidden"),re="Symbol",ie="prototype",ee=L("toPrimitive"),ae=He.set,ue=He.getterFor(re),Q=Object[ie],le=y.Symbol,fe=o("JSON","stringify"),ve=D.f,he=A.f,me=M.f,_e=z.f,Ae=H("symbols"),Se=H("op-symbols"),Ge=H("string-to-symbol-registry"),Ne=H("symbol-to-string-registry"),Be=H("wks"),He=y.QObject,Ve=!He||!He[ie]||!He[ie].findChild,ge=r&&n(function(){return O(he({},"a",{get:function(){return he(this,"a",{value:7}).a}})).a!=7})?function(q,te,pe){var je=ve(Q,te);je&&delete Q[te],he(q,te,pe),je&&q!==Q&&he(Q,te,je)}:he,Ce=s?function(q){return typeof q=="symbol"}:function(q){return Object(q)instanceof le},xe=function(q,te,pe){return q===Q&&xe(Se,te,pe),v(q),te=_(te,!0),v(pe),(l(Ae,te)?(pe.enumerable?(l(q,K)&&q[K][te]&&(q[K][te]=!1),pe=O(pe,{enumerable:x(0,!1)})):(l(q,K)||he(q,K,x(1,{})),q[K][te]=!0),ge):he)(q,te,pe)},Z=function(te){var te=_(te,!0),pe=_e.call(this,te);return!(this===Q&&l(Ae,te)&&!l(Se,te))&&(!(pe||!l(this,te)||!l(Ae,te)||l(this,K)&&this[K][te])||pe)},$=function(pe){var te=pe===Q,pe=me(te?Se:E(pe)),je=[];return X(pe,function(ke){!l(Ae,ke)||te&&!l(Q,ke)||je.push(Ae[ke])}),je};i||(U((le=function(){if(this instanceof le)throw TypeError("Symbol is not a constructor");var q=arguments.length&&arguments[0]!==void 0?String(arguments[0]):void 0,te=oe(q),pe=function(je){this===Q&&pe.call(Se,je),l(this,K)&&l(this[K],te)&&(this[K][te]=!1),ge(this,te,x(1,je))};return r&&Ve&&ge(Q,te,{configurable:!0,set:pe}),p(te,q)})[ie],"toString",function(){return ue(this).tag}),U(le,"withoutSetter",function(q){return p(oe(q),q)}),z.f=Z,A.f=xe,D.f=u,P.f=M.f=f,F.f=$,j.f=function(q){return p(L(q),q)},r&&(he(le[ie],"description",{configurable:!0,get:function(){return ue(this).description}}),a||U(Q,"propertyIsEnumerable",Z,{unsafe:!0}))),g({global:!0,wrap:!0,forced:!i,sham:!i},{Symbol:le}),X(T(Be),function(q){R(q)}),g({target:re,stat:!0,forced:!i},{for:function(pe){var te,pe=String(pe);return l(Ge,pe)?Ge[pe]:(te=le(pe),Ge[pe]=te,Ne[te]=pe,te)},keyFor:function(q){if(!Ce(q))throw TypeError(q+" is not a symbol");if(l(Ne,q))return Ne[q]},useSetter:function(){Ve=!0},useSimple:function(){Ve=!1}}),g({target:"Object",stat:!0,forced:!i,sham:!r},{create:function(q,te){return te===void 0?O(q):m(O(q),te)},defineProperty:xe,defineProperties:m,getOwnPropertyDescriptor:u}),g({target:"Object",stat:!0,forced:!i},{getOwnPropertyNames:f,getOwnPropertySymbols:$}),g({target:"Object",stat:!0,forced:n(function(){F.f(1)})},{getOwnPropertySymbols:function(q){return F.f(S(q))}}),fe&&g({target:"JSON",stat:!0,forced:!i||n(function(){var q=le();return fe([q])!="[null]"||fe({a:q})!="{}"||fe(Object(q))!="{}"})},{stringify:function(q,te,pe){for(var je,ke=[q],Ie=1;Ie<arguments.length;)ke.push(arguments[Ie++]);if((d(je=te)||q!==void 0)&&!Ce(q))return c(te)||(te=function(Fe,Ue){if(typeof je=="function"&&(Ue=je.call(this,Fe,Ue)),!Ce(Ue))return Ue}),ke[1]=te,fe.apply(null,ke)}}),le[ie][ee]||G(le[ie],ee,le[ie].valueOf),N(le,re),Y[K]=!0},{"../internals/an-object":10,"../internals/array-iteration":19,"../internals/create-non-enumerable-property":38,"../internals/create-property-descriptor":39,"../internals/define-well-known-symbol":42,"../internals/descriptors":43,"../internals/export":50,"../internals/fails":51,"../internals/get-built-in":57,"../internals/global":60,"../internals/has":61,"../internals/hidden-keys":62,"../internals/internal-state":71,"../internals/is-array":73,"../internals/is-object":75,"../internals/is-pure":76,"../internals/native-symbol":84,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/object-get-own-property-names-external":95,"../internals/object-get-own-property-symbols":97,"../internals/object-keys":100,"../internals/object-property-is-enumerable":101,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/shared":122,"../internals/shared-key":120,"../internals/to-indexed-object":136,"../internals/to-object":139,"../internals/to-primitive":142,"../internals/uid":147,"../internals/use-symbol-as-uid":148,"../internals/well-known-symbol":150,"../internals/well-known-symbol-wrapped":149}],213:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-copy-within"),u=p.aTypedArray;(0,p.exportTypedArrayMethod)("copyWithin",function(f,g){return m.call(u(this),f,g,2<arguments.length?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-copy-within":14}],214:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-iteration").every,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("every",function(f){return m(u(this),f,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],215:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-fill"),u=p.aTypedArray;(0,p.exportTypedArrayMethod)("fill",function(f){return m.apply(u(this),arguments)})},{"../internals/array-buffer-view-core":12,"../internals/array-fill":15}],216:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-iteration").filter,u=t("../internals/species-constructor"),f=p.aTypedArray,g=p.aTypedArrayConstructor;(0,p.exportTypedArrayMethod)("filter",function(y){for(var o=m(f(this),y,1<arguments.length?arguments[1]:void 0),y=u(this,this.constructor),a=0,r=o.length,i=new(g(y))(r);a<r;)i[a]=o[a++];return i})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/species-constructor":123}],217:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-iteration").findIndex,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("findIndex",function(f){return m(u(this),f,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],218:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-iteration").find,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("find",function(f){return m(u(this),f,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],219:[function(t,W,C){t("../internals/typed-array-constructor")("Float32",function(p){return function(m,u,f){return p(this,m,u,f)}})},{"../internals/typed-array-constructor":144}],220:[function(t,W,C){t("../internals/typed-array-constructor")("Float64",function(p){return function(m,u,f){return p(this,m,u,f)}})},{"../internals/typed-array-constructor":144}],221:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-iteration").forEach,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("forEach",function(f){m(u(this),f,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],222:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-includes").includes,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("includes",function(f){return m(u(this),f,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-includes":18}],223:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-includes").indexOf,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("indexOf",function(f){return m(u(this),f,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-includes":18}],224:[function(t,W,C){t("../internals/typed-array-constructor")("Int16",function(p){return function(m,u,f){return p(this,m,u,f)}})},{"../internals/typed-array-constructor":144}],225:[function(t,W,C){t("../internals/typed-array-constructor")("Int32",function(p){return function(m,u,f){return p(this,m,u,f)}})},{"../internals/typed-array-constructor":144}],226:[function(m,W,C){"use strict";function p(){return u.call(y(this))}var r=m("../internals/global"),a=m("../internals/array-buffer-view-core"),o=m("../modules/es.array.iterator"),m=m("../internals/well-known-symbol")("iterator"),r=r.Uint8Array,u=o.values,f=o.keys,g=o.entries,y=a.aTypedArray,o=a.exportTypedArrayMethod,a=r&&r.prototype[m],r=!!a&&(a.name=="values"||a.name==null);o("entries",function(){return g.call(y(this))}),o("keys",function(){return f.call(y(this))}),o("values",p,!r),o(m,p,!r)},{"../internals/array-buffer-view-core":12,"../internals/global":60,"../internals/well-known-symbol":150,"../modules/es.array.iterator":165}],227:[function(m,W,C){"use strict";var m=m("../internals/array-buffer-view-core"),p=m.aTypedArray,m=m.exportTypedArrayMethod,u=[].join;m("join",function(f){return u.apply(p(this),arguments)})},{"../internals/array-buffer-view-core":12}],228:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-last-index-of"),u=p.aTypedArray;(0,p.exportTypedArrayMethod)("lastIndexOf",function(f){return m.apply(u(this),arguments)})},{"../internals/array-buffer-view-core":12,"../internals/array-last-index-of":20}],229:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-iteration").map,u=t("../internals/species-constructor"),f=p.aTypedArray,g=p.aTypedArrayConstructor;(0,p.exportTypedArrayMethod)("map",function(y){return m(f(this),y,1<arguments.length?arguments[1]:void 0,function(o,a){return new(g(u(o,o.constructor)))(a)})})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/species-constructor":123}],230:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-reduce").right,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("reduceRight",function(f){return m(u(this),f,arguments.length,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-reduce":24}],231:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-reduce").left,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("reduce",function(f){return m(u(this),f,arguments.length,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-reduce":24}],232:[function(m,W,C){"use strict";var m=m("../internals/array-buffer-view-core"),p=m.aTypedArray,m=m.exportTypedArrayMethod,u=Math.floor;m("reverse",function(){for(var f,g=p(this).length,y=u(g/2),o=0;o<y;)f=this[o],this[o++]=this[--g],this[g]=f;return this})},{"../internals/array-buffer-view-core":12}],233:[function(g,W,C){"use strict";var p=g("../internals/array-buffer-view-core"),m=g("../internals/to-length"),u=g("../internals/to-offset"),f=g("../internals/to-object"),g=g("../internals/fails"),y=p.aTypedArray;(0,p.exportTypedArrayMethod)("set",function(o){y(this);var a=u(1<arguments.length?arguments[1]:void 0,1),r=this.length,i=f(o),s=m(i.length),n=0;if(r<s+a)throw RangeError("Wrong length");for(;n<s;)this[a+n]=i[n++]},g(function(){new Int8Array(1).set({})}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/to-length":138,"../internals/to-object":139,"../internals/to-offset":140}],234:[function(m,W,C){"use strict";var g=m("../internals/array-buffer-view-core"),p=m("../internals/species-constructor"),m=m("../internals/fails"),u=g.aTypedArray,f=g.aTypedArrayConstructor,g=g.exportTypedArrayMethod,y=[].slice;g("slice",function(o,a){for(var r=y.call(u(this),o,a),o=p(this,this.constructor),i=0,s=r.length,n=new(f(o))(s);i<s;)n[i]=r[i++];return n},m(function(){new Int8Array(1).slice()}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/species-constructor":123}],235:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/array-iteration").some,u=p.aTypedArray;(0,p.exportTypedArrayMethod)("some",function(f){return m(u(this),f,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],236:[function(m,W,C){"use strict";var m=m("../internals/array-buffer-view-core"),p=m.aTypedArray,m=m.exportTypedArrayMethod,u=[].sort;m("sort",function(f){return u.call(p(this),f)})},{"../internals/array-buffer-view-core":12}],237:[function(t,W,C){"use strict";var p=t("../internals/array-buffer-view-core"),m=t("../internals/to-length"),u=t("../internals/to-absolute-index"),f=t("../internals/species-constructor"),g=p.aTypedArray;(0,p.exportTypedArrayMethod)("subarray",function(i,o){var a=g(this),r=a.length,i=u(i,r);return new(f(a,a.constructor))(a.buffer,a.byteOffset+i*a.BYTES_PER_ELEMENT,m((o===void 0?r:u(o,r))-i))})},{"../internals/array-buffer-view-core":12,"../internals/species-constructor":123,"../internals/to-absolute-index":134,"../internals/to-length":138}],238:[function(m,W,C){"use strict";var g=m("../internals/global"),p=m("../internals/array-buffer-view-core"),m=m("../internals/fails"),u=g.Int8Array,f=p.aTypedArray,g=p.exportTypedArrayMethod,y=[].toLocaleString,o=[].slice,a=!!u&&m(function(){y.call(new u(1))});g("toLocaleString",function(){return y.apply(a?o.call(f(this)):f(this),arguments)},m(function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()})||!m(function(){u.prototype.toLocaleString.call([1,2])}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/global":60}],239:[function(m,W,C){"use strict";var p=m("../internals/array-buffer-view-core").exportTypedArrayMethod,g=m("../internals/fails"),m=m("../internals/global").Uint8Array,m=m&&m.prototype||{},u=[].toString,f=[].join,g=(g(function(){u.call({})})&&(u=function(){return f.call(this)}),m.toString!=u);p("toString",u,g)},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/global":60}],240:[function(t,W,C){t("../internals/typed-array-constructor")("Uint16",function(p){return function(m,u,f){return p(this,m,u,f)}})},{"../internals/typed-array-constructor":144}],241:[function(t,W,C){t("../internals/typed-array-constructor")("Uint32",function(p){return function(m,u,f){return p(this,m,u,f)}})},{"../internals/typed-array-constructor":144}],242:[function(t,W,C){t("../internals/typed-array-constructor")("Uint8",function(p){return function(m,u,f){return p(this,m,u,f)}})},{"../internals/typed-array-constructor":144}],243:[function(t,W,C){t("../internals/typed-array-constructor")("Uint8",function(p){return function(m,u,f){return p(this,m,u,f)}},!0)},{"../internals/typed-array-constructor":144}],244:[function(l,v,C){"use strict";function p(S){return function(){return S(this,arguments.length?arguments[0]:void 0)}}var m,u,f,g,y,c=l("../internals/global"),o=l("../internals/redefine-all"),a=l("../internals/internal-metadata"),r=l("../internals/collection"),i=l("../internals/collection-weak"),s=l("../internals/is-object"),n=l("../internals/internal-state").enforce,l=l("../internals/native-weak-map"),c=!c.ActiveXObject&&"ActiveXObject"in c,d=Object.isExtensible,v=v.exports=r("WeakMap",p,i);l&&c&&(m=i.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0,r=v.prototype,u=r.delete,f=r.has,g=r.get,y=r.set,o(r,{delete:function(S){var E;return s(S)&&!d(S)?((E=n(this)).frozen||(E.frozen=new m),u.call(this,S)||E.frozen.delete(S)):u.call(this,S)},has:function(S){var E;return s(S)&&!d(S)?((E=n(this)).frozen||(E.frozen=new m),f.call(this,S)||E.frozen.has(S)):f.call(this,S)},get:function(S){var E;return!s(S)||d(S)||((E=n(this)).frozen||(E.frozen=new m),f.call(this,S))?g.call(this,S):E.frozen.get(S)},set:function(S,E){var _;return!s(S)||d(S)||((_=n(this)).frozen||(_.frozen=new m),f.call(this,S))?y.call(this,S,E):_.frozen.set(S,E),this}}))},{"../internals/collection":32,"../internals/collection-weak":31,"../internals/global":60,"../internals/internal-metadata":70,"../internals/internal-state":71,"../internals/is-object":75,"../internals/native-weak-map":86,"../internals/redefine-all":109}],245:[function(t,W,C){var p,m=t("../internals/global"),u=t("../internals/dom-iterables"),f=t("../internals/array-for-each"),g=t("../internals/create-non-enumerable-property");for(p in u){var y=m[p],y=y&&y.prototype;if(y&&y.forEach!==f)try{g(y,"forEach",f)}catch{y.forEach=f}}},{"../internals/array-for-each":16,"../internals/create-non-enumerable-property":38,"../internals/dom-iterables":45,"../internals/global":60}],246:[function(y,W,C){var p,m=y("../internals/global"),u=y("../internals/dom-iterables"),f=y("../modules/es.array.iterator"),g=y("../internals/create-non-enumerable-property"),y=y("../internals/well-known-symbol"),o=y("iterator"),a=y("toStringTag"),r=f.values;for(p in u){var i=m[p],s=i&&i.prototype;if(s){if(s[o]!==r)try{g(s,o,r)}catch{s[o]=r}if(s[a]||g(s,a,p),u[p]){for(var n in f)if(s[n]!==f[n])try{g(s,n,f[n])}catch{s[n]=f[n]}}}}},{"../internals/create-non-enumerable-property":38,"../internals/dom-iterables":45,"../internals/global":60,"../internals/well-known-symbol":150,"../modules/es.array.iterator":165}],247:[function(K,W,C){"use strict";K("../modules/es.array.iterator");function p(re){try{return decodeURIComponent(re)}catch{return re}}function m(re){return R[re]}function u(re){return encodeURIComponent(re).replace(j,m)}function f(re){this.entries.length=0,N(this.entries,re)}function g(re,ie){if(re<ie)throw TypeError("Not enough arguments")}function y(){c(this,y,A);var re,ie,ee,ae,ue,Q,le,fe,ve=0<arguments.length?arguments[0]:void 0,he=[];if(G(this,{type:A,entries:he,updateURL:function(){},updateSearchParams:f}),ve!==void 0)if(_(ve))if(typeof(re=P(ve))=="function")for(ee=(ie=re.call(ve)).next;!(ae=ee.call(ie)).done;){if((Q=(ue=(ae=T(E(ae.value))).next).call(ae)).done||(le=ue.call(ae)).done||!ue.call(ae).done)throw TypeError("Expected sequence with length 2");he.push({key:Q.value+"",value:le.value+""})}else for(fe in ve)d(ve,fe)&&he.push({key:fe,value:ve[fe]+""});else N(he,typeof ve=="string"?ve.charAt(0)==="?"?ve.slice(1):ve:ve+"")}var o=K("../internals/export"),D=K("../internals/get-built-in"),a=K("../internals/native-url"),r=K("../internals/redefine"),i=K("../internals/redefine-all"),s=K("../internals/set-to-string-tag"),n=K("../internals/create-iterator-constructor"),l=K("../internals/internal-state"),c=K("../internals/an-instance"),d=K("../internals/has"),v=K("../internals/function-bind-context"),S=K("../internals/classof"),E=K("../internals/an-object"),_=K("../internals/is-object"),x=K("../internals/object-create"),O=K("../internals/create-property-descriptor"),T=K("../internals/get-iterator"),P=K("../internals/get-iterator-method"),K=K("../internals/well-known-symbol"),M=D("fetch"),F=D("Headers"),D=K("iterator"),A="URLSearchParams",z=A+"Iterator",G=l.set,U=l.getterFor(A),H=l.getterFor(z),Y=/\+/g,oe=Array(4),L=function(re){var ie,ee=re.replace(Y," "),ae=4;try{return decodeURIComponent(ee)}catch{for(;ae;)ee=ee.replace((ie=ae--,oe[ie-1]||(oe[ie-1]=RegExp("((?:%[\\da-f]{2}){"+ie+"})","gi"))),p);return ee}},j=/[!'()~]|%20/g,R={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},N=function(re,ie){if(ie)for(var ee,ae=ie.split("&"),ue=0;ue<ae.length;)(ee=ae[ue++]).length&&(ee=ee.split("="),re.push({key:L(ee.shift()),value:L(ee.join("="))}))},X=n(function(re,ie){G(this,{type:z,iterator:T(U(re).entries),kind:ie})},"Iterator",function(){var ie=H(this),re=ie.kind,ie=ie.iterator.next(),ee=ie.value;return ie.done||(ie.value=re==="keys"?ee.key:re==="values"?ee.value:[ee.key,ee.value]),ie}),K=y.prototype;i(K,{append:function(re,ie){g(arguments.length,2);var ee=U(this);ee.entries.push({key:re+"",value:ie+""}),ee.updateURL()},delete:function(re){g(arguments.length,1);for(var ie=U(this),ee=ie.entries,ae=re+"",ue=0;ue<ee.length;)ee[ue].key===ae?ee.splice(ue,1):ue++;ie.updateURL()},get:function(re){g(arguments.length,1);for(var ie=U(this).entries,ee=re+"",ae=0;ae<ie.length;ae++)if(ie[ae].key===ee)return ie[ae].value;return null},getAll:function(re){g(arguments.length,1);for(var ie=U(this).entries,ee=re+"",ae=[],ue=0;ue<ie.length;ue++)ie[ue].key===ee&&ae.push(ie[ue].value);return ae},has:function(re){g(arguments.length,1);for(var ie=U(this).entries,ee=re+"",ae=0;ae<ie.length;)if(ie[ae++].key===ee)return!0;return!1},set:function(re,ie){g(arguments.length,1);for(var ee,ae=U(this),ue=ae.entries,Q=!1,le=re+"",fe=ie+"",ve=0;ve<ue.length;ve++)(ee=ue[ve]).key===le&&(Q?ue.splice(ve--,1):(Q=!0,ee.value=fe));Q||ue.push({key:le,value:fe}),ae.updateURL()},sort:function(){for(var re,ie,ee=U(this),ae=ee.entries,ue=ae.slice(),Q=ae.length=0;Q<ue.length;Q++){for(re=ue[Q],ie=0;ie<Q;ie++)if(ae[ie].key>re.key){ae.splice(ie,0,re);break}ie===Q&&ae.push(re)}ee.updateURL()},forEach:function(re){for(var ie,ee=U(this).entries,ae=v(re,1<arguments.length?arguments[1]:void 0,3),ue=0;ue<ee.length;)ae((ie=ee[ue++]).value,ie.key,this)},keys:function(){return new X(this,"keys")},values:function(){return new X(this,"values")},entries:function(){return new X(this,"entries")}},{enumerable:!0}),r(K,D,K.entries),r(K,"toString",function(){for(var re,ie=U(this).entries,ee=[],ae=0;ae<ie.length;)re=ie[ae++],ee.push(u(re.key)+"="+u(re.value));return ee.join("&")},{enumerable:!0}),s(y,A),o({global:!0,forced:!a},{URLSearchParams:y}),a||typeof M!="function"||typeof F!="function"||o({global:!0,enumerable:!0,forced:!0},{fetch:function(ue){var ie,ee,ae,ue=[ue];return 1<arguments.length&&(_(ie=arguments[1])&&(ee=ie.body,S(ee)===A&&((ae=ie.headers?new F(ie.headers):new F).has("content-type")||ae.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),ie=x(ie,{body:O(0,String(ee)),headers:O(0,ae)}))),ue.push(ie)),M.apply(this,ue)}}),W.exports={URLSearchParams:y,getState:U}},{"../internals/an-instance":9,"../internals/an-object":10,"../internals/classof":29,"../internals/create-iterator-constructor":37,"../internals/create-property-descriptor":39,"../internals/export":50,"../internals/function-bind-context":55,"../internals/get-built-in":57,"../internals/get-iterator":59,"../internals/get-iterator-method":58,"../internals/has":61,"../internals/internal-state":71,"../internals/is-object":75,"../internals/native-url":85,"../internals/object-create":91,"../internals/redefine":110,"../internals/redefine-all":109,"../internals/set-to-string-tag":119,"../internals/well-known-symbol":150,"../modules/es.array.iterator":165}],248:[function(T,W,C){"use strict";T("../modules/es.string.iterator");function p(de){var De,Xe,Re,st;if(typeof de=="number"){for(De=[],Xe=0;Xe<4;Xe++)De.unshift(de%256),de=z(de/256);return De.join(".")}if(typeof de!="object")return de;for(De="",Re=le(de),Xe=0;Xe<8;Xe++)st&&de[Xe]===0||(st=st&&!1,Re===Xe?(De+=Xe?":":"::",st=!0):(De+=de[Xe].toString(16),Xe<7&&(De+=":")));return"["+De+"]"}function m(de){return!de.host||de.cannotBeABaseURL||de.scheme=="file"}function u(de,De,Xe,Re){var st,Le,lt,ze=Xe||Ce,it=0,qe="",xt=!1,Et=!1,jt=!1;for(Xe||(de.scheme="",de.username="",de.password="",de.host=null,de.port=null,de.path=[],de.query=null,de.fragment=null,de.cannotBeABaseURL=!1,De=De.replace(ae,"")),De=De.replace(ue,""),st=S(De);it<=st.length;){switch(Le=st[it],ze){case Ce:if(!Le||!L.test(Le)){if(Xe)return H;ze=Z;continue}qe+=Le.toLowerCase(),ze=xe;break;case xe:if(Le&&(j.test(Le)||Le=="+"||Le=="-"||Le=="."))qe+=Le.toLowerCase();else{if(Le!=":"){if(Xe)return H;qe="",ze=Z,it=0;continue}if(Xe&&(Se(de)!=d(Ae,qe)||qe=="file"&&(Ge(de)||de.port!==null)||de.scheme=="file"&&!de.host))return;if(de.scheme=qe,Xe)return void(Se(de)&&Ae[de.scheme]==de.port&&(de.port=null));qe="",de.scheme=="file"?ze=rt:Se(de)&&Re&&Re.scheme==de.scheme?ze=$:Se(de)?ze=je:st[it+1]=="/"?(ze=q,it++):(de.cannotBeABaseURL=!0,de.path.push(""),ze=pt)}break;case Z:if(!Re||Re.cannotBeABaseURL&&Le!="#")return H;if(Re.cannotBeABaseURL&&Le=="#"){de.scheme=Re.scheme,de.path=Re.path.slice(),de.query=Re.query,de.fragment="",de.cannotBeABaseURL=!0,ze=wt;break}ze=Re.scheme=="file"?rt:te;continue;case $:if(Le!="/"||st[it+1]!="/"){ze=te;continue}ze=ke,it++;break;case q:if(Le=="/"){ze=Ie;break}ze=$e;continue;case te:if(de.scheme=Re.scheme,Le==y)de.username=Re.username,de.password=Re.password,de.host=Re.host,de.port=Re.port,de.path=Re.path.slice(),de.query=Re.query;else if(Le=="/"||Le=="\\"&&Se(de))ze=pe;else if(Le=="?")de.username=Re.username,de.password=Re.password,de.host=Re.host,de.port=Re.port,de.path=Re.path.slice(),de.query="",ze=It;else{if(Le!="#"){de.username=Re.username,de.password=Re.password,de.host=Re.host,de.port=Re.port,de.path=Re.path.slice(),de.path.pop(),ze=$e;continue}de.username=Re.username,de.password=Re.password,de.host=Re.host,de.port=Re.port,de.path=Re.path.slice(),de.query=Re.query,de.fragment="",ze=wt}break;case pe:if(!Se(de)||Le!="/"&&Le!="\\"){if(Le!="/"){de.username=Re.username,de.password=Re.password,de.host=Re.host,de.port=Re.port,ze=$e;continue}ze=Ie}else ze=ke;break;case je:if(ze=ke,Le!="/"||qe.charAt(it+1)!="/")continue;it++;break;case ke:if(Le=="/"||Le=="\\")break;ze=Ie;continue;case Ie:if(Le=="@"){xt&&(qe="%40"+qe);for(var xt=!0,kt=S(qe),zt=0;zt<kt.length;zt++){var Nt=kt[zt];Nt!=":"||jt?(Nt=_e(Nt,me),jt?de.password+=Nt:de.username+=Nt):jt=!0}qe=""}else if(Le==y||Le=="/"||Le=="?"||Le=="#"||Le=="\\"&&Se(de)){if(xt&&qe=="")return U;it-=S(qe).length+1,qe="",ze=Fe}else qe+=Le;break;case Fe:case Ue:if(Xe&&de.scheme=="file"){ze=Ye;continue}if(Le!=":"||Et){if(Le==y||Le=="/"||Le=="?"||Le=="#"||Le=="\\"&&Se(de)){if(Se(de)&&qe=="")return Y;if(Xe&&qe==""&&(Ge(de)||de.port!==null))return;if(lt=Q(de,qe))return lt;if(qe="",ze=tt,Xe)return;continue}Le=="["?Et=!0:Le=="]"&&(Et=!1),qe+=Le}else{if(qe=="")return Y;if(lt=Q(de,qe))return lt;if(qe="",ze=We,Xe==Ue)return}break;case We:if(!R.test(Le)){if(Le==y||Le=="/"||Le=="?"||Le=="#"||Le=="\\"&&Se(de)||Xe){if(qe!=""){var Ht=parseInt(qe,10);if(65535<Ht)return oe;de.port=Se(de)&&Ht===Ae[de.scheme]?null:Ht,qe=""}if(Xe)return;ze=tt;continue}return oe}qe+=Le;break;case rt:if(de.scheme="file",Le=="/"||Le=="\\")ze=et;else{if(!Re||Re.scheme!="file"){ze=$e;continue}if(Le==y)de.host=Re.host,de.path=Re.path.slice(),de.query=Re.query;else if(Le=="?")de.host=Re.host,de.path=Re.path.slice(),de.query="",ze=It;else{if(Le!="#"){Be(st.slice(it).join(""))||(de.host=Re.host,de.path=Re.path.slice(),He(de)),ze=$e;continue}de.host=Re.host,de.path=Re.path.slice(),de.query=Re.query,de.fragment="",ze=wt}}break;case et:if(Le=="/"||Le=="\\"){ze=Ye;break}Re&&Re.scheme=="file"&&!Be(st.slice(it).join(""))&&(Ne(Re.path[0],!0)?de.path.push(Re.path[0]):de.host=Re.host),ze=$e;continue;case Ye:if(Le==y||Le=="/"||Le=="\\"||Le=="?"||Le=="#"){if(!Xe&&Ne(qe))ze=$e;else{if(qe==""){if(de.host="",Xe)return}else{if(lt=Q(de,qe))return lt;if(de.host=="localhost"&&(de.host=""),Xe)return;qe=""}ze=tt}continue}qe+=Le;break;case tt:if(Se(de)){if(ze=$e,Le!="/"&&Le!="\\")continue}else if(Xe||Le!="?")if(Xe||Le!="#"){if(Le!=y&&(ze=$e,Le!="/"))continue}else de.fragment="",ze=wt;else de.query="",ze=It;break;case $e:if(Le==y||Le=="/"||Le=="\\"&&Se(de)||!Xe&&(Le=="?"||Le=="#")){if(ge(qe)?(He(de),Le=="/"||Le=="\\"&&Se(de)||de.path.push("")):Ve(qe)?Le=="/"||Le=="\\"&&Se(de)||de.path.push(""):(de.scheme=="file"&&!de.path.length&&Ne(qe)&&(de.host&&(de.host=""),qe=qe.charAt(0)+":"),de.path.push(qe)),qe="",de.scheme=="file"&&(Le==y||Le=="?"||Le=="#"))for(;1<de.path.length&&de.path[0]==="";)de.path.shift();Le=="?"?(de.query="",ze=It):Le=="#"&&(de.fragment="",ze=wt)}else qe+=_e(Le,he);break;case pt:Le=="?"?(de.query="",ze=It):Le=="#"?(de.fragment="",ze=wt):Le!=y&&(de.path[0]+=_e(Le,fe));break;case It:Xe||Le!="#"?Le!=y&&(Le=="'"&&Se(de)?de.query+="%27":de.query+=Le=="#"?"%23":_e(Le,fe)):(de.fragment="",ze=wt);break;case wt:Le!=y&&(de.fragment+=_e(Le,ve))}it++}}function f(Le){var De,Xe,Re=c(this,f,"URL"),st=1<arguments.length?arguments[1]:void 0,Le=String(Le),lt=D(Re,{type:"URL"});if(st!==void 0){if(st instanceof f)De=A(st);else if(Xe=u(De={},String(st)))throw TypeError(Xe)}if(Xe=u(lt,Le,null,De))throw TypeError(Xe);var ze=lt.searchParams=new M;(st=F(ze)).updateSearchParams(lt.query),st.updateURL=function(){lt.query=String(ze)||null},i||(Re.href=yt.call(Re),Re.origin=at.call(Re),Re.protocol=Pt.call(Re),Re.username=Mt.call(Re),Re.password=dt.call(Re),Re.host=At.call(Re),Re.hostname=rr.call(Re),Re.port=nr.call(Re),Re.pathname=or.call(Re),Re.search=hr.call(Re),Re.searchParams=sr.call(Re),Re.hash=ir.call(Re))}function g(de,De){return{get:de,set:De,configurable:!0,enumerable:!0}}var y,o,a,r=T("../internals/export"),i=T("../internals/descriptors"),s=T("../internals/native-url"),ut=T("../internals/global"),n=T("../internals/object-define-properties"),l=T("../internals/redefine"),c=T("../internals/an-instance"),d=T("../internals/has"),v=T("../internals/object-assign"),S=T("../internals/array-from"),E=T("../internals/string-multibyte").codeAt,_=T("../internals/string-punycode-to-ascii"),x=T("../internals/set-to-string-tag"),O=T("../modules/web.url-search-params"),T=T("../internals/internal-state"),P=ut.URL,M=O.URLSearchParams,F=O.getState,D=T.set,A=T.getterFor("URL"),z=Math.floor,G=Math.pow,U="Invalid authority",H="Invalid scheme",Y="Invalid host",oe="Invalid port",L=/[A-Za-z]/,j=/[\d+-.A-Za-z]/,R=/\d/,N=/^(0x|0X)/,X=/^[0-7]+$/,K=/^\d+$/,re=/^[\dA-Fa-f]+$/,ie=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,ee=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,ae=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,ue=/[\u0009\u000A\u000D]/g,Q=function(de,De){var Xe,Re,st;if(De.charAt(0)=="[")return De.charAt(De.length-1)=="]"&&(Xe=(function(Le){var lt=[0,0,0,0,0,0,0,0],ze=0,it=null,qe=0,xt,Et,jt,kt,zt,Nt,Ht,Ot=function(){return Le.charAt(qe)};if(Ot()==":"){if(Le.charAt(1)!=":")return;qe+=2,ze++,it=ze}for(;Ot();){if(ze==8)return;if(Ot()==":"){if(it!==null)return;qe++,ze++,it=ze;continue}for(xt=Et=0;Et<4&&re.test(Ot());)xt=xt*16+parseInt(Ot(),16),qe++,Et++;if(Ot()=="."){if(Et==0||(qe-=Et,ze>6))return;for(jt=0;Ot();){if(kt=null,jt>0)if(Ot()=="."&&jt<4)qe++;else return;if(!R.test(Ot()))return;for(;R.test(Ot());){if(zt=parseInt(Ot(),10),kt===null)kt=zt;else{if(kt==0)return;kt=kt*10+zt}if(kt>255)return;qe++}lt[ze]=lt[ze]*256+kt,jt++,(jt==2||jt==4)&&ze++}if(jt!=4)return;break}else if(Ot()==":"){if(qe++,!Ot())return}else if(Ot())return;lt[ze++]=xt}if(it!==null)for(Nt=ze-it,ze=7;ze!=0&&Nt>0;)Ht=lt[ze],lt[ze--]=lt[it+Nt-1],lt[it+--Nt]=Ht;else if(ze!=8)return;return lt})(De.slice(1,-1)))?void(de.host=Xe):Y;if(Se(de))return De=_(De),ie.test(De)||(Xe=(function(Le){var lt=Le.split("."),ze,it,qe,xt,Et,jt,kt;if(lt.length&&lt[lt.length-1]==""&&lt.pop(),(ze=lt.length)>4)return Le;for(it=[],qe=0;qe<ze;qe++){if(xt=lt[qe],xt=="")return Le;if(Et=10,xt.length>1&&xt.charAt(0)=="0"&&(Et=N.test(xt)?16:8,xt=xt.slice(Et==8?1:2)),xt==="")jt=0;else{if(!(Et==10?K:Et==8?X:re).test(xt))return Le;jt=parseInt(xt,Et)}it.push(jt)}for(qe=0;qe<ze;qe++)if(jt=it[qe],qe==ze-1){if(jt>=G(256,5-ze))return null}else if(jt>255)return null;for(kt=it.pop(),qe=0;qe<it.length;qe++)kt+=it[qe]*G(256,3-qe);return kt})(De))===null?Y:void(de.host=Xe);if(ee.test(De))return Y;for(Xe="",Re=S(De),st=0;st<Re.length;st++)Xe+=_e(Re[st],fe);de.host=Xe},le=function(de){for(var De=null,Xe=1,Re=null,st=0,Le=0;Le<8;Le++)de[Le]!==0?(Xe<st&&(De=Re,Xe=st),Re=null,st=0):(Re===null&&(Re=Le),++st);return Xe<st&&(De=Re,Xe=st),De},fe={},ve=v({},fe,{" ":1,'"':1,"<":1,">":1,"`":1}),he=v({},ve,{"#":1,"?":1,"{":1,"}":1}),me=v({},he,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),_e=function(de,De){var Xe=E(de,0);return 32<Xe&&Xe<127&&!d(De,de)?de:encodeURIComponent(de)},Ae={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Se=function(de){return d(Ae,de.scheme)},Ge=function(de){return de.username!=""||de.password!=""},Ne=function(de,De){return de.length==2&&L.test(de.charAt(0))&&((de=de.charAt(1))==":"||!De&&de=="|")},Be=function(de){return 1<de.length&&Ne(de.slice(0,2))&&(de.length==2||(de=de.charAt(2))==="/"||de==="\\"||de==="?"||de==="#")},He=function(de){var De=de.path,Xe=De.length;!Xe||de.scheme=="file"&&Xe==1&&Ne(De[0],!0)||De.pop()},Ve=function(de){return de==="."||de.toLowerCase()==="%2e"},ge=function(de){return(de=de.toLowerCase())===".."||de==="%2e."||de===".%2e"||de==="%2e%2e"},Ce={},xe={},Z={},$={},q={},te={},pe={},je={},ke={},Ie={},Fe={},Ue={},We={},rt={},et={},Ye={},tt={},$e={},pt={},It={},wt={},ut=f.prototype,yt=function(){var de=A(this),De=de.scheme,Xe=de.username,Re=de.password,st=de.host,Le=de.port,lt=de.path,ze=de.query,it=de.fragment,qe=De+":";return st!==null?(qe+="//",Ge(de)&&(qe+=Xe+(Re?":"+Re:"")+"@"),qe+=p(st),Le!==null&&(qe+=":"+Le)):De=="file"&&(qe+="//"),qe+=de.cannotBeABaseURL?lt[0]:lt.length?"/"+lt.join("/"):"",ze!==null&&(qe+="?"+ze),it!==null&&(qe+="#"+it),qe},at=function(){var de=A(this),De=de.scheme,Xe=de.port;if(De=="blob")try{return new URL(De.path[0]).origin}catch{return"null"}return De!="file"&&Se(de)?De+"://"+p(de.host)+(Xe!==null?":"+Xe:""):"null"},Pt=function(){return A(this).scheme+":"},Mt=function(){return A(this).username},dt=function(){return A(this).password},At=function(){var De=A(this),de=De.host,De=De.port;return de===null?"":De===null?p(de):p(de)+":"+De},rr=function(){var de=A(this).host;return de===null?"":p(de)},nr=function(){var de=A(this).port;return de===null?"":String(de)},or=function(){var de=A(this),De=de.path;return de.cannotBeABaseURL?De[0]:De.length?"/"+De.join("/"):""},hr=function(){var de=A(this).query;return de?"?"+de:""},sr=function(){return A(this).searchParams},ir=function(){var de=A(this).fragment;return de?"#"+de:""};i&&n(ut,{href:g(yt,function(Xe){var De=A(this),Xe=String(Xe),Xe=u(De,Xe);if(Xe)throw TypeError(Xe);F(De.searchParams).updateSearchParams(De.query)}),origin:g(at),protocol:g(Pt,function(de){var De=A(this);u(De,String(de)+":",Ce)}),username:g(Mt,function(de){var De=A(this),Xe=S(String(de));if(!m(De)){De.username="";for(var Re=0;Re<Xe.length;Re++)De.username+=_e(Xe[Re],me)}}),password:g(dt,function(de){var De=A(this),Xe=S(String(de));if(!m(De)){De.password="";for(var Re=0;Re<Xe.length;Re++)De.password+=_e(Xe[Re],me)}}),host:g(At,function(de){var De=A(this);De.cannotBeABaseURL||u(De,String(de),Fe)}),hostname:g(rr,function(de){var De=A(this);De.cannotBeABaseURL||u(De,String(de),Ue)}),port:g(nr,function(de){var De=A(this);m(De)||((de=String(de))==""?De.port=null:u(De,de,We))}),pathname:g(or,function(de){var De=A(this);De.cannotBeABaseURL||(De.path=[],u(De,de+"",tt))}),search:g(hr,function(de){var De=A(this);(de=String(de))==""?De.query=null:(de.charAt(0)=="?"&&(de=de.slice(1)),De.query="",u(De,de,It)),F(De.searchParams).updateSearchParams(De.query)}),searchParams:g(sr),hash:g(ir,function(de){var De=A(this);(de=String(de))==""?De.fragment=null:(de.charAt(0)=="#"&&(de=de.slice(1)),De.fragment="",u(De,de,wt))})}),l(ut,"toJSON",function(){return yt.call(this)},{enumerable:!0}),l(ut,"toString",function(){return yt.call(this)},{enumerable:!0}),P&&(o=P.createObjectURL,a=P.revokeObjectURL,o&&l(f,"createObjectURL",function(de){return o.apply(P,arguments)}),a&&l(f,"revokeObjectURL",function(de){return a.apply(P,arguments)})),x(f,"URL"),r({global:!0,forced:!s,sham:!i},{URL:f})},{"../internals/an-instance":9,"../internals/array-from":17,"../internals/descriptors":43,"../internals/export":50,"../internals/global":60,"../internals/has":61,"../internals/internal-state":71,"../internals/native-url":85,"../internals/object-assign":90,"../internals/object-define-properties":92,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/string-multibyte":125,"../internals/string-punycode-to-ascii":128,"../modules/es.string.iterator":200,"../modules/web.url-search-params":247}],249:[function(t,W,C){"use strict";W.exports=t("./").polyfill()},{"./":250}],250:[function(t,W,C){(function(p,m){var u,f;u=this,f=function(){"use strict";function g(Q){return typeof Q=="function"}var y=Array.isArray||function(Q){return Object.prototype.toString.call(Q)==="[object Array]"},o=0,a=void 0,r=void 0,i=function(Q,le){v[o]=Q,v[o+1]=le,(o+=2)===2&&(r?r(S):M())},s=typeof window<"u"?window:void 0,n=s||{},n=n.MutationObserver||n.WebKitMutationObserver,l=typeof self>"u"&&p!==void 0&&{}.toString.call(p)==="[object process]",c=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function d(){var Q=setTimeout;return function(){return Q(S,1)}}var v=new Array(1e3);function S(){for(var Q=0;Q<o;Q+=2)(0,v[Q])(v[Q+1]),v[Q]=void 0,v[Q+1]=void 0;o=0}function E(){try{var Q=Function("return this")().require("vertx");return(a=Q.runOnLoop||Q.runOnContext)!==void 0?function(){a(S)}:d()}catch{return d()}}var _,x,O,M=void 0;function T(Q,le){var fe,ve=this,he=new this.constructor(D),me=(he[F]===void 0&&re(he),ve._state);return me?(fe=arguments[me-1],i(function(){return X(me,he,fe,ve._result)})):R(ve,he,Q,le),he}function P(Q){var le;return Q&&typeof Q=="object"&&Q.constructor===this?Q:(Y(le=new this(D),Q),le)}var M=l?function(){return p.nextTick(S)}:n?(x=0,l=new n(S),O=document.createTextNode(""),l.observe(O,{characterData:!0}),function(){O.data=x=++x%2}):c?((_=new MessageChannel).port1.onmessage=S,function(){return _.port2.postMessage(0)}):(s===void 0&&typeof t=="function"?E:d)(),F=Math.random().toString(36).substring(2);function D(){}var A=void 0,z=1,G=2;function U(Q,le,fe){i(function(ve){var he=!1,me=(function(_e,Ae,Se,Ge){try{_e.call(Ae,Se,Ge)}catch(Ne){return Ne}})(fe,le,function(_e){he||(he=!0,(le!==_e?Y:L)(ve,_e))},function(_e){he||(he=!0,j(ve,_e))},ve._label);!he&&me&&(he=!0,j(ve,me))},Q)}function H(Q,le,fe){var ve,he;le.constructor===Q.constructor&&fe===T&&le.constructor.resolve===P?(ve=Q,(he=le)._state===z?L(ve,he._result):he._state===G?j(ve,he._result):R(he,void 0,function(me){return Y(ve,me)},function(me){return j(ve,me)})):fe!==void 0&&g(fe)?U(Q,le,fe):L(Q,le)}function Y(Q,le){if(Q===le)j(Q,new TypeError("You cannot resolve a promise with itself"));else if(fe=typeof le,le===null||fe!="object"&&fe!="function")L(Q,le);else{fe=void 0;try{fe=le.then}catch(ve){return void j(Q,ve)}H(Q,le,fe)}var fe}function oe(Q){Q._onerror&&Q._onerror(Q._result),N(Q)}function L(Q,le){Q._state===A&&(Q._result=le,Q._state=z,Q._subscribers.length!==0&&i(N,Q))}function j(Q,le){Q._state===A&&(Q._state=G,Q._result=le,i(oe,Q))}function R(Q,le,fe,ve){var he=Q._subscribers,me=he.length;Q._onerror=null,he[me]=le,he[me+z]=fe,he[me+G]=ve,me===0&&Q._state&&i(N,Q)}function N(Q){var le=Q._subscribers,fe=Q._state;if(le.length!==0){for(var ve,he=void 0,me=Q._result,_e=0;_e<le.length;_e+=3)ve=le[_e],he=le[_e+fe],ve?X(fe,ve,he,me):he(me);Q._subscribers.length=0}}function X(Q,le,fe,ve){var he=g(fe),me=void 0,_e=void 0,Ae=!0;if(he){try{me=fe(ve)}catch(Se){Ae=!1,_e=Se}if(le===me)return void j(le,new TypeError("A promises callback cannot return that same promise."))}else me=ve;le._state===A&&(he&&Ae?Y(le,me):Ae===!1?j(le,_e):Q===z?L(le,me):Q===G&&j(le,me))}var K=0;function re(Q){Q[F]=K++,Q._state=void 0,Q._result=void 0,Q._subscribers=[]}ee.prototype._enumerate=function(Q){for(var le=0;this._state===A&&le<Q.length;le++)this._eachEntry(Q[le],le)},ee.prototype._eachEntry=function(Q,le){var fe=this._instanceConstructor,ve=fe.resolve;if(ve===P){var he,me=void 0,_e=void 0,Ae=!1;try{me=Q.then}catch(Se){Ae=!0,_e=Se}me===T&&Q._state!==A?this._settledAt(Q._state,le,Q._result):typeof me!="function"?(this._remaining--,this._result[le]=Q):fe===ae?(he=new fe(D),Ae?j(he,_e):H(he,Q,me),this._willSettleAt(he,le)):this._willSettleAt(new fe(function(Se){return Se(Q)}),le)}else this._willSettleAt(ve(Q),le)},ee.prototype._settledAt=function(Q,le,fe){var ve=this.promise;ve._state===A&&(this._remaining--,Q===G?j(ve,fe):this._result[le]=fe),this._remaining===0&&L(ve,this._result)},ee.prototype._willSettleAt=function(Q,le){var fe=this;R(Q,void 0,function(ve){return fe._settledAt(z,le,ve)},function(ve){return fe._settledAt(G,le,ve)})};var ie=ee;function ee(Q,le){this._instanceConstructor=Q,this.promise=new Q(D),this.promise[F]||re(this.promise),y(le)?(this.length=le.length,this._remaining=le.length,this._result=new Array(this.length),this.length!==0&&(this.length=this.length||0,this._enumerate(le),this._remaining!==0)||L(this.promise,this._result)):j(this.promise,new Error("Array Methods must be provided an Array"))}ue.prototype.catch=function(Q){return this.then(null,Q)},ue.prototype.finally=function(Q){var le=this.constructor;return g(Q)?this.then(function(fe){return le.resolve(Q()).then(function(){return fe})},function(fe){return le.resolve(Q()).then(function(){throw fe})}):this.then(Q,Q)};var ae=ue;function ue(Q){if(this[F]=K++,this._result=this._state=void 0,this._subscribers=[],D!==Q){if(typeof Q!="function")throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof ue))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");var le=this;try{Q(function(fe){Y(le,fe)},function(fe){j(le,fe)})}catch(fe){j(le,fe)}}}return ae.prototype.then=T,ae.all=function(Q){return new ie(this,Q).promise},ae.race=function(Q){var le=this;return y(Q)?new le(function(fe,ve){for(var he=Q.length,me=0;me<he;me++)le.resolve(Q[me]).then(fe,ve)}):new le(function(fe,ve){return ve(new TypeError("You must pass an array to race."))})},ae.resolve=P,ae.reject=function(Q){var le=new this(D);return j(le,Q),le},ae._setScheduler=function(Q){r=Q},ae._setAsap=function(Q){i=Q},ae._asap=i,ae.polyfill=function(){var Q=void 0;if(m!==void 0)Q=m;else if(typeof self<"u")Q=self;else try{Q=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var le=Q.Promise;if(le){var fe=null;try{fe=Object.prototype.toString.call(le.resolve())}catch{}if(fe==="[object Promise]"&&!le.cast)return}Q.Promise=ae},ae.Promise=ae},typeof C=="object"&&W!==void 0?W.exports=f():typeof Rt=="function"&&Rt.amd?Rt(f):u.ES6Promise=f()}).call(this,t("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:259}],251:[function(t,W,C){var p,m;p=this,m=function(u,f){"use strict";var g=5e3,y="callback";function o(r){try{delete window[r]}catch{window[r]=void 0}}function a(r){r=document.getElementById(r),r&&document.getElementsByTagName("head")[0].removeChild(r)}f.exports=function(r){var i=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],s=r,n=i.timeout||g,l=i.jsonpCallback||y,c=void 0;return new Promise(function(d,v){var S=i.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),E=l+"_"+S,_=(window[S]=function(x){d({ok:!0,json:function(){return Promise.resolve(x)}}),c&&clearTimeout(c),a(E),o(S)},s+=s.indexOf("?")===-1?"?":"&",document.createElement("script"));_.setAttribute("src",""+s+l+"="+S),i.charset&&_.setAttribute("charset",i.charset),_.id=E,document.getElementsByTagName("head")[0].appendChild(_),c=setTimeout(function(){v(new Error("JSONP request to "+r+" timed out")),o(S),a(E),window[S]=function(){o(S)}},n),_.onerror=function(){v(new Error("JSONP request to "+r+" failed")),o(S),a(E),c&&clearTimeout(c)}})}},typeof Rt=="function"&&Rt.amd?Rt(["exports","module"],m):C!==void 0&&W!==void 0?m(0,W):(m(m={exports:{}},m),p.fetchJsonp=m.exports)},{}],252:[function(t,W,C){var p=(function(m){"use strict";var u,f,g,y,o,a,r,i,s,n,l;if(!(m===void 0||typeof navigator<"u"&&/MSIE [1-9]\./.test(navigator.userAgent)))return l=m.document,u=function(){return m.URL||m.webkitURL||m},f=l.createElementNS("http://www.w3.org/1999/xhtml","a"),g="download"in f,y=/constructor/i.test(m.HTMLElement)||m.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),a=function(c){(m.setImmediate||m.setTimeout)(function(){throw c},0)},r=4e4,i=function(c){setTimeout(function(){typeof c=="string"?u().revokeObjectURL(c):c.remove()},r)},s=function(c){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c},l=(n=function(c,d,x){x||(c=s(c));var S,E,_=this,x=c.type==="application/octet-stream",O=function(){for(var T=_,P="writestart progress write writeend".split(" "),M=void 0,F=(P=[].concat(P)).length;F--;){var D=T["on"+P[F]];if(typeof D=="function")try{D.call(T,M||T)}catch(A){a(A)}}};_.readyState=_.INIT,g?(S=u().createObjectURL(c),setTimeout(function(){var T,P;f.href=S,f.download=d,T=f,P=new MouseEvent("click"),T.dispatchEvent(P),O(),i(S),_.readyState=_.DONE})):(o||x&&y)&&m.FileReader?((E=new FileReader).onloadend=function(){var T=o?E.result:E.result.replace(/^data:[^;]*;/,"data:attachment/file;");m.open(T,"_blank")||(m.location.href=T),T=void 0,_.readyState=_.DONE,O()},E.readAsDataURL(c),_.readyState=_.INIT):(S=S||u().createObjectURL(c),!x&&m.open(S,"_blank")||(m.location.href=S),_.readyState=_.DONE,O(),i(S))}).prototype,typeof navigator<"u"&&navigator.msSaveOrOpenBlob?function(c,d,v){return d=d||c.name||"download",v||(c=s(c)),navigator.msSaveOrOpenBlob(c,d)}:(l.abort=function(){},l.readyState=l.INIT=0,l.WRITING=1,l.DONE=2,l.error=l.onwritestart=l.onprogress=l.onwrite=l.onabort=l.onerror=l.onwriteend=null,function(c,d,v){return new n(c,d||c.name||"download",v)})})(typeof self<"u"&&self||typeof window<"u"&&window||this.content);W!==void 0&&W.exports?W.exports.saveAs=p:Rt!=null&&Rt.amd!==null&&Rt("FileSaver.js",function(){return p})},{}],253:[function(t,W,C){var p,m=Object.defineProperty,u=(m(C,"__esModule",{value:!0}),C),f={GIFEncoder:()=>O,applyPalette:()=>function(A,z,G="rgb565"){if(!A||!A.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(A instanceof Uint8Array||A instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(256<z.length)throw new Error("applyPalette() only works with 256 colors or less");let U=new Uint32Array(A.buffer),H=U.length,Y=G==="rgb444"?4096:65536,oe=new Uint8Array(H),L=new Array(Y);if(G==="rgba4444")for(let ue=0;ue<H;ue++){var X=U[ue],j=X>>24&255,R=X>>16&255,N=X>>8&255,X=255&X,K=i(X,N,R,j),K=K in L?L[K]:L[K]=(function(Q,le,fe,ve,he){let me=0,_e=1e100;for(let Ne=0;Ne<he.length;Ne++){var Ae,Se=he[Ne],Ge=E(Se[3]-ve);Ge>_e||(Ae=Se[0],(Ge+=E(Ae-Q))>_e||(Ae=Se[1],(Ge+=E(Ae-le))>_e||(Ae=Se[2],(Ge+=E(Ae-fe))>_e||(_e=Ge,me=Ne))))}return me})(X,N,R,j,z);oe[ue]=K}else{let ue=G==="rgb444"?s:r;for(let Q=0;Q<H;Q++){var ee=U[Q],re=ee>>16&255,ie=ee>>8&255,ee=255&ee,ae=ue(ee,ie,re),ae=ae in L?L[ae]:L[ae]=(function(le,fe,ve,he){let me=0,_e=1e100;for(let Ne=0;Ne<he.length;Ne++){var Ae,Se=he[Ne],Ge=E(Se[0]-le);Ge>_e||(Ae=Se[1],(Ge+=E(Ae-fe))>_e||(Ae=Se[2],(Ge+=E(Ae-ve))>_e||(_e=Ge,me=Ne)))}return me})(ee,ie,re,z);oe[Q]=ae}}return oe},default:()=>D,nearestColor:()=>function(A,z,G=v){return A[_(A,z,G)]},nearestColorIndex:()=>_,nearestColorIndexWithDistance:()=>x,prequantize:()=>function(A,{roundRGB:z=5,roundAlpha:G=10,oneBitAlpha:U=null}={}){let H=new Uint32Array(A.buffer);for(let R=0;R<H.length;R++){var j=H[R];let N=j>>24&255;var Y,oe=j>>16&255,L=j>>8&255,j=255&j;N=S(N,G),U&&(Y=typeof U=="number"?U:127,N=N<=Y?0:255),j=S(j,z),L=S(L,z),oe=S(oe,z),H[R]=N<<24|oe<<16|L<<8|j<<0}},quantize:()=>function(A,z,G={}){var{format:U="rgb565",clearAlpha:H=!0,clearAlphaColor:Y=0,clearAlphaThreshold:oe=0,oneBitAlpha:L=!1}=G;if(!A||!A.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(A instanceof Uint8Array||A instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");A=new Uint32Array(A.buffer);let j=G.useSqrt!==!1,R=U==="rgba4444",N=(function(Be,He){let Ve=He==="rgb444"?4096:65536,ge=new Array(Ve),Ce=Be.length;if(He==="rgba4444")for(let et=0;et<Ce;++et){var q=Be[et],xe=q>>24&255,Z=q>>16&255,$=q>>8&255,q=255&q,te=i(q,$,Z,xe);let Ye=te in ge?ge[te]:ge[te]=d();Ye.rc+=q,Ye.gc+=$,Ye.bc+=Z,Ye.ac+=xe,Ye.cnt++}else if(He==="rgb444")for(let et=0;et<Ce;++et){var ke=Be[et],pe=ke>>16&255,je=ke>>8&255,ke=255&ke,Ie=s(ke,je,pe);let Ye=Ie in ge?ge[Ie]:ge[Ie]=d();Ye.rc+=ke,Ye.gc+=je,Ye.bc+=pe,Ye.cnt++}else for(let et=0;et<Ce;++et){var We=Be[et],Fe=We>>16&255,Ue=We>>8&255,We=255&We,rt=r(We,Ue,Fe);let Ye=rt in ge?ge[rt]:ge[rt]=d();Ye.rc+=We,Ye.gc+=Ue,Ye.bc+=Fe,Ye.cnt++}return ge})(A,U),X=N.length,K=X-1,re=new Uint32Array(X+1);for(var ie=0,ee=0;ee<X;++ee){let Be=N[ee];Be!=null&&(Se=1/Be.cnt,R&&(Be.ac*=Se),Be.rc*=Se,Be.gc*=Se,Be.bc*=Se,N[ie++]=Be)}l(z)/ie<.022&&(j=!1);for(var ae,ue,Q,ee=0;ee<ie-1;++ee)N[ee].fw=ee+1,N[ee+1].bk=ee,j&&(N[ee].cnt=Math.sqrt(N[ee].cnt));for(j&&(N[ee].cnt=Math.sqrt(N[ee].cnt)),ee=0;ee<ie;++ee){c(N,ee,!1);var le=N[ee].err;for(ue=++re[0];1<ue&&(Q=ue>>1,!(N[ae=re[Q]].err<=le));ue=Q)re[ue]=ae;re[ue]=ee}var fe,ve=ie-z;for(ee=0;ee<ve;){for(;;){var he=re[1];if((fe=N[he]).tm>=fe.mtm&&N[fe.nn].mtm<=fe.tm)break;for(fe.mtm==K?he=re[1]=re[re[0]--]:(c(N,he,!1),fe.tm=ee),le=N[he].err,ue=1;(Q=ue+ue)<=re[0]&&(Q<re[0]&&N[re[Q]].err>N[re[Q+1]].err&&Q++,!(le<=N[ae=re[Q]].err));ue=Q)re[ue]=ae;re[ue]=he}var me=N[fe.nn],_e=fe.cnt,Ae=me.cnt,Se=1/(_e+Ae);R&&(fe.ac=Se*(_e*fe.ac+Ae*me.ac)),fe.rc=Se*(_e*fe.rc+Ae*me.rc),fe.gc=Se*(_e*fe.gc+Ae*me.gc),fe.bc=Se*(_e*fe.bc+Ae*me.bc),fe.cnt+=me.cnt,fe.mtm=++ee,N[me.bk].fw=me.fw,N[me.fw].bk=me.bk,me.mtm=K}let Ge=[];for(ee=0;;0){let Be=n(Math.round(N[ee].rc),0,255),He=n(Math.round(N[ee].gc),0,255),Ve=n(Math.round(N[ee].bc),0,255),ge=255;R&&(ge=n(Math.round(N[ee].ac),0,255),L&&(Ne=typeof L=="number"?L:127,ge=ge<=Ne?0:255),H&&ge<=oe&&(Be=He=Ve=Y,ge=0));var Ne=R?[Be,He,Ve,ge]:[Be,He,Ve];if((function(Ce,xe){for(let q=0;q<Ce.length;q++){var $=Ce[q],Z=$[0]===xe[0]&&$[1]===xe[1]&&$[2]===xe[2],$=!(4<=$.length&&4<=xe.length)||$[3]===xe[3];if(Z&&$)return!0}return!1})(Ge,Ne)||Ge.push(Ne),(ee=N[ee].fw)==0)break}return Ge},snapColorsToPalette:()=>function(A,z,G=5){if(A.length&&z.length){var U=A.map(j=>j.slice(0,3)),H=G*G,Y=A[0].length;for(let j=0;j<z.length;j++){let R=z[j];R=R.length<Y?[R[0],R[1],R[2],255]:R.length>Y?R.slice(0,3):R.slice();var L=x(U,R.slice(0,3),v),oe=L[0],L=L[1];0<L&&L<=H&&(A[oe]=R)}}}};for(p in f)m(u,p,{get:f[p],enumerable:!0});var g={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function y(A=256){let z=0,G=new Uint8Array(A);return{get buffer(){return G.buffer},reset(){z=0},bytesView(){return G.subarray(0,z)},bytes(){return G.slice(0,z)},writeByte(H){U(z+1),G[z]=H,z++},writeBytes(H,Y=0,oe=H.length){U(z+oe);for(let L=0;L<oe;L++)G[z++]=H[L+Y]},writeBytesView(H,Y=0,oe=H.byteLength){U(z+oe),G.set(H.subarray(Y,Y+oe),z),z+=oe}};function U(H){var Y=G.length;if(!(H<=Y)){H=Math.max(H,Y*(Y<1048576?2:1.125)>>>0),Y!=0&&(H=Math.max(H,256));let oe=G;G=new Uint8Array(H),0<z&&G.set(oe.subarray(0,z),0)}}}var o=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],a=function(A,z,G,R,H=y(512),Y=new Uint8Array(256),oe=new Int32Array(5003),L=new Int32Array(5003)){var j=oe.length,R=Math.max(2,R);Y.fill(0),L.fill(0),oe.fill(-1);let N=0,X=0;var K=R+1;let re=K,ie=!1,ee=re,ae=(1<<ee)-1;var ue=1<<K-1;let Q=1+ue,le=2+ue,fe=0,ve=G[0],he=0;for(let Ne=j;Ne<65536;Ne*=2)++he;he=8-he,H.writeByte(R),Ge(ue);var me=G.length;for(let Ne=1;Ne<me;Ne++)e:{var _e=G[Ne],Ae=(_e<<12)+ve;let Be=_e<<he^ve;if(oe[Be]===Ae)ve=L[Be];else{for(var Se=Be===0?1:j-Be;0<=oe[Be];)if((Be-=Se)<0&&(Be+=j),oe[Be]===Ae){ve=L[Be];break e}Ge(ve),ve=_e,le<4096?(L[Be]=le++,oe[Be]=Ae):(oe.fill(-1),le=2+ue,ie=!0,Ge(ue))}}return Ge(ve),Ge(Q),H.writeByte(0),H.bytesView();function Ge(Ne){for(N&=o[X],0<X?N|=Ne<<X:N=Ne,X+=ee;8<=X;)Y[fe++]=255&N,254<=fe&&(H.writeByte(fe),H.writeBytesView(Y,0,fe),fe=0),N>>=8,X-=8;if((le>ae||ie)&&(ie?(ee=re,ae=(1<<ee)-1,ie=!1):(++ee,ae=ee===12?1<<ee:(1<<ee)-1)),Ne==Q){for(;0<X;)Y[fe++]=255&N,254<=fe&&(H.writeByte(fe),H.writeBytesView(Y,0,fe),fe=0),N>>=8,X-=8;0<fe&&(H.writeByte(fe),H.writeBytesView(Y,0,fe),fe=0)}}};function r(A,z,G){return A<<8&63488|z<<2&992|G>>3}function i(A,z,G,U){return A>>4|240&z|(240&G)<<4|(240&U)<<8}function s(A,z,G){return A>>4<<8|240&z|G>>4}function n(A,z,G){return A<z?z:G<A?G:A}function l(A){return A*A}function c(A,z,G){var U=0,H=1e100;let Y=A[z];for(var oe=Y.cnt,L=Y.ac,j=Y.rc,R=Y.gc,N=Y.bc,X=Y.fw;X!=0;X=A[X].fw){var K,re=A[X],ie=re.cnt,ie=oe*ie/(oe+ie);H<=ie||(K=0,G&&H<=(K+=ie*l(re.ac-L))||H<=(K+=ie*l(re.rc-j))||H<=(K+=ie*l(re.gc-R))||H<=(K+=ie*l(re.bc-N))||(H=K,U=X))}Y.err=H,Y.nn=U}function d(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function v(A,z){for(var G=0,U=0;U<A.length;U++){var H=A[U]-z[U];G+=H*H}return G}function S(A,z){return 1<z?Math.round(A/z)*z:A}function E(A){return A*A}function _(A,z,G=v){let U=1/0,H=-1;for(let oe=0;oe<A.length;oe++){var Y=G(z,A[oe]);Y<U&&(U=Y,H=oe)}return H}function x(A,z,G=v){let U=1/0,H=-1;for(let oe=0;oe<A.length;oe++){var Y=G(z,A[oe]);Y<U&&(U=Y,H=oe)}return[H,U]}function O(A={}){let{initialCapacity:z=4096,auto:G=!0}=A,U=y(z),H=new Uint8Array(256),Y=new Int32Array(5003),oe=new Int32Array(5003),L=!1;return{reset(){U.reset(),L=!1},finish(){U.writeByte(g.trailer)},bytes(){return U.bytes()},bytesView(){return U.bytesView()},get buffer(){return U.buffer},get stream(){return U},writeHeader:j,writeFrame(R,N,X,ve={}){var{transparent:re=!1,transparentIndex:ie=0,delay:Se=0,palette:ee=null,repeat:me=0,colorDepth:ae=8,dispose:ue=-1}=ve;let Q=!1;if(G?L||(Q=!0,j(),L=!0):Q=!!ve.first,N=Math.max(0,Math.floor(N)),X=Math.max(0,Math.floor(X)),Q){if(!ee)throw new Error("First frame must include a { palette } option");var[ve,_e,fe,Ae,he=8]=[U,N,X,ee,ae];Ae=F(Ae.length)-1,he=128|he-1<<4|Ae,P(ve,_e),P(ve,fe),ve.writeBytes([he,0,0]),T(U,ee),0<=me&&(Ae=U,_e=me,Ae.writeByte(33),Ae.writeByte(255),Ae.writeByte(11),M(Ae,"NETSCAPE2.0"),Ae.writeByte(3),Ae.writeByte(1),P(Ae,_e),Ae.writeByte(0))}var le,fe=Math.round(Se/10),ve=U,he=ue,me=fe,_e=re,Ae=ie,Se=(ve.writeByte(33),ve.writeByte(249),ve.writeByte(4),Ae<0&&(Ae=0,_e=!1),_e=_e?(le=1,2):le=0,0<=he&&(_e=7&he),_e<<=2,ve.writeByte(0|_e|le),P(ve,me),ve.writeByte(Ae||0),ve.writeByte(0),!!ee&&!Q);ue=U,re=N,ie=X,le=Se?ee:null,ue.writeByte(44),P(ue,0),P(ue,0),P(ue,re),P(ue,ie),le?(re=F(le.length)-1,ue.writeByte(128|re)):ue.writeByte(0),Se&&T(U,ee),[me,ve,ie,re,ue=8,Se,ee,R]=[U,R,N,X,ae,H,Y,oe],a(ie,re,ve,ue,me,Se,ee,R)}};function j(){M(U,"GIF89a")}}function T(A,z){var G=1<<F(z.length);for(let U=0;U<G;U++){let H=[0,0,0];U<z.length&&(H=z[U]),A.writeByte(H[0]),A.writeByte(H[1]),A.writeByte(H[2])}}function P(A,z){A.writeByte(255&z),A.writeByte(z>>8&255)}function M(A,z){for(var G=0;G<z.length;G++)A.writeByte(z.charCodeAt(G))}function F(A){return Math.max(Math.ceil(Math.log2(A)),1)}var D=O},{}],254:[function(t,W,C){C.read=function(p,m,u,f,c){var y,o,a=8*c-f-1,r=(1<<a)-1,i=r>>1,s=-7,n=u?c-1:0,l=u?-1:1,c=p[m+n];for(n+=l,y=c&(1<<-s)-1,c>>=-s,s+=a;0<s;y=256*y+p[m+n],n+=l,s-=8);for(o=y&(1<<-s)-1,y>>=-s,s+=f;0<s;o=256*o+p[m+n],n+=l,s-=8);if(y===0)y=1-i;else{if(y===r)return o?NaN:1/0*(c?-1:1);o+=Math.pow(2,f),y-=i}return(c?-1:1)*o*Math.pow(2,y-f)},C.write=function(p,m,u,f,g,d){var o,a,r=8*d-g-1,i=(1<<r)-1,s=i>>1,n=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,l=f?0:d-1,c=f?1:-1,d=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(a=isNaN(m)?1:0,o=i):(o=Math.floor(Math.log(m)/Math.LN2),m*(f=Math.pow(2,-o))<1&&(o--,f*=2),2<=(m+=1<=o+s?n/f:n*Math.pow(2,1-s))*f&&(o++,f/=2),i<=o+s?(a=0,o=i):1<=o+s?(a=(m*f-1)*Math.pow(2,g),o+=s):(a=m*Math.pow(2,s-1)*Math.pow(2,g),o=0));8<=g;p[u+l]=255&a,l+=c,a/=256,g-=8);for(o=o<<g|a,r+=g;0<r;p[u+l]=255&o,l+=c,o/=256,r-=8);p[u+l-c]|=128*d}},{}],255:[function(t,W,C){"use strict";var p;function m(Z,$){return Z.b===$.b&&Z.a===$.a}function u(Z,$){return Z.b<$.b||Z.b===$.b&&Z.a<=$.a}function f(Z,$,q){var te=$.b-Z.b,pe=q.b-$.b;return 0<te+pe?te<pe?$.a-Z.a+te/(te+pe)*(Z.a-q.a):$.a-q.a+pe/(te+pe)*(q.a-Z.a):0}function g(Z,$,q){var te=$.b-Z.b,pe=q.b-$.b;return 0<te+pe?($.a-q.a)*te+($.a-Z.a)*pe:0}function y(Z,$){return Z.a<$.a||Z.a===$.a&&Z.b<=$.b}function o(Z,$,q){var te=$.a-Z.a,pe=q.a-$.a;return 0<te+pe?te<pe?$.b-Z.b+te/(te+pe)*(Z.b-q.b):$.b-q.b+pe/(te+pe)*(q.b-Z.b):0}function a(Z,$,q){var te=$.a-Z.a,pe=q.a-$.a;return 0<te+pe?($.b-q.b)*te+($.b-Z.b)*pe:0}function r(Z,$,q,te){return(Z=Z<0?0:Z)<=(q=q<0?0:q)?q===0?($+te)/2:$+Z/(Z+q)*(te-$):te+q/(Z+q)*($-te)}function i(Z){var $=d(Z.b);return S($,Z.c),S($.b,Z.c),E($,Z.a),$}function s(Z,$){var q=!1,te=!1;Z!==$&&($.a!==Z.a&&(te=!0,x($.a,Z.a)),$.d!==Z.d&&(q=!0,O($.d,Z.d)),v($,Z),te||(S($,Z.a),Z.a.c=Z),q||(E($,Z.d),Z.d.a=Z))}function n(Z){var $=Z.b,q=!1;Z.d!==Z.b.d&&(q=!0,O(Z.d,Z.b.d)),Z.c===Z?x(Z.a,null):(Z.b.d.a=Z.b.e,Z.a.c=Z.c,v(Z,Z.b.e),q||E(Z,Z.d)),$.c===$?(x($.a,null),O($.d,null)):(Z.d.a=$.b.e,$.a.c=$.c,v($,$.b.e)),_(Z)}function l(Z){var $=d(Z),q=$.b;return v($,Z.e),$.a=Z.b.a,S(q,$.a),$.d=q.d=Z.d,$=$.b,v(Z.b,Z.b.b.e),v(Z.b,$),Z.b.a=$.a,$.b.a.c=$.b,$.b.d=Z.b.d,$.f=Z.f,$.b.f=Z.b.f,$}function c(Z,$){var q=!1,te=d(Z),pe=te.b;return $.d!==Z.d&&(q=!0,O($.d,Z.d)),v(te,Z.e),v(pe,$),te.a=Z.b.a,pe.a=$.a,te.d=pe.d=Z.d,Z.d.a=pe,q||E(te,Z.d),te}function d(Z){var $=new fe,q=new fe,te=Z.b.h;return(((q.h=te).b.h=$).h=Z).b.h=q,$.b=q,(($.c=$).e=q).b=$,(q.c=q).e=$}function v(Z,$){var q=Z.c,te=$.c;q.b.e=$,(te.b.e=Z).c=te,$.c=q}function S(Z,$){var q=$.f,te=new he($,q);for(q.e=te,q=($.f=te).c=Z;q.a=te,(q=q.c)!==Z;);}function E(Z,$){var q=$.d,te=new le($,q);for(q.b=te,($.d=te).a=Z,te.c=$.c,q=Z;q.d=te,(q=q.e)!==Z;);}function _(Z){var $=Z.h;Z=Z.b.h,($.b.h=Z).b.h=$}function x(Z,$){for(var q=Z.c,te=q;te.a=$,(te=te.c)!==q;);q=Z.f,((te=Z.e).f=q).e=te}function O(Z,$){for(var q=Z.a,te=q;te.d=$,(te=te.e)!==q;);q=Z.d,((te=Z.b).d=q).b=te}function T(Z){var $=0;return Math.abs(Z[1])>Math.abs(Z[0])&&($=1),$=Math.abs(Z[2])>Math.abs(Z[$])?2:$}function P(Z,$){Z.f+=$.f,Z.b.f+=$.b.f}function M(Z,$,q){return Z=Z.a,$=$.a,q=q.a,$.b.a===Z?q.b.a===Z?u($.a,q.a)?g(q.b.a,$.a,q.a)<=0:0<=g($.b.a,q.a,$.a):g(q.b.a,Z,q.a)<=0:q.b.a===Z?0<=g($.b.a,Z,$.a):($=f($.b.a,Z,$.a),(Z=f(q.b.a,Z,q.a))<=$)}function F(Z){Z.a.i=null;var $=Z.e;$.a.c=$.c,$.c.a=$.a,Z.e=null}function D(Z,$){n(Z.a),Z.c=!1,(Z.a=$).i=Z}function A(Z){for(var $=Z.a.a;(Z=xe(Z)).a.a===$;);return Z.c&&(D(Z,$=c(Ce(Z).a.b,Z.a.e)),Z=xe(Z)),Z}function z(Z,$,q){var te=new ge;return te.a=q,te.e=ie(Z.f,$.e,te),q.i=te}function G(Z,$){switch(Z.s){case 100130:return(1&$)!=0;case 100131:return $!==0;case 100132:return 0<$;case 100133:return $<0;case 100134:return 2<=$||$<=-2}return!1}function U(Z){var $=Z.a,q=$.d;q.c=Z.d,q.a=$,F(Z)}function H(Z,$,q){for($=(Z=$).a;Z!==q;){Z.c=!1;var te=Ce(Z),pe=te.a;if(pe.a!==$.a){if(!te.c){U(Z);break}D(te,pe=c($.c.b,pe.b))}$.c!==pe&&(s(pe.b.e,pe),s($,pe)),U(Z),$=te.a,Z=te}return $}function Y(Z,$,q,te,pe,je){for(var ke=!0;z(Z,$,q.b),(q=q.c)!==te;);for(pe===null&&(pe=Ce($).a.b.c);(q=(te=Ce($)).a.b).a===pe.a;)q.c!==pe&&(s(q.b.e,q),s(pe.b.e,q)),te.f=$.f-q.f,te.d=G(Z,te.f),$.b=!0,!ke&&R(Z,$)&&(P(q,pe),F($),n(pe)),ke=!1,$=te,pe=q;$.b=!0,je&&X(Z,$)}function oe(Z,$,q,te,pe){var je=[$.g[0],$.g[1],$.g[2]];$.d=null,$.d=Z.o&&Z.o(je,q,te,Z.c)||null,$.d===null&&(pe?Z.n||(Q(Z,100156),Z.n=!0):$.d=q[0])}function L(Z,$,q){var te=[null,null,null,null];te[0]=$.a.d,te[1]=q.a.d,oe(Z,$.a,te,[.5,.5,0,0],!1),s($,q)}function j(Z,$,q,te,pe){var je=Math.abs($.b-Z.b)+Math.abs($.a-Z.a),ke=Math.abs(q.b-Z.b)+Math.abs(q.a-Z.a),Ie=pe+1;te[pe]=.5*ke/(je+ke),te[Ie]=.5*je/(je+ke),Z.g[0]+=te[pe]*$.g[0]+te[Ie]*q.g[0],Z.g[1]+=te[pe]*$.g[1]+te[Ie]*q.g[1],Z.g[2]+=te[pe]*$.g[2]+te[Ie]*q.g[2]}function R(Z,$){var q=Ce($),te=$.a,pe=q.a;if(u(te.a,pe.a)){if(0<g(pe.b.a,te.a,pe.a))return;if(m(te.a,pe.a)){if(te.a!==pe.a){var q=Z.e,je=te.a.h;if(0<=je){var ke=(q=q.b).d,Ie=q.e,Fe=q.c,Ue=Fe[je];ke[Ue]=ke[q.a],(Fe[ke[Ue]]=Ue)<=--q.a&&(Ue<=1||u(Ie[ke[Ue>>1]],Ie[ke[Ue]])?He:Ve)(q,Ue),Ie[je]=null,Fe[je]=q.b,q.b=je}else for(q.c[-(je+1)]=null;0<q.a&&q.c[q.d[q.a-1]]===null;)--q.a;L(Z,pe.b.e,te)}}else l(pe.b),s(te,pe.b.e),$.b=q.b=!0}else{if(g(te.b.a,pe.a,te.a)<0)return;xe($).b=$.b=!0,l(te.b),s(pe.b.e,te)}return 1}function N(Z,$){var q=Ce($),te=$.a,pe=q.a,je=te.a,ke=pe.a,Ie=te.b.a,Fe=pe.b.a,Ue=new he;if(g(Ie,Z.a,je),g(Fe,Z.a,ke),!(je===ke||Math.min(je.a,Ie.a)>Math.max(ke.a,Fe.a))){if(u(je,ke)){if(0<g(Fe,je,ke))return}else if(g(Ie,ke,je)<0)return;var We,rt,et=Ie,Ye=je,tt=Fe,$e=ke;if(u(et,Ye)||(We=et,et=Ye,Ye=We),u(tt,$e)||(We=tt,tt=$e,$e=We),u(et,tt)||(We=et,et=tt,tt=We,We=Ye,Ye=$e,$e=We),u(tt,Ye)?u(Ye,$e)?((We=f(et,tt,Ye))+(rt=f(tt,Ye,$e))<0&&(We=-We,rt=-rt),Ue.b=r(We,tt.b,rt,Ye.b)):((We=g(et,tt,Ye))+(rt=-g(et,$e,Ye))<0&&(We=-We,rt=-rt),Ue.b=r(We,tt.b,rt,$e.b)):Ue.b=(tt.b+Ye.b)/2,y(et,Ye)||(We=et,et=Ye,Ye=We),y(tt,$e)||(We=tt,tt=$e,$e=We),y(et,tt)||(We=et,et=tt,tt=We,We=Ye,Ye=$e,$e=We),y(tt,Ye)?y(Ye,$e)?((We=o(et,tt,Ye))+(rt=o(tt,Ye,$e))<0&&(We=-We,rt=-rt),Ue.a=r(We,tt.a,rt,Ye.a)):((We=a(et,tt,Ye))+(rt=-a(et,$e,Ye))<0&&(We=-We,rt=-rt),Ue.a=r(We,tt.a,rt,$e.a)):Ue.a=(tt.a+Ye.a)/2,u(Ue,Z.a)&&(Ue.b=Z.a.b,Ue.a=Z.a.a),et=u(je,ke)?je:ke,u(et,Ue)&&(Ue.b=et.b,Ue.a=et.a),m(Ue,je)||m(Ue,ke))return R(Z,$),0;if(!m(Ie,Z.a)&&0<=g(Ie,Z.a,Ue)||!m(Fe,Z.a)&&g(Fe,Z.a,Ue)<=0){if(Fe===Z.a)l(te.b),s(pe.b,te),te=Ce($=A($)).a,H(Z,Ce($),q),Y(Z,$,te.b.e,te,te,!0);else{if(Ie!==Z.a)return 0<=g(Ie,Z.a,Ue)&&(xe($).b=$.b=!0,l(te.b),te.a.b=Z.a.b,te.a.a=Z.a.a),void(g(Fe,Z.a,Ue)<=0&&($.b=q.b=!0,l(pe.b),pe.a.b=Z.a.b,pe.a.a=Z.a.a));for(l(pe.b),s(te.e,pe.b.e),ke=(je=q=$).a.b.a;(je=xe(je)).a.b.a===ke;);je=Ce($=je).a.b.c,q.a=pe.b.e,Y(Z,$,(pe=H(Z,q,null)).c,te.b.c,je,!0)}return 1}l(te.b),l(pe.b),s(pe.b.e,te),te.a.b=Ue.b,te.a.a=Ue.a,te.a.h=_e(Z.e,te.a),te=te.a,pe=[0,0,0,0],Ue=[je.d,Ie.d,ke.d,Fe.d],te.g[0]=te.g[1]=te.g[2]=0,j(te,je,Ie,pe,0),j(te,ke,Fe,pe,2),oe(Z,te,Ue,pe,!0),xe($).b=$.b=q.b=!0}}function X(Z,$){for(var q=Ce($);;){for(;q.b;)q=Ce($=q);if(!$.b&&(($=xe(q=$))===null||!$.b))break;$.b=!1;var te=$.a,pe=q.a;if(je=te.b.a!==pe.b.a)e:{var je,ke=Ce(je=$),Ie=je.a,Fe=ke.a,Ue=void 0;if(u(Ie.b.a,Fe.b.a)){if(g(Ie.b.a,Fe.b.a,Ie.a)<0){je=!1;break e}xe(je).b=je.b=!0,Ue=l(Ie),s(Fe.b,Ue),Ue.d.c=je.d}else{if(0<g(Fe.b.a,Ie.b.a,Fe.a)){je=!1;break e}je.b=ke.b=!0,Ue=l(Fe),s(Ie.e,Fe.b),Ue.b.d.c=je.d}je=!0}if(je&&(q.c?(F(q),n(pe),pe=(q=Ce($)).a):$.c&&(F($),n(te),te=($=xe(q)).a)),te.a!==pe.a){if(te.b.a===pe.b.a||$.c||q.c||te.b.a!==Z.a&&pe.b.a!==Z.a)R(Z,$);else if(N(Z,$))break}te.a===pe.a&&te.b.a===pe.b.a&&(P(pe,te),F($),n(te),$=xe(q))}}function K(Z,$){var q=new ge,te=i(Z.b);te.a.b=4e150,te.a.a=$,te.b.a.b=-4e150,te.b.a.a=$,Z.a=te.b.a,q.a=te,q.f=0,q.d=!1,q.c=!1,q.h=!0,q.b=!1,te=ie(te=Z.f,te.a,q),q.e=te}function re(Z){this.a=new ee,this.b=Z,this.c=M}function ie(Z,$,q){for(;($=$.c).b!==null&&!Z.c(Z.b,$.b,q););return Z=new ee(q,$.a,$),$.a.c=Z,$.a=Z}function ee(Z,$,q){this.b=Z||null,this.a=$||this,this.c=q||this}function ae(){this.d=0,this.p=this.b=this.q=null,this.j=[0,0,0],this.s=100130,this.n=!1,this.o=this.a=this.e=this.f=null,this.m=!1,this.c=this.r=this.i=this.k=this.l=this.h=null}function ue(Z,$){if(Z.d!==$)for(;Z.d!==$;)if(Z.d<$)switch(Z.d){case 0:Q(Z,100151),Z.u(null);break;case 1:Q(Z,100152),Z.t()}else switch(Z.d){case 2:Q(Z,100154),Z.v();break;case 1:Q(Z,100153),Z.w()}}function Q(Z,$){Z.p&&Z.p($,Z.c)}function le(Z,$){this.b=Z||this,this.d=$||this,this.a=null,this.c=!1}function fe(){(this.h=this).i=this.d=this.a=this.e=this.c=this.b=null,this.f=0}function ve(){this.c=new he,this.a=new le,this.b=new fe,this.d=new fe,this.b.b=this.d,this.d.b=this.b}function he(Z,$){this.e=Z||this,this.f=$||this,this.d=this.c=null,this.g=[0,0,0],this.h=this.a=this.b=0}function me(){this.c=[],this.d=null,this.a=0,this.e=!1,this.b=new Se}function _e(Z,$){var q,te,pe;return Z.e?(2*(te=++(q=Z.b).a)>q.f&&(q.f*=2,q.c=Ge(q.c,q.f+1)),q.b===0?pe=te:(pe=q.b,q.b=q.c[q.b]),q.e[pe]=$,q.c[pe]=te,q.d[te]=pe,q.h&&Ve(q,te),pe):(q=Z.a++,Z.c[q]=$,-(q+1))}function Ae(Z){if(Z.a===0)return Be(Z.b);var $=Z.c[Z.d[Z.a-1]];if(Z.b.a!==0&&u(Ne(Z.b),$))return Be(Z.b);for(;--Z.a,0<Z.a&&Z.c[Z.d[Z.a-1]]===null;);return $}function Se(){this.d=Ge([0],33),this.e=[null,null],this.c=[0,0],this.a=0,this.f=32,this.b=0,this.h=!1,this.d[1]=1}function Ge(Z,$){for(var q=Array($),te=0;te<Z.length;te++)q[te]=Z[te];for(;te<$;te++)q[te]=0;return q}function Ne(Z){return Z.e[Z.d[1]]}function Be(Z){var $=Z.d,q=Z.e,te=Z.c,pe=$[1],je=q[pe];return 0<Z.a&&($[1]=$[Z.a],te[$[1]]=1,q[pe]=null,te[pe]=Z.b,Z.b=pe,0<--Z.a&&He(Z,1)),je}function He(Z,$){for(var q=Z.d,te=Z.e,pe=Z.c,je=$,ke=q[je];;){var Ie=je<<1,Fe=(Ie<Z.a&&u(te[q[Ie+1]],te[q[Ie]])&&(Ie+=1),q[Ie]);if(Ie>Z.a||u(te[ke],te[Fe])){pe[q[je]=ke]=je;break}pe[q[je]=Fe]=je,je=Ie}}function Ve(Z,$){for(var q=Z.d,te=Z.e,pe=Z.c,je=$,ke=q[je];;){var Ie=je>>1,Fe=q[Ie];if(Ie==0||u(te[Fe],te[ke])){pe[q[je]=ke]=je;break}pe[q[je]=Fe]=je,je=Ie}}function ge(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function Ce(Z){return Z.e.c.b}function xe(Z){return Z.e.a.b}(p=ae.prototype).x=function(){ue(this,0)},p.B=function(Z,$){switch(Z){case 100142:return;case 100140:switch($){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=$)}break;case 100141:return void(this.m=!!$);default:return void Q(this,100900)}Q(this,100901)},p.y=function(Z){switch(Z){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:Q(this,100900)}return!1},p.A=function(Z,$,q){this.j[0]=Z,this.j[1]=$,this.j[2]=q},p.z=function(Z,$){var q=$||null;switch(Z){case 100100:case 100106:this.h=q;break;case 100104:case 100110:this.l=q;break;case 100101:case 100107:this.k=q;break;case 100102:case 100108:this.i=q;break;case 100103:case 100109:this.p=q;break;case 100105:case 100111:this.o=q;break;case 100112:this.r=q;break;default:Q(this,100900)}},p.C=function(Z,$){var q=!1,te=[0,0,0];ue(this,2);for(var pe=0;pe<3;++pe){var je=Z[pe];je<-1e150&&(je=-1e150,q=!0),1e150<je&&(je=1e150,q=!0),te[pe]=je}q&&Q(this,100155),(q=this.q)===null?s(q=i(this.b),q.b):(l(q),q=q.e),q.a.d=$,q.a.g[0]=te[0],q.a.g[1]=te[1],q.a.g[2]=te[2],q.f=1,q.b.f=-1,this.q=q},p.u=function(Z){ue(this,0),this.d=1,this.b=new ve,this.c=Z},p.t=function(){ue(this,1),this.d=2,this.q=null},p.v=function(){ue(this,2),this.d=1},p.w=function(){ue(this,1),this.d=0;var Z,$,q=this.j[0],te=this.j[1],pe=this.j[2],je=!1,ke=[q,te,pe];if(q===0&&te===0&&pe===0){for(var te=[-2e150,-2e150,-2e150],Ie=[2e150,2e150,2e150],pe=[],Fe=[],q=(je=this.b.c).e;q!==je;q=q.e)for(var Ue=0;Ue<3;++Ue){var We=q.g[Ue];We<Ie[Ue]&&(Ie[Ue]=We,Fe[Ue]=q),We>te[Ue]&&(te[Ue]=We,pe[Ue]=q)}if(te[1]-Ie[1]>te[q=0]-Ie[0]&&(q=1),Ie[q=te[2]-Ie[2]>te[q]-Ie[q]?2:q]>=te[q])ke[0]=0,ke[1]=0,ke[2]=1;else{for(Ie=Fe[q],pe=pe[q],Fe=[te=0,0,0],Ie=[Ie.g[0]-pe.g[0],Ie.g[1]-pe.g[1],Ie.g[2]-pe.g[2]],Ue=[0,0,0],q=je.e;q!==je;q=q.e)Ue[0]=q.g[0]-pe.g[0],Ue[1]=q.g[1]-pe.g[1],Ue[2]=q.g[2]-pe.g[2],Fe[0]=Ie[1]*Ue[2]-Ie[2]*Ue[1],Fe[1]=Ie[2]*Ue[0]-Ie[0]*Ue[2],Fe[2]=Ie[0]*Ue[1]-Ie[1]*Ue[0],te<(We=Fe[0]*Fe[0]+Fe[1]*Fe[1]+Fe[2]*Fe[2])&&(te=We,ke[0]=Fe[0],ke[1]=Fe[1],ke[2]=Fe[2]);te<=0&&(ke[0]=ke[1]=ke[2]=0,ke[T(Ie)]=1)}je=!0}for(Fe=T(ke),q=this.b.c,te=(Fe+1)%3,pe=(Fe+2)%3,Fe=0<ke[Fe]?1:-1,ke=q.e;ke!==q;ke=ke.e)ke.b=ke.g[te],ke.a=Fe*ke.g[pe];if(je){for(ke=0,q=(je=this.b.a).b;q!==je;q=q.b)if(!((te=q.a).f<=0))for(;ke+=(te.a.b-te.b.a.b)*(te.a.a+te.b.a.a),(te=te.e)!==q.a;);if(ke<0)for(je=(ke=this.b.c).e;je!==ke;je=je.e)je.a=-je.a}for(this.n=!1,ke=this.b.b,q=ke.h;q!==ke;q=je)je=q.h,te=q.e,m(q.a,q.b.a)&&q.e.e!==q&&(L(this,te,q),n(q),te=(q=te).e),te.e===q&&(te!==q&&(te!==je&&te!==je.b||(je=je.h),n(te)),q!==je&&q!==je.b||(je=je.h),n(q));for(this.e=ke=new me,je=this.b.c,q=je.e;q!==je;q=q.e)q.h=_e(ke,q);var rt=ke;rt.d=[];for(var et=0;et<rt.a;et++)rt.d[et]=et;rt.d.sort((function($e){return function(pt,It){return u($e[pt],$e[It])?1:-1}})(rt.c)),rt.e=!0;for(var Ye=rt.b,tt=Ye.a;1<=tt;--tt)He(Ye,tt);for(Ye.h=!0,this.f=new re(this),K(this,-4e150),K(this,4e150);(ke=Ae(this.e))!==null;){for(;;){e:if((q=this.e).a===0)je=Ne(q.b);else if(je=q.c[q.d[q.a-1]],q.b.a!==0&&u(q=Ne(q.b),je)){je=q;break e}if(je===null||!m(je,ke))break;je=Ae(this.e),L(this,ke.c,je.c)}(function $e(pt,It){for(var wt,ut=(pt.a=It).c;ut.i===null;)if((ut=ut.c)===It.c){var ut=pt,yt=It;(dt=new ge).a=yt.c.b;for(var At=(at=ut.f).a;(At=At.a).b!==null&&!at.c(at.b,dt,At.b););var at,Pt,Mt=Ce(at=At.b),dt=at.a,At=Mt.a;return void(g(dt.b.a,yt,dt.a)===0?m((dt=at.a).a,yt)||m(dt.b.a,yt)||(l(dt.b),at.c&&(n(dt.c),at.c=!1),s(yt.c,dt),$e(ut,yt)):(Pt=u(At.b.a,dt.b.a)?at:Mt,Mt=void 0,at.d||Pt.c?(Mt=Pt===at?c(yt.c.b,dt.e):c(At.b.c.b,yt.c).b,Pt.c?D(Pt,Mt):((at=z(dt=ut,at,Mt)).f=xe(at).f+at.a.f,at.d=G(dt,at.f)),$e(ut,yt)):Y(ut,at,yt.c,yt.c,null,!0)))}at=(dt=Ce(ut=A(ut.i))).a,(dt=H(pt,dt,null)).c===at?(dt=(at=dt).c,At=Ce(ut),Mt=ut.a,Pt=At.a,wt=!1,Mt.b.a!==Pt.b.a&&N(pt,ut),m(Mt.a,pt.a)&&(s(dt.b.e,Mt),dt=Ce(ut=A(ut)).a,H(pt,Ce(ut),At),wt=!0),m(Pt.a,pt.a)&&(s(at,Pt.b.e),at=H(pt,At,null),wt=!0),wt?Y(pt,ut,at.c,dt,dt,!0):(yt=u(Pt.a,Mt.a)?Pt.b.e:Mt,Y(pt,ut,yt=c(at.c.b,yt),yt.c,yt.c,!1),yt.b.i.c=!0,X(pt,ut))):Y(pt,ut,dt.c,at,at,!0)})(this,ke)}for(this.a=this.f.a.a.b.a.a,ke=0;(je=this.f.a.a.b)!==null;)je.h||++ke,F(je);for(this.f=null,(ke=this.e).b=null,ke.d=null,this.e=ke.c=null,ke=this.b,q=ke.a.b;q!==ke.a;q=je)je=q.b,(q=q.a).e.e===q&&(P(q.c,q),n(q));if(!this.n){if(ke=this.b,this.m)for(q=ke.b.h;q!==ke.b;q=je)je=q.h,q.b.d.c!==q.d.c?q.f=q.d.c?1:-1:n(q);else for(q=ke.a.b;q!==ke.a;q=je)if(je=q.b,q.c){for(q=q.a;u(q.b.a,q.a);q=q.c.b);for(;u(q.a,q.b.a);q=q.e);for(te=q.c.b,pe=void 0;q.e!==te;)if(u(q.b.a,te.a)){for(;te.e!==q&&(u(($=te.e).b.a,$.a)||g(te.a,te.b.a,te.e.b.a)<=0);)te=(pe=c(te.e,te)).b;te=te.c.b}else{for(;te.e!==q&&(u((Z=q.c.b).a,Z.b.a)||0<=g(q.b.a,q.a,q.c.b.a));)q=(pe=c(q,q.c.b)).b;q=q.e}for(;te.e.e!==q;)pe=c(te.e,te),te=pe.b}if(this.h||this.i||this.k||this.l)if(this.m){for(je=(ke=this.b).a.b;je!==ke.a;je=je.b)if(je.c){for(this.h&&this.h(2,this.c),q=je.a;this.k&&this.k(q.a.d,this.c),(q=q.e)!==je.a;);this.i&&this.i(this.c)}}else{for(ke=this.b,je=!!this.l,q=!1,te=-1,pe=ke.a.d;pe!==ke.a;pe=pe.d)if(pe.c)for(q||(this.h&&this.h(4,this.c),q=!0),Fe=pe.a;je&&(Ie=Fe.b.d.c?0:1,te!==Ie&&(te=Ie,this.l&&this.l(!!te,this.c))),this.k&&this.k(Fe.a.d,this.c),(Fe=Fe.e)!==pe.a;);q&&this.i&&this.i(this.c)}if(this.r){for(ke=this.b,q=ke.a.b;q!==ke.a;q=je)if(je=q.b,!q.c){for(pe=(te=q.a).e,Fe=void 0;pe=(Fe=pe).e,(Fe.d=null)===Fe.b.d&&(Fe.c===Fe?x(Fe.a,null):(Fe.a.c=Fe.c,v(Fe,Fe.b.e)),(Ie=Fe.b).c===Ie?x(Ie.a,null):(Ie.a.c=Ie.c,v(Ie,Ie.b.e)),_(Fe)),Fe!==te;);te=q.d,((q=q.b).d=te).b=q}return this.r(this.b),void(this.c=this.b=null)}}this.b=this.c=null},this.libtess={GluTesselator:ae,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}},ae.prototype.gluDeleteTess=ae.prototype.x,ae.prototype.gluTessProperty=ae.prototype.B,ae.prototype.gluGetTessProperty=ae.prototype.y,ae.prototype.gluTessNormal=ae.prototype.A,ae.prototype.gluTessCallback=ae.prototype.z,ae.prototype.gluTessVertex=ae.prototype.C,ae.prototype.gluTessBeginPolygon=ae.prototype.u,ae.prototype.gluTessBeginContour=ae.prototype.t,ae.prototype.gluTessEndContour=ae.prototype.v,ae.prototype.gluTessEndPolygon=ae.prototype.w,W!==void 0&&(W.exports=this.libtess)},{}],256:[function(t,W,C){"use strict";function p(u,f,g,y){var o=0,a=(y=y===void 0?{}:y).loop===void 0?null:y.loop,r=y.palette===void 0?null:y.palette;if(f<=0||g<=0||65535<f||65535<g)throw new Error("Width/Height invalid.");function i(E){if(E=E.length,E<2||256<E||E&E-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return E}u[o++]=71,u[o++]=73,u[o++]=70,u[o++]=56,u[o++]=57,u[o++]=97;var s=0,n=0;if(r!==null){for(var l=i(r);l>>=1;)++s;if(l=1<<s,--s,y.background!==void 0){if(l<=(n=y.background))throw new Error("Background index out of range.");if(n===0)throw new Error("Background index explicitly passed as 0.")}}if(u[o++]=255&f,u[o++]=f>>8&255,u[o++]=255&g,u[o++]=g>>8&255,u[o++]=(r!==null?128:0)|s,u[o++]=n,u[o++]=0,r!==null)for(var c=0,d=r.length;c<d;++c){var v=r[c];u[o++]=v>>16&255,u[o++]=v>>8&255,u[o++]=255&v}if(a!==null){if(a<0||65535<a)throw new Error("Loop count invalid.");u[o++]=33,u[o++]=255,u[o++]=11,u[o++]=78,u[o++]=69,u[o++]=84,u[o++]=83,u[o++]=67,u[o++]=65,u[o++]=80,u[o++]=69,u[o++]=50,u[o++]=46,u[o++]=48,u[o++]=3,u[o++]=1,u[o++]=255&a,u[o++]=a>>8&255,u[o++]=0}var S=!1;this.addFrame=function(E,_,x,O,T,P){if(S===!0&&(--o,S=!1),P=P===void 0?{}:P,E<0||_<0||65535<E||65535<_)throw new Error("x/y invalid.");if(x<=0||O<=0||65535<x||65535<O)throw new Error("Width/Height invalid.");if(T.length<x*O)throw new Error("Not enough pixels for the frame size.");var M=!0,F=P.palette;if(F==null&&(M=!1,F=r),F==null)throw new Error("Must supply either a local or global palette.");for(var A=i(F),D=0;A>>=1;)++D;var A=1<<D,z=P.delay===void 0?0:P.delay,G=P.disposal===void 0?0:P.disposal;if(G<0||3<G)throw new Error("Disposal out of range.");var U=!1,H=0;if(P.transparent!==void 0&&P.transparent!==null&&(U=!0,(H=P.transparent)<0||A<=H))throw new Error("Transparent color index.");if(G===0&&!U&&z===0||(u[o++]=33,u[o++]=249,u[o++]=4,u[o++]=G<<2|(U===!0?1:0),u[o++]=255&z,u[o++]=z>>8&255,u[o++]=H,u[o++]=0),u[o++]=44,u[o++]=255&E,u[o++]=E>>8&255,u[o++]=255&_,u[o++]=_>>8&255,u[o++]=255&x,u[o++]=x>>8&255,u[o++]=255&O,u[o++]=O>>8&255,u[o++]=M===!0?128|D-1:0,M===!0)for(var Y=0,oe=F.length;Y<oe;++Y){var L=F[Y];u[o++]=L>>16&255,u[o++]=L>>8&255,u[o++]=255&L}return o=(function(j,R,N,X){j[R++]=N;var K=R++,re=1<<N,ie=re-1,ee=1+re,ae=1+ee,ue=N+1,Q=0,le=0;function fe(Be){for(;Be<=Q;)j[R++]=255&le,le>>=8,Q-=8,R===K+256&&(j[K]=255,K=R++)}function ve(Be){le|=Be<<Q,Q+=ue,fe(8)}var he=X[0]&ie,me={};ve(re);for(var _e=1,Ae=X.length;_e<Ae;++_e){var Se=X[_e]&ie,Ge=he<<8|Se,Ne=me[Ge];if(Ne===void 0){for(le|=he<<Q,Q+=ue;8<=Q;)j[R++]=255&le,le>>=8,Q-=8,R===K+256&&(j[K]=255,K=R++);ae===4096?(ve(re),ae=1+ee,ue=N+1,me={}):(1<<ue<=ae&&++ue,me[Ge]=ae++),he=Se}else he=Ne}return ve(he),ve(ee),fe(1),K+1===R?j[K]=0:(j[K]=R-K-1,j[R++]=0),R})(u,o,D<2?2:D,T)},this.end=function(){return S===!1&&(u[o++]=59,S=!0),o},this.getOutputBuffer=function(){return u},this.setOutputBuffer=function(E){u=E},this.getOutputBufferPosition=function(){return o},this.setOutputBufferPosition=function(E){o=E}}function m(u,f,g,y){for(var o=u[f++],a=1<<o,r=1+a,i=1+r,s=o+1,n=(1<<s)-1,l=0,c=0,d=0,v=u[f++],S=new Int32Array(4096),E=null;;){for(;l<16&&v!==0;)c|=u[f++]<<l,l+=8,v===1?v=u[f++]:--v;if(l<s)break;var _=c&n;if(c>>=s,l-=s,_==a)i=1+r,n=(1<<(s=o+1))-1,E=null;else{if(_==r)break;for(var x=_<i?_:E,O=0,T=x;a<T;)T=S[T]>>8,++O;var P=T;if(y<d+O+(x!==_?1:0))return void console.log("Warning, gif stream longer than expected.");g[d++]=P;var M=d+=O;for(x!==_&&(g[d++]=P),T=x;O--;)T=S[T],g[--M]=255&T,T>>=8;E!==null&&i<4096&&(S[i++]=E<<8|P,n+1<=i&&s<12&&(++s,n=n<<1|1)),E=_}}d!==y&&console.log("Warning, gif stream shorter than expected.")}try{C.GifWriter=p,C.GifReader=function(u){var f=0;if(u[f++]!==71||u[f++]!==73||u[f++]!==70||u[f++]!==56||(u[f++]+1&253)!=56||u[f++]!==97)throw new Error("Invalid GIF 87a/89a header.");var g=u[f++]|u[f++]<<8,y=u[f++]|u[f++]<<8,o=u[f++],a=1<<1+(7&o),r=(u[f++],u[f++],null),i=null,s=(o>>7&&(r=f,f+=3*(i=a)),!0),n=[],l=0,c=null,d=0,v=null;for(this.width=g,this.height=y;s&&f<u.length;)switch(u[f++]){case 33:switch(u[f++]){case 255:if(u[f]!==11||u[f+1]==78&&u[f+2]==69&&u[f+3]==84&&u[f+4]==83&&u[f+5]==67&&u[f+6]==65&&u[f+7]==80&&u[f+8]==69&&u[f+9]==50&&u[f+10]==46&&u[f+11]==48&&u[f+12]==3&&u[f+13]==1&&u[f+16]==0)f+=14,v=u[f++]|u[f++]<<8,f++;else for(f+=12;;){if(!(0<=(E=u[f++])))throw Error("Invalid block size");if(E===0)break;f+=E}break;case 249:if(u[f++]!==4||u[f+4]!==0)throw new Error("Invalid graphics extension block.");var S=u[f++],l=u[f++]|u[f++]<<8,c=u[f++];(1&S)==0&&(c=null),d=S>>2&7,f++;break;case 254:for(;;){if(!(0<=(E=u[f++])))throw Error("Invalid block size");if(E===0)break;f+=E}break;default:throw new Error("Unknown graphic control label: 0x"+u[f-1].toString(16))}break;case 44:var E,_=u[f++]|u[f++]<<8,x=u[f++]|u[f++]<<8,O=u[f++]|u[f++]<<8,T=u[f++]|u[f++]<<8,z=u[f++],P=z>>6&1,M=1<<1+(7&z),F=r,D=i,A=!1,z=(z>>7&&(A=!0,F=f,f+=3*(D=M)),f);for(f++;;){if(!(0<=(E=u[f++])))throw Error("Invalid block size");if(E===0)break;f+=E}n.push({x:_,y:x,width:O,height:T,has_local_palette:A,palette_offset:F,palette_size:D,data_offset:z,data_length:f-z,transparent_index:c,interlaced:!!P,delay:l,disposal:d});break;case 59:s=!1;break;default:throw new Error("Unknown gif block: 0x"+u[f-1].toString(16))}this.numFrames=function(){return n.length},this.loopCount=function(){return v},this.frameInfo=function(G){if(G<0||G>=n.length)throw new Error("Frame index out of range.");return n[G]},this.decodeAndBlitFrameBGRA=function(G,U){for(var G=this.frameInfo(G),H=G.width*G.height,Y=new Uint8Array(H),oe=(m(u,G.data_offset,Y,H),G.palette_offset),L=G.transparent_index,j=(L===null&&(L=256),G.width),R=g-j,N=j,X=4*(G.y*g+G.x),K=4*((G.y+G.height)*g+G.x),re=X,ie=4*R,ee=(G.interlaced===!0&&(ie+=4*g*7),8),ae=0,ue=Y.length;ae<ue;++ae){var Q,le,fe=Y[ae];N===0&&(N=j,K<=(re+=ie)&&(ie=4*R+4*g*(ee-1),re=X+(j+R)*(ee<<1),ee>>=1)),fe===L?re+=4:(Q=u[oe+3*fe],le=u[oe+3*fe+1],fe=u[oe+3*fe+2],U[re++]=fe,U[re++]=le,U[re++]=Q,U[re++]=255),--N}},this.decodeAndBlitFrameRGBA=function(G,U){for(var G=this.frameInfo(G),H=G.width*G.height,Y=new Uint8Array(H),oe=(m(u,G.data_offset,Y,H),G.palette_offset),L=G.transparent_index,j=(L===null&&(L=256),G.width),R=g-j,N=j,X=4*(G.y*g+G.x),K=4*((G.y+G.height)*g+G.x),re=X,ie=4*R,ee=(G.interlaced===!0&&(ie+=4*g*7),8),ae=0,ue=Y.length;ae<ue;++ae){var Q,le,fe=Y[ae];N===0&&(N=j,K<=(re+=ie)&&(ie=4*R+4*g*(ee-1),re=X+(j+R)*(ee<<1),ee>>=1)),fe===L?re+=4:(Q=u[oe+3*fe],le=u[oe+3*fe+1],fe=u[oe+3*fe+2],U[re++]=Q,U[re++]=le,U[re++]=fe,U[re++]=255),--N}}}}catch{}},{}],257:[function(t,W,C){(function(p){var m,u;m=this,u=function(f){"use strict";function g(I){if(this==null)throw TypeError();var b,w=String(this),k=w.length,I=I?Number(I):0;if(!((I=I!=I?0:I)<0||k<=I))return 55296<=(b=w.charCodeAt(I))&&b<=56319&&I+1<k&&56320<=(k=w.charCodeAt(I+1))&&k<=57343?1024*(b-55296)+k-56320+65536:b}String.prototype.codePointAt||((y=(function(){try{var h={},b=Object.defineProperty,w=b(h,h,h)&&b}catch{}return w})())?y(String.prototype,"codePointAt",{value:g,configurable:!0,writable:!0}):String.prototype.codePointAt=g);var y,o=0,a=-3;function r(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function i(h,b){this.source=h,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=b,this.destLen=0,this.ltree=new r,this.dtree=new r}var s=new r,n=new r,l=new Uint8Array(30),c=new Uint16Array(30),d=new Uint8Array(30),v=new Uint16Array(30),S=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),E=new r,_=new Uint8Array(320);function x(h,b,w,k){for(var I,B=0;B<w;++B)h[B]=0;for(B=0;B<30-w;++B)h[B+w]=B/w|0;for(I=k,B=0;B<30;++B)b[B]=I,I+=1<<h[B]}var O=new Uint16Array(16);function T(h,b,w,k){for(var I,B=0;B<16;++B)h.table[B]=0;for(B=0;B<k;++B)h.table[b[w+B]]++;for(B=I=h.table[0]=0;B<16;++B)O[B]=I,I+=h.table[B];for(B=0;B<k;++B)b[w+B]&&(h.trans[O[b[w+B]]++]=B)}function P(h,b,w){if(!b)return w;for(;h.bitcount<24;)h.tag|=h.source[h.sourceIndex++]<<h.bitcount,h.bitcount+=8;var k=h.tag&65535>>>16-b;return h.tag>>>=b,h.bitcount-=b,k+w}function M(h,b){for(;h.bitcount<24;)h.tag|=h.source[h.sourceIndex++]<<h.bitcount,h.bitcount+=8;for(var w=0,k=0,I=0,B=h.tag;k=2*k+(1&B),B>>>=1,w+=b.table[++I],0<=(k-=b.table[I]););return h.tag=B,h.bitcount-=I,b.trans[w+k]}function F(h,b,w){for(;;){var k=M(h,b);if(k===256)return o;if(k<256)h.dest[h.destLen++]=k;else for(var I,B=P(h,l[k-=257],c[k]),k=M(h,w),V=I=h.destLen-P(h,d[k],v[k]);V<I+B;++V)h.dest[h.destLen++]=h.dest[V]}}for(var D=s,A=n,z=0;z<7;++z)D.table[z]=0;for(D.table[7]=24,D.table[8]=152,D.table[9]=112,z=0;z<24;++z)D.trans[z]=256+z;for(z=0;z<144;++z)D.trans[24+z]=z;for(z=0;z<8;++z)D.trans[168+z]=280+z;for(z=0;z<112;++z)D.trans[176+z]=144+z;for(z=0;z<5;++z)A.table[z]=0;for(A.table[5]=32,z=0;z<32;++z)A.trans[z]=z;x(l,c,4,3),x(d,v,2,1),l[28]=0,c[28]=258;var G=function(h,b){var w,k,I,B=new i(h,b);do{switch(I=void 0,(k=B).bitcount--||(k.tag=k.source[k.sourceIndex++],k.bitcount=7),I=1&k.tag,k.tag>>>=1,k=I,P(B,2,0)){case 0:w=(function(Ee){for(var Ke,nt;8<Ee.bitcount;)Ee.sourceIndex--,Ee.bitcount-=8;if((Ke=256*Ee.source[Ee.sourceIndex+1]+Ee.source[Ee.sourceIndex])!==(65535&~(256*Ee.source[Ee.sourceIndex+3]+Ee.source[Ee.sourceIndex+2])))return a;for(Ee.sourceIndex+=4,nt=Ke;nt;--nt)Ee.dest[Ee.destLen++]=Ee.source[Ee.sourceIndex++];return Ee.bitcount=0,o})(B);break;case 1:w=F(B,s,n);break;case 2:Oe=Me=Pe=Te=V=ce=be=we=ye=ne=se=J=void 0;for(var V,J=B,se=B.ltree,ne=B.dtree,ye=P(J,5,257),we=P(J,5,1),be=P(J,4,4),ce=0;ce<19;++ce)_[ce]=0;for(ce=0;ce<be;++ce){var Pe=P(J,3,0);_[S[ce]]=Pe}for(T(E,_,0,19),V=0;V<ye+we;){var Me=M(J,E);switch(Me){case 16:for(var Oe=_[V-1],Te=P(J,2,3);Te;--Te)_[V++]=Oe;break;case 17:for(Te=P(J,3,3);Te;--Te)_[V++]=0;break;case 18:for(Te=P(J,7,11);Te;--Te)_[V++]=0;break;default:_[V++]=Me}}T(se,_,0,ye),T(ne,_,ye,we),w=F(B,B.ltree,B.dtree);break;default:w=a}if(w!==o)throw new Error("Data error")}while(!k);return B.destLen<B.dest.length?typeof B.dest.slice=="function"?B.dest.slice(0,B.destLen):B.dest.subarray(0,B.destLen):B.dest};function U(h,b,w,k,I){return Math.pow(1-I,3)*h+3*Math.pow(1-I,2)*I*b+3*(1-I)*Math.pow(I,2)*w+Math.pow(I,3)*k}function H(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function Y(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function oe(h){throw new Error(h)}function L(h,b){h||oe(b)}H.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},H.prototype.addPoint=function(h,b){typeof h=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=h,this.x2=h),h<this.x1&&(this.x1=h),h>this.x2&&(this.x2=h)),typeof b=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},H.prototype.addX=function(h){this.addPoint(h,null)},H.prototype.addY=function(h){this.addPoint(null,h)},H.prototype.addBezier=function(h,b,w,k,I,B,V,J){var se=[h,b],ne=[w,k],ye=[I,B],we=[V,J];this.addPoint(h,b),this.addPoint(V,J);for(var be=0;be<=1;be++){var ce,Pe=6*se[be]-12*ne[be]+6*ye[be],Me=-3*se[be]+9*ne[be]-9*ye[be]+3*we[be],Oe=3*ne[be]-3*se[be];Me==0?Pe==0||0<(ce=-Oe/Pe)&&ce<1&&(be===0&&this.addX(U(se[be],ne[be],ye[be],we[be],ce)),be===1&&this.addY(U(se[be],ne[be],ye[be],we[be],ce))):(ce=Math.pow(Pe,2)-4*Oe*Me)<0||(0<(Oe=(-Pe+Math.sqrt(ce))/(2*Me))&&Oe<1&&(be===0&&this.addX(U(se[be],ne[be],ye[be],we[be],Oe)),be===1&&this.addY(U(se[be],ne[be],ye[be],we[be],Oe))),0<(Oe=(-Pe-Math.sqrt(ce))/(2*Me))&&Oe<1&&(be===0&&this.addX(U(se[be],ne[be],ye[be],we[be],Oe)),be===1&&this.addY(U(se[be],ne[be],ye[be],we[be],Oe))))}},H.prototype.addQuad=function(h,b,w,k,I,B){w=h+2/3*(w-h),k=b+2/3*(k-b),this.addBezier(h,b,w,k,w+1/3*(I-h),k+1/3*(B-b),I,B)},Y.prototype.moveTo=function(h,b){this.commands.push({type:"M",x:h,y:b})},Y.prototype.lineTo=function(h,b){this.commands.push({type:"L",x:h,y:b})},Y.prototype.curveTo=Y.prototype.bezierCurveTo=function(h,b,w,k,I,B){this.commands.push({type:"C",x1:h,y1:b,x2:w,y2:k,x:I,y:B})},Y.prototype.quadTo=Y.prototype.quadraticCurveTo=function(h,b,w,k){this.commands.push({type:"Q",x1:h,y1:b,x:w,y:k})},Y.prototype.close=Y.prototype.closePath=function(){this.commands.push({type:"Z"})},Y.prototype.extend=function(h){var b;if(h.commands)h=h.commands;else if(h instanceof H)return b=h,this.moveTo(b.x1,b.y1),this.lineTo(b.x2,b.y1),this.lineTo(b.x2,b.y2),this.lineTo(b.x1,b.y2),void this.close();Array.prototype.push.apply(this.commands,h)},Y.prototype.getBoundingBox=function(){for(var h=new H,b=0,w=0,k=0,I=0,B=0;B<this.commands.length;B++){var V=this.commands[B];switch(V.type){case"M":h.addPoint(V.x,V.y),b=k=V.x,w=I=V.y;break;case"L":h.addPoint(V.x,V.y),k=V.x,I=V.y;break;case"Q":h.addQuad(k,I,V.x1,V.y1,V.x,V.y),k=V.x,I=V.y;break;case"C":h.addBezier(k,I,V.x1,V.y1,V.x2,V.y2,V.x,V.y),k=V.x,I=V.y;break;case"Z":k=b,I=w;break;default:throw new Error("Unexpected path command "+V.type)}}return h.isEmpty()&&h.addPoint(0,0),h},Y.prototype.draw=function(h){h.beginPath();for(var b=0;b<this.commands.length;b+=1){var w=this.commands[b];w.type==="M"?h.moveTo(w.x,w.y):w.type==="L"?h.lineTo(w.x,w.y):w.type==="C"?h.bezierCurveTo(w.x1,w.y1,w.x2,w.y2,w.x,w.y):w.type==="Q"?h.quadraticCurveTo(w.x1,w.y1,w.x,w.y):w.type==="Z"&&h.closePath()}this.fill&&(h.fillStyle=this.fill,h.fill()),this.stroke&&(h.strokeStyle=this.stroke,h.lineWidth=this.strokeWidth,h.stroke())},Y.prototype.toPathData=function(h){function b(){for(var B=arguments,V="",J=0;J<arguments.length;J+=1){var se=B[J];0<=se&&0<J&&(V+=" "),V+=(se=se,Math.round(se)===se?""+Math.round(se):se.toFixed(h))}return V}h=h!==void 0?h:2;for(var w="",k=0;k<this.commands.length;k+=1){var I=this.commands[k];I.type==="M"?w+="M"+b(I.x,I.y):I.type==="L"?w+="L"+b(I.x,I.y):I.type==="C"?w+="C"+b(I.x1,I.y1,I.x2,I.y2,I.x,I.y):I.type==="Q"?w+="Q"+b(I.x1,I.y1,I.x,I.y):I.type==="Z"&&(w+="Z")}return w},Y.prototype.toSVG=function(h){var b=(b='<path d="')+this.toPathData(h)+'"';return this.fill&&this.fill!=="black"&&(this.fill===null?b+=' fill="none"':b+=' fill="'+this.fill+'"'),this.stroke&&(b+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),b+="/>"},Y.prototype.toDOMElement=function(b){var b=this.toPathData(b),w=document.createElementNS("http://www.w3.org/2000/svg","path");return w.setAttribute("d",b),w};var j={fail:oe,argument:L,assert:L},R={},N={},X={};function K(h){return function(){return h}}N.BYTE=function(h){return j.argument(0<=h&&h<=255,"Byte value should be between 0 and 255."),[h]},X.BYTE=K(1),N.CHAR=function(h){return[h.charCodeAt(0)]},X.CHAR=K(1),N.CHARARRAY=function(h){for(var b=[],w=0;w<h.length;w+=1)b[w]=h.charCodeAt(w);return b},X.CHARARRAY=function(h){return h.length},N.USHORT=function(h){return[h>>8&255,255&h]},X.USHORT=K(2),N.SHORT=function(h){return[(h=32768<=h?-(65536-h):h)>>8&255,255&h]},X.SHORT=K(2),N.UINT24=function(h){return[h>>16&255,h>>8&255,255&h]},X.UINT24=K(3),N.ULONG=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]},X.ULONG=K(4),N.LONG=function(h){return[(h=2147483648<=h?-(4294967296-h):h)>>24&255,h>>16&255,h>>8&255,255&h]},X.LONG=K(4),N.FIXED=N.ULONG,X.FIXED=X.ULONG,N.FWORD=N.SHORT,X.FWORD=X.SHORT,N.UFWORD=N.USHORT,X.UFWORD=X.USHORT,N.LONGDATETIME=function(h){return[0,0,0,0,h>>24&255,h>>16&255,h>>8&255,255&h]},X.LONGDATETIME=K(8),N.TAG=function(h){return j.argument(h.length===4,"Tag should be exactly 4 ASCII characters."),[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]},X.TAG=K(4),N.Card8=N.BYTE,X.Card8=X.BYTE,N.Card16=N.USHORT,X.Card16=X.USHORT,N.OffSize=N.BYTE,X.OffSize=X.BYTE,N.SID=N.USHORT,X.SID=X.USHORT,N.NUMBER=function(h){return-107<=h&&h<=107?[h+139]:108<=h&&h<=1131?[247+((h-=108)>>8),255&h]:-1131<=h&&h<=-108?[251+((h=-h-108)>>8),255&h]:-32768<=h&&h<=32767?N.NUMBER16(h):N.NUMBER32(h)},X.NUMBER=function(h){return N.NUMBER(h).length},N.NUMBER16=function(h){return[28,h>>8&255,255&h]},X.NUMBER16=K(3),N.NUMBER32=function(h){return[29,h>>24&255,h>>16&255,h>>8&255,255&h]},X.NUMBER32=K(5),N.REAL=function(h){for(var b=h.toString(),w=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b),k=(w&&(w=parseFloat("1e"+((w[2]?+w[2]:0)+w[1].length)),b=(Math.round(h*w)/w).toString()),""),I=0,B=b.length;I<B;I+=1){var V=b[I];k+=V==="e"?b[++I]==="-"?"c":"b":V==="."?"a":V==="-"?"e":V}for(var J=[30],se=0,ne=(k+=1&k.length?"f":"ff").length;se<ne;se+=2)J.push(parseInt(k.substr(se,2),16));return J},X.REAL=function(h){return N.REAL(h).length},N.NAME=N.CHARARRAY,X.NAME=X.CHARARRAY,N.STRING=N.CHARARRAY,X.STRING=X.CHARARRAY,R.UTF8=function(h,b,w){for(var k=[],I=w,B=0;B<I;B++,b+=1)k[B]=h.getUint8(b);return String.fromCharCode.apply(null,k)},R.UTF16=function(h,b,w){for(var k=[],I=w/2,B=0;B<I;B++,b+=2)k[B]=h.getUint16(b);return String.fromCharCode.apply(null,k)},N.UTF16=function(h){for(var b=[],w=0;w<h.length;w+=1){var k=h.charCodeAt(w);b[b.length]=k>>8&255,b[b.length]=255&k}return b},X.UTF16=function(h){return 2*h.length};var re,ie={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ee=(R.MACSTRING=function(h,b,w,k){var I=ie[k];if(I!==void 0){for(var B="",V=0;V<w;V++){var J=h.getUint8(b+V);B+=J<=127?String.fromCharCode(J):I[127&J]}return B}},typeof WeakMap=="function"&&new WeakMap);function ae(h){return-128<=h&&h<=127}N.MACSTRING=function(h,b){var w=(function(V){if(!re)for(var J in re={},ie)re[J]=new String(J);var se=re[V];if(se!==void 0){if(ee){var ne=ee.get(se);if(ne!==void 0)return ne}var ye=ie[V];if(ye!==void 0){for(var we={},be=0;be<ye.length;be++)we[ye.charCodeAt(be)]=be+128;return ee&&ee.set(se,we),we}}})(b);if(w!==void 0){for(var k=[],I=0;I<h.length;I++){var B=h.charCodeAt(I);if(128<=B&&(B=w[B])===void 0)return;k[I]=B}return k}},X.MACSTRING=function(h,b){return h=N.MACSTRING(h,b),h!==void 0?h.length:0},N.VARDELTAS=function(h){for(var k=0,b=[];k<h.length;)var w=h[k],k=(w===0?function(I,B,V){for(var J=0,se=I.length;B<se&&J<64&&I[B]===0;)++B,++J;return V.push(128|J-1),B}:-128<=w&&w<=127?function(I,B,V){for(var J=0,se=I.length,ne=B;ne<se&&J<64;){var ye=I[ne];if(!ae(ye)||ye===0&&ne+1<se&&I[ne+1]===0)break;++ne,++J}V.push(J-1);for(var we=B;we<ne;++we)V.push(I[we]+256&255);return ne}:function(I,B,V){for(var J=0,se=I.length,ne=B;ne<se&&J<64;){var ye=I[ne];if(ye===0||ae(ye)&&ne+1<se&&ae(I[ne+1]))break;++ne,++J}V.push(64|J-1);for(var we=B;we<ne;++we){var be=I[we];V.push(be+65536>>8&255,be+256&255)}return ne})(h,k,b);return b},N.INDEX=function(h){for(var b=1,w=[b],k=[],I=0;I<h.length;I+=1){var B=N.OBJECT(h[I]);Array.prototype.push.apply(k,B),b+=B.length,w.push(b)}if(k.length===0)return[0,0];for(var V=[],J=1+Math.floor(Math.log(b)/Math.log(2))/8|0,se=[void 0,N.BYTE,N.USHORT,N.UINT24,N.ULONG][J],ne=0;ne<w.length;ne+=1){var ye=se(w[ne]);Array.prototype.push.apply(V,ye)}return Array.prototype.concat(N.Card16(h.length),N.OffSize(J),V,k)},X.INDEX=function(h){return N.INDEX(h).length},N.DICT=function(h){for(var b=[],w=Object.keys(h),k=w.length,I=0;I<k;I+=1){var B=parseInt(w[I],0),V=h[B];b=(b=b.concat(N.OPERAND(V.value,V.type))).concat(N.OPERATOR(B))}return b},X.DICT=function(h){return N.DICT(h).length},N.OPERATOR=function(h){return h<1200?[h]:[12,h-1200]},N.OPERAND=function(h,b){var w=[];if(Array.isArray(b))for(var k=0;k<b.length;k+=1)j.argument(h.length===b.length,"Not enough arguments given for type"+b),w=w.concat(N.OPERAND(h[k],b[k]));else if(b==="SID")w=w.concat(N.NUMBER(h));else if(b==="offset")w=w.concat(N.NUMBER32(h));else if(b==="number")w=w.concat(N.NUMBER(h));else{if(b!=="real")throw new Error("Unknown operand type "+b);w=w.concat(N.REAL(h))}return w},N.OP=N.BYTE,X.OP=X.BYTE;var ue=typeof WeakMap=="function"&&new WeakMap;function Q(h,b,w){for(var k=0;k<b.length;k+=1){var I=b[k];this[I.name]=I.value}if(this.tableName=h,this.fields=b,w)for(var B=Object.keys(w),V=0;V<B.length;V+=1){var J=B[V],se=w[J];this[J]!==void 0&&(this[J]=se)}}function le(h,b,w){w===void 0&&(w=b.length);var k=new Array(b.length+1);k[0]={name:h+"Count",type:"USHORT",value:w};for(var I=0;I<b.length;I++)k[I+1]={name:h+I,type:"USHORT",value:b[I]};return k}function fe(h,b,w){var k=b.length,I=new Array(k+1);I[0]={name:h+"Count",type:"USHORT",value:k};for(var B=0;B<k;B++)I[B+1]={name:h+B,type:"TABLE",value:w(b[B],B)};return I}function ve(h,b,w){var k=b.length,I=[];I[0]={name:h+"Count",type:"USHORT",value:k};for(var B=0;B<k;B++)I=I.concat(w(b[B],B));return I}function he(h){h.format===1?Q.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(le("glyph",h.glyphs))):j.assert(!1,"Can't create coverage table format 2 yet.")}function me(h){Q.call(this,"scriptListTable",ve("scriptRecord",h,function(b,w){var k=b.script,I=k.defaultLangSys;return j.assert(!!I,"Unable to write GSUB: script "+b.tag+" has no default language system."),[{name:"scriptTag"+w,type:"TAG",value:b.tag},{name:"script"+w,type:"TABLE",value:new Q("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new Q("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:I.reqFeatureIndex}].concat(le("featureIndex",I.featureIndexes)))}].concat(ve("langSys",k.langSysRecords,function(B,V){var J=B.langSys;return[{name:"langSysTag"+V,type:"TAG",value:B.tag},{name:"langSys"+V,type:"TABLE",value:new Q("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:J.reqFeatureIndex}].concat(le("featureIndex",J.featureIndexes)))}]})))}]}))}function _e(h){Q.call(this,"featureListTable",ve("featureRecord",h,function(b,w){var k=b.feature;return[{name:"featureTag"+w,type:"TAG",value:b.tag},{name:"feature"+w,type:"TABLE",value:new Q("featureTable",[{name:"featureParams",type:"USHORT",value:k.featureParams}].concat(le("lookupListIndex",k.lookupListIndexes)))}]}))}function Ae(h,b){Q.call(this,"lookupListTable",fe("lookup",h,function(w){var k=b[w.lookupType];return j.assert(!!k,"Unable to write GSUB lookup type "+w.lookupType+" tables."),new Q("lookupTable",[{name:"lookupType",type:"USHORT",value:w.lookupType},{name:"lookupFlag",type:"USHORT",value:w.lookupFlag}].concat(fe("subtable",w.subtables,k)))}))}N.CHARSTRING=function(h){if(ue){var b=ue.get(h);if(b!==void 0)return b}for(var B=[],w=h.length,k=0;k<w;k+=1)var I=h[k],B=B.concat(N[I.type](I.value));return ue&&ue.set(h,B),B},X.CHARSTRING=function(h){return N.CHARSTRING(h).length},N.OBJECT=function(h){var b=N[h.type];return j.argument(b!==void 0,"No encoding function for type "+h.type),b(h.value)},X.OBJECT=function(h){var b=X[h.type];return j.argument(b!==void 0,"No sizeOf function for type "+h.type),b(h.value)},N.TABLE=function(h){for(var b=[],w=h.fields.length,k=[],I=[],B=0;B<w;B+=1){var V=h.fields[B],se=N[V.type],J=(j.argument(se!==void 0,"No encoding function for field type "+V.type+" ("+V.name+")"),h[V.name]),se=se(J=J===void 0?V.value:J);V.type==="TABLE"?(I.push(b.length),b=b.concat([0,0]),k.push(se)):b=b.concat(se)}for(var ne=0;ne<k.length;ne+=1){var ye=I[ne],we=b.length;j.argument(we<65536,"Table "+h.tableName+" too big."),b[ye]=we>>8,b[ye+1]=255&we,b=b.concat(k[ne])}return b},X.TABLE=function(h){for(var b=0,w=h.fields.length,k=0;k<w;k+=1){var I=h.fields[k],B=X[I.type],V=(j.argument(B!==void 0,"No sizeOf function for field type "+I.type+" ("+I.name+")"),h[I.name]);b+=B(V=V===void 0?I.value:V),I.type==="TABLE"&&(b+=2)}return b},N.RECORD=N.TABLE,X.RECORD=X.TABLE,N.LITERAL=function(h){return h},X.LITERAL=function(h){return h.length},Q.prototype.encode=function(){return N.TABLE(this)},Q.prototype.sizeOf=function(){return X.TABLE(this)};var Se={Table:Q,Record:Q,Coverage:(he.prototype=Object.create(Q.prototype)).constructor=he,ScriptList:(me.prototype=Object.create(Q.prototype)).constructor=me,FeatureList:(_e.prototype=Object.create(Q.prototype)).constructor=_e,LookupList:(Ae.prototype=Object.create(Q.prototype)).constructor=Ae,ushortList:le,tableList:fe,recordList:ve};function Ge(h,b){return h.getUint8(b)}function Ne(h,b){return h.getUint16(b,!1)}function Be(h,b){return h.getUint32(b,!1)}function He(h,b){return h.getInt16(b,!1)+h.getUint16(b+2,!1)/65535}var Ve={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function ge(h,b){this.data=h,this.offset=b,this.relativeOffset=0}ge.prototype.parseByte=function(){var h=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,h},ge.prototype.parseChar=function(){var h=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,h},ge.prototype.parseCard8=ge.prototype.parseByte,ge.prototype.parseCard16=ge.prototype.parseUShort=function(){var h=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,h},ge.prototype.parseSID=ge.prototype.parseUShort,ge.prototype.parseOffset16=ge.prototype.parseUShort,ge.prototype.parseShort=function(){var h=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,h},ge.prototype.parseF2Dot14=function(){var h=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,h},ge.prototype.parseOffset32=ge.prototype.parseULong=function(){var h=Be(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,h},ge.prototype.parseFixed=function(){var h=He(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,h},ge.prototype.parseString=function(h){var b=this.data,w=this.offset+this.relativeOffset,k="";this.relativeOffset+=h;for(var I=0;I<h;I++)k+=String.fromCharCode(b.getUint8(w+I));return k},ge.prototype.parseTag=function(){return this.parseString(4)},ge.prototype.parseLongDateTime=function(){var h=Be(this.data,this.offset+this.relativeOffset+4);return h-=2082844800,this.relativeOffset+=8,h},ge.prototype.parseVersion=function(h){var b=Ne(this.data,this.offset+this.relativeOffset),w=Ne(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,b+w/(h=h===void 0?4096:h)/10},ge.prototype.skip=function(h,b){this.relativeOffset+=Ve[h]*(b=b===void 0?1:b)},ge.prototype.parseULongList=function(h){h===void 0&&(h=this.parseULong());for(var b=new Array(h),w=this.data,k=this.offset+this.relativeOffset,I=0;I<h;I++)b[I]=w.getUint32(k),k+=4;return this.relativeOffset+=4*h,b},ge.prototype.parseOffset16List=ge.prototype.parseUShortList=function(h){h===void 0&&(h=this.parseUShort());for(var b=new Array(h),w=this.data,k=this.offset+this.relativeOffset,I=0;I<h;I++)b[I]=w.getUint16(k),k+=2;return this.relativeOffset+=2*h,b},ge.prototype.parseShortList=function(h){for(var b=new Array(h),w=this.data,k=this.offset+this.relativeOffset,I=0;I<h;I++)b[I]=w.getInt16(k),k+=2;return this.relativeOffset+=2*h,b},ge.prototype.parseByteList=function(h){for(var b=new Array(h),w=this.data,k=this.offset+this.relativeOffset,I=0;I<h;I++)b[I]=w.getUint8(k++);return this.relativeOffset+=h,b},ge.prototype.parseList=function(h,b){b||(b=h,h=this.parseUShort());for(var w=new Array(h),k=0;k<h;k++)w[k]=b.call(this);return w},ge.prototype.parseList32=function(h,b){b||(b=h,h=this.parseULong());for(var w=new Array(h),k=0;k<h;k++)w[k]=b.call(this);return w},ge.prototype.parseRecordList=function(h,b){b||(b=h,h=this.parseUShort());for(var w=new Array(h),k=Object.keys(b),I=0;I<h;I++){for(var B={},V=0;V<k.length;V++){var J=k[V],se=b[J];B[J]=se.call(this)}w[I]=B}return w},ge.prototype.parseRecordList32=function(h,b){b||(b=h,h=this.parseULong());for(var w=new Array(h),k=Object.keys(b),I=0;I<h;I++){for(var B={},V=0;V<k.length;V++){var J=k[V],se=b[J];B[J]=se.call(this)}w[I]=B}return w},ge.prototype.parseStruct=function(h){if(typeof h=="function")return h.call(this);for(var b=Object.keys(h),w={},k=0;k<b.length;k++){var I=b[k],B=h[I];w[I]=B.call(this)}return w},ge.prototype.parseValueRecord=function(h){var b;if((h=h===void 0?this.parseUShort():h)!==0)return b={},1&h&&(b.xPlacement=this.parseShort()),2&h&&(b.yPlacement=this.parseShort()),4&h&&(b.xAdvance=this.parseShort()),8&h&&(b.yAdvance=this.parseShort()),16&h&&(b.xPlaDevice=void 0,this.parseShort()),32&h&&(b.yPlaDevice=void 0,this.parseShort()),64&h&&(b.xAdvDevice=void 0,this.parseShort()),128&h&&(b.yAdvDevice=void 0,this.parseShort()),b},ge.prototype.parseValueRecordList=function(){for(var h=this.parseUShort(),b=this.parseUShort(),w=new Array(b),k=0;k<b;k++)w[k]=this.parseValueRecord(h);return w},ge.prototype.parsePointer=function(h){var b=this.parseOffset16();if(0<b)return new ge(this.data,this.offset+b).parseStruct(h)},ge.prototype.parsePointer32=function(h){var b=this.parseOffset32();if(0<b)return new ge(this.data,this.offset+b).parseStruct(h)},ge.prototype.parseListOfLists=function(h){for(var b=this.parseOffset16List(),w=b.length,k=this.relativeOffset,I=new Array(w),B=0;B<w;B++){var V=b[B];if(V===0)I[B]=void 0;else if(this.relativeOffset=V,h){for(var J=this.parseOffset16List(),se=new Array(J.length),ne=0;ne<J.length;ne++)this.relativeOffset=V+J[ne],se[ne]=h.call(this);I[B]=se}else I[B]=this.parseUShortList()}return this.relativeOffset=k,I},ge.prototype.parseCoverage=function(){var h=this.offset+this.relativeOffset,b=this.parseUShort(),w=this.parseUShort();if(b===1)return{format:1,glyphs:this.parseUShortList(w)};if(b!==2)throw new Error("0x"+h.toString(16)+": Coverage format must be 1 or 2.");for(var k=new Array(w),I=0;I<w;I++)k[I]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:k}},ge.prototype.parseClassDef=function(){var h=this.offset+this.relativeOffset,b=this.parseUShort();if(b===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(b===2)return{format:2,ranges:this.parseRecordList({start:ge.uShort,end:ge.uShort,classId:ge.uShort})};throw new Error("0x"+h.toString(16)+": ClassDef format must be 1 or 2.")},ge.list=function(h,b){return function(){return this.parseList(h,b)}},ge.list32=function(h,b){return function(){return this.parseList32(h,b)}},ge.recordList=function(h,b){return function(){return this.parseRecordList(h,b)}},ge.recordList32=function(h,b){return function(){return this.parseRecordList32(h,b)}},ge.pointer=function(h){return function(){return this.parsePointer(h)}},ge.pointer32=function(h){return function(){return this.parsePointer32(h)}},ge.tag=ge.prototype.parseTag,ge.byte=ge.prototype.parseByte,ge.uShort=ge.offset16=ge.prototype.parseUShort,ge.uShortList=ge.prototype.parseUShortList,ge.uLong=ge.offset32=ge.prototype.parseULong,ge.uLongList=ge.prototype.parseULongList,ge.struct=ge.prototype.parseStruct,ge.coverage=ge.prototype.parseCoverage,ge.classDef=ge.prototype.parseClassDef;var Ce={reserved:ge.uShort,reqFeatureIndex:ge.uShort,featureIndexes:ge.uShortList},xe=(ge.prototype.parseScriptList=function(){return this.parsePointer(ge.recordList({tag:ge.tag,script:ge.pointer({defaultLangSys:ge.pointer(Ce),langSysRecords:ge.recordList({tag:ge.tag,langSys:ge.pointer(Ce)})})}))||[]},ge.prototype.parseFeatureList=function(){return this.parsePointer(ge.recordList({tag:ge.tag,feature:ge.pointer({featureParams:ge.offset16,lookupListIndexes:ge.uShortList})}))||[]},ge.prototype.parseLookupList=function(h){return this.parsePointer(ge.list(ge.pointer(function(){var b=this.parseUShort(),w=(j.argument(1<=b&&b<=9,"GPOS/GSUB lookup type "+b+" unknown."),this.parseUShort()),k=16&w;return{lookupType:b,lookupFlag:w,subtables:this.parseList(ge.pointer(h[b])),markFilteringSet:k?this.parseUShort():void 0}})))||[]},ge.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var h=this.parseUShort(),b=this.parseUShort();return j.argument(h===1&&b<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:ge.offset32,featureTableSubstitutionOffset:ge.offset32})})||[]},{getByte:Ge,getCard8:Ge,getUShort:Ne,getCard16:Ne,getShort:function(h,b){return h.getInt16(b,!1)},getULong:Be,getFixed:He,getTag:function(h,b){for(var w="",k=b;k<b+4;k+=1)w+=String.fromCharCode(h.getInt8(k));return w},getOffset:function(h,b,w){for(var k=0,I=0;I<w;I+=1)k=(k<<=8)+h.getUint8(b+I);return k},getBytes:function(h,b,w){for(var k=[],I=b;I<w;I+=1)k.push(h.getUint8(I));return k},bytesToString:function(h){for(var b="",w=0;w<h.length;w+=1)b+=String.fromCharCode(h[w]);return b},Parser:ge}),Z={parse:function(h,b){for(var w={},k=(w.version=xe.getUShort(h,b),j.argument(w.version===0,"cmap table version should be 0."),w.numTables=xe.getUShort(h,b+2),-1),I=w.numTables-1;0<=I;--I){var B=xe.getUShort(h,b+4+8*I),V=xe.getUShort(h,b+4+8*I+2);if(B===3&&(V===0||V===1||V===10)||B===0&&(V===0||V===1||V===2||V===3||V===4)){k=xe.getULong(h,b+4+8*I+4);break}}if(k===-1)throw new Error("No valid cmap sub-tables found.");var J=new xe.Parser(h,b+k);if(w.format=J.parseUShort(),w.format===12){var se,ne=w,ye=J;ye.parseUShort(),ne.length=ye.parseULong(),ne.language=ye.parseULong(),ne.groupCount=se=ye.parseULong(),ne.glyphIndexMap={};for(var we=0;we<se;we+=1)for(var be=ye.parseULong(),ce=ye.parseULong(),Pe=ye.parseULong(),Me=be;Me<=ce;Me+=1)ne.glyphIndexMap[Me]=Pe,Pe++}else{if(w.format!==4)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+w.format+").");var Oe=w,Te=h,Ee=b,Ke=k;Oe.length=J.parseUShort(),Oe.language=J.parseUShort(),Oe.segCount=nt=J.parseUShort()>>1,J.skip("uShort",3),Oe.glyphIndexMap={};for(var nt,Qe=new xe.Parser(Te,Ee+Ke+14),Je=new xe.Parser(Te,Ee+Ke+16+2*nt),ot=new xe.Parser(Te,Ee+Ke+16+4*nt),mt=new xe.Parser(Te,Ee+Ke+16+6*nt),_t=Ee+Ke+16+8*nt,Tt=0;Tt<nt-1;Tt+=1)for(var Dt=void 0,Ft=Qe.parseUShort(),Vt=Je.parseUShort(),ft=ot.parseShort(),gt=mt.parseUShort(),ct=Vt;ct<=Ft;ct+=1)gt!==0?(_t=(_t=mt.offset+mt.relativeOffset-2)+gt+2*(ct-Vt),(Dt=xe.getUShort(Te,_t))!==0&&(Dt=Dt+ft&65535)):Dt=ct+ft&65535,Oe.glyphIndexMap[ct]=Dt}return w},make:function(h){for(var b=!0,w=h.length-1;0<w;--w)if(65535<h.get(w).unicode){console.log("Adding CMAP format 12 (needed!)"),b=!1;break}var k,I,B=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:b?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:b?12:20}],V=(B=(B=b?B:B.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])).concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]),new Se.Table("cmap",B));for(V.segments=[],w=0;w<h.length;w+=1){for(var J=h.get(w),se=0;se<J.unicodes.length;se+=1)k=J.unicodes[se],I=w,V.segments.push({end:k,start:k,delta:-(k-I),offset:0,glyphIndex:I});V.segments=V.segments.sort(function(Ee,Ke){return Ee.start-Ke.start})}V.segments.push({end:65535,start:65535,delta:1,offset:0});var ne=V.segments.length,ye=0,we=[],be=[],ce=[],Pe=[],Me=[],Oe=[];for(w=0;w<ne;w+=1){var Te=V.segments[w];Te.end<=65535&&Te.start<=65535?(we=we.concat({name:"end_"+w,type:"USHORT",value:Te.end}),be=be.concat({name:"start_"+w,type:"USHORT",value:Te.start}),ce=ce.concat({name:"idDelta_"+w,type:"SHORT",value:Te.delta}),Pe=Pe.concat({name:"idRangeOffset_"+w,type:"USHORT",value:Te.offset}),Te.glyphId!==void 0&&(Me=Me.concat({name:"glyph_"+w,type:"USHORT",value:Te.glyphId}))):ye+=1,b||Te.glyphIndex===void 0||(Oe=(Oe=(Oe=Oe.concat({name:"cmap12Start_"+w,type:"ULONG",value:Te.start})).concat({name:"cmap12End_"+w,type:"ULONG",value:Te.end})).concat({name:"cmap12Glyph_"+w,type:"ULONG",value:Te.glyphIndex}))}return V.segCountX2=2*(ne-ye),V.searchRange=2*Math.pow(2,Math.floor(Math.log(ne-ye)/Math.log(2))),V.entrySelector=Math.log(V.searchRange/2)/Math.log(2),V.rangeShift=V.segCountX2-V.searchRange,V.fields=V.fields.concat(we),V.fields.push({name:"reservedPad",type:"USHORT",value:0}),V.fields=V.fields.concat(be),V.fields=V.fields.concat(ce),V.fields=V.fields.concat(Pe),V.fields=V.fields.concat(Me),V.cmap4Length=14+2*we.length+2+2*be.length+2*ce.length+2*Pe.length+2*Me.length,b||(B=16+4*Oe.length,V.cmap12Offset=20+V.cmap4Length,V.fields=V.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:B},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:Oe.length/3}]),V.fields=V.fields.concat(Oe)),V}},$=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],q=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],te=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],pe=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function je(h){this.font=h}function ke(h){this.cmap=h}function Ie(h,b){this.encoding=h,this.charset=b}function Fe(h){switch(h.version){case 1:this.names=pe.slice();break;case 2:this.names=new Array(h.numberOfGlyphs);for(var b=0;b<h.numberOfGlyphs;b++)h.glyphNameIndex[b]<pe.length?this.names[b]=pe[h.glyphNameIndex[b]]:this.names[b]=h.names[h.glyphNameIndex[b]-pe.length];break;case 2.5:this.names=new Array(h.numberOfGlyphs);for(var w=0;w<h.numberOfGlyphs;w++)this.names[w]=pe[w+h.glyphNameIndex[w]];break;default:this.names=[]}}je.prototype.charToGlyphIndex=function(h){var b=h.codePointAt(0),w=this.font.glyphs;if(w){for(var k=0;k<w.length;k+=1)for(var I=w.get(k),B=0;B<I.unicodes.length;B+=1)if(I.unicodes[B]===b)return k}return null},ke.prototype.charToGlyphIndex=function(h){return this.cmap.glyphIndexMap[h.codePointAt(0)]||0},Ie.prototype.charToGlyphIndex=function(h){return h=h.codePointAt(0),h=this.encoding[h],this.charset.indexOf(h)},Fe.prototype.nameToGlyphIndex=function(h){return this.names.indexOf(h)},Fe.prototype.glyphIndexToName=function(h){return this.names[h]};var Ue={line:function(h,b,w,k,I){h.beginPath(),h.moveTo(b,w),h.lineTo(k,I),h.stroke()}};function We(h){this.bindConstructorValues(h)}function rt(h,b,w){Object.defineProperty(h,b,{get:function(){return h.path,h[w]},set:function(k){h[w]=k},enumerable:!0,configurable:!0})}function et(h,b){if(this.font=h,this.glyphs={},Array.isArray(b))for(var w=0;w<b.length;w++)this.glyphs[w]=b[w];this.length=b&&b.length||0}We.prototype.bindConstructorValues=function(h){var b;this.index=h.index||0,this.name=h.name||null,this.unicode=h.unicode||void 0,this.unicodes=h.unicodes||h.unicode!==void 0?[h.unicode]:[],h.xMin&&(this.xMin=h.xMin),h.yMin&&(this.yMin=h.yMin),h.xMax&&(this.xMax=h.xMax),h.yMax&&(this.yMax=h.yMax),h.advanceWidth&&(this.advanceWidth=h.advanceWidth),Object.defineProperty(this,"path",(h=h.path,b=h||new Y,{configurable:!0,get:function(){return b=typeof b=="function"?b():b},set:function(w){b=w}}))},We.prototype.addUnicode=function(h){this.unicodes.length===0&&(this.unicode=h),this.unicodes.push(h)},We.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},We.prototype.getPath=function(h,b,w,k,I){h=h!==void 0?h:0,b=b!==void 0?b:0,w=w!==void 0?w:72;for(var B,V,J=(k=k||{}).xScale,se=k.yScale,ne=((B=k.hinting&&I&&I.hinting?this.path&&I.hinting.exec(this,w):B)?(V=I.hinting.getCommands(B),h=Math.round(h),b=Math.round(b),J=se=1):(V=this.path.commands,k=1/this.path.unitsPerEm*w,J===void 0&&(J=k),se===void 0&&(se=k)),new Y),ye=0;ye<V.length;ye+=1){var we=V[ye];we.type==="M"?ne.moveTo(h+we.x*J,b+-we.y*se):we.type==="L"?ne.lineTo(h+we.x*J,b+-we.y*se):we.type==="Q"?ne.quadraticCurveTo(h+we.x1*J,b+-we.y1*se,h+we.x*J,b+-we.y*se):we.type==="C"?ne.curveTo(h+we.x1*J,b+-we.y1*se,h+we.x2*J,b+-we.y2*se,h+we.x*J,b+-we.y*se):we.type==="Z"&&ne.closePath()}return ne},We.prototype.getContours=function(){if(this.points===void 0)return[];for(var h=[],b=[],w=0;w<this.points.length;w+=1){var k=this.points[w];b.push(k),k.lastPointOfContour&&(h.push(b),b=[])}return j.argument(b.length===0,"There are still points left in the current contour."),h},We.prototype.getMetrics=function(){for(var h=this.path.commands,b=[],w=[],k=0;k<h.length;k+=1){var I=h[k];I.type!=="Z"&&(b.push(I.x),w.push(I.y)),I.type!=="Q"&&I.type!=="C"||(b.push(I.x1),w.push(I.y1)),I.type==="C"&&(b.push(I.x2),w.push(I.y2))}var B={xMin:Math.min.apply(null,b),yMin:Math.min.apply(null,w),xMax:Math.max.apply(null,b),yMax:Math.max.apply(null,w),leftSideBearing:this.leftSideBearing};return isFinite(B.xMin)||(B.xMin=0),isFinite(B.xMax)||(B.xMax=this.advanceWidth),isFinite(B.yMin)||(B.yMin=0),isFinite(B.yMax)||(B.yMax=0),B.rightSideBearing=this.advanceWidth-B.leftSideBearing-(B.xMax-B.xMin),B},We.prototype.draw=function(h,b,w,k,I){this.getPath(b,w,k,I).draw(h)},We.prototype.drawPoints=function(h,b,w,k){function I(ye,we,be,ce){var Pe=2*Math.PI;h.beginPath();for(var Me=0;Me<ye.length;Me+=1)h.moveTo(we+ye[Me].x*ce,be+ye[Me].y*ce),h.arc(we+ye[Me].x*ce,be+ye[Me].y*ce,2,0,Pe,!1);h.closePath(),h.fill()}b=b!==void 0?b:0,w=w!==void 0?w:0;for(var k=1/this.path.unitsPerEm*(k=k!==void 0?k:24),B=[],V=[],J=this.path,se=0;se<J.commands.length;se+=1){var ne=J.commands[se];ne.x!==void 0&&B.push({x:ne.x,y:-ne.y}),ne.x1!==void 0&&V.push({x:ne.x1,y:-ne.y1}),ne.x2!==void 0&&V.push({x:ne.x2,y:-ne.y2})}h.fillStyle="blue",I(B,b,w,k),h.fillStyle="red",I(V,b,w,k)},We.prototype.drawMetrics=function(h,b,w,k){b=b!==void 0?b:0,w=w!==void 0?w:0,k=1/this.path.unitsPerEm*(k=k!==void 0?k:24),h.lineWidth=1,h.strokeStyle="black",Ue.line(h,b,-1e4,b,1e4),Ue.line(h,-1e4,w,1e4,w);var I=this.xMin||0,B=this.yMin||0,V=this.xMax||0,J=this.yMax||0,se=this.advanceWidth||0;h.strokeStyle="blue",Ue.line(h,b+I*k,-1e4,b+I*k,1e4),Ue.line(h,b+V*k,-1e4,b+V*k,1e4),Ue.line(h,-1e4,w+-B*k,1e4,w+-B*k),Ue.line(h,-1e4,w+-J*k,1e4,w+-J*k),h.strokeStyle="green",Ue.line(h,b+se*k,-1e4,b+se*k,1e4)},et.prototype.get=function(h){return typeof this.glyphs[h]=="function"&&(this.glyphs[h]=this.glyphs[h]()),this.glyphs[h]},et.prototype.push=function(h,b){this.glyphs[h]=b,this.length++};var Ye={GlyphSet:et,glyphLoader:function(h,b){return new We({index:b,font:h})},ttfGlyphLoader:function(h,b,w,k,I,B){return function(){var V=new We({index:b,font:h});return V.path=function(){w(V,k,I);var J=B(h.glyphs,V);return J.unitsPerEm=h.unitsPerEm,J},rt(V,"xMin","_xMin"),rt(V,"xMax","_xMax"),rt(V,"yMin","_yMin"),rt(V,"yMax","_yMax"),V}},cffGlyphLoader:function(h,b,w,k){return function(){var I=new We({index:b,font:h});return I.path=function(){var B=w(h,I,k);return B.unitsPerEm=h.unitsPerEm,B},I}}};function tt(h){return h=h.length<1240?107:h.length<33900?1131:32768,h}function $e(h,b,w){var k,I=[],B=[],V=xe.getCard16(h,b);if(V!==0){for(var J=xe.getByte(h,b+2),se=b+(V+1)*J+2,ne=b+3,ye=0;ye<V+1;ye+=1)I.push(xe.getOffset(h,ne,J)),ne+=J;k=se+I[V]}else k=b+2;for(var we=0;we<I.length-1;we+=1){var be=xe.getBytes(h,se+I[we],se+I[we+1]);w&&(be=w(be)),B.push(be)}return{objects:B,startOffset:b,endOffset:k}}function pt(h,b){if(b===28)return h.parseByte()<<8|h.parseByte();if(b===29)return h.parseByte()<<24|h.parseByte()<<16|h.parseByte()<<8|h.parseByte();if(b===30){for(var w=h,k="",I=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var V=w.parseByte(),B=V>>4,V=15&V;if(B==15||(k+=I[B],V==15))break;k+=I[V]}return parseFloat(k)}if(32<=b&&b<=246)return b-139;if(247<=b&&b<=250)return 256*(b-247)+h.parseByte()+108;if(251<=b&&b<=254)return 256*-(b-251)-h.parseByte()-108;throw new Error("Invalid b0 "+b)}function It(h,b,w){var k=new xe.Parser(h,b=b!==void 0?b:0),I=[],B=[];for(w=w!==void 0?w:h.length;k.relativeOffset<w;){var V=k.parseByte();V<=21?(V===12&&(V=1200+k.parseByte()),I.push([V,B]),B=[]):B.push(pt(k,V))}for(var J=I,se={},ne=0;ne<J.length;ne+=1){var ye=J[ne][0],we=J[ne][1],be=void 0,be=we.length===1?we[0]:we;if(se.hasOwnProperty(ye)&&!isNaN(se[ye]))throw new Error("Object "+se+" already has key "+ye);se[ye]=be}return se}function wt(h,b){return b=b<=390?$[b]:h[b-391]}function ut(h,b,w){for(var k,I={},B=0;B<b.length;B+=1){var V=b[B];if(Array.isArray(V.type)){var J=[];J.length=V.type.length;for(var se=0;se<V.type.length;se++)(k=h[V.op]!==void 0?h[V.op][se]:void 0)===void 0&&(k=V.value!==void 0&&V.value[se]!==void 0?V.value[se]:null),V.type[se]==="SID"&&(k=wt(w,k)),J[se]=k;I[V.name]=J}else(k=h[V.op])===void 0&&(k=V.value!==void 0?V.value:null),V.type==="SID"&&(k=wt(w,k)),I[V.name]=k}return I}var yt=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],at=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Pt(h,b,w,k){return ut(It(h,b,w),at,k)}function Mt(h,b,w,k){for(var I=[],B=0;B<w.length;B+=1){var V=new DataView(new Uint8Array(w[B]).buffer),V=(J=k,ut(It(V,0,V.byteLength),yt,J)),J=(V._subrs=[],V._subrsBias=0,V.private[0]),se=V.private[1];J!==0&&se!==0&&(J=Pt(h,se+b,J,k),V._defaultWidthX=J.defaultWidthX,V._nominalWidthX=J.nominalWidthX,J.subrs!==0&&(se=$e(h,se+J.subrs+b),V._subrs=se.objects,V._subrsBias=tt(V._subrs)),V._privateDict=J),I.push(V)}return I}function dt(h,b,w){var k,I,B,V,J,se,ne,ye,we,be=new Y,ce=[],Pe=0,Me=!1,Oe=!1,Te=0,Ee=0,Ke=(we=(h.isCIDFont?(J=h.tables.cff.topDict._fdSelect[b.index],J=h.tables.cff.topDict._fdArray[J],se=J._subrs,ne=J._subrsBias,ye=J._defaultWidthX,J):(se=h.tables.cff.topDict._subrs,ne=h.tables.cff.topDict._subrsBias,ye=h.tables.cff.topDict._defaultWidthX,h.tables.cff.topDict))._nominalWidthX,ye);function nt(Je,ot){Oe&&be.closePath(),be.moveTo(Je,ot),Oe=!0}function Qe(){ce.length%2==0||Me||(Ke=ce.shift()+we),Pe+=ce.length>>1,ce.length=0,Me=!0}return(function Je(ot){for(var mt,_t,Tt,Dt,Ft,Vt,ft,gt,ct,Ut,bt,Lt,vt=0;vt<ot.length;){var Ct=ot[vt];switch(vt+=1,Ct){case 1:case 3:Qe();break;case 4:1<ce.length&&!Me&&(Ke=ce.shift()+we,Me=!0),Ee+=ce.pop(),nt(Te,Ee);break;case 5:for(;0<ce.length;)Te+=ce.shift(),Ee+=ce.shift(),be.lineTo(Te,Ee);break;case 6:for(;0<ce.length&&(Te+=ce.shift(),be.lineTo(Te,Ee),ce.length!==0);)Ee+=ce.shift(),be.lineTo(Te,Ee);break;case 7:for(;0<ce.length&&(Ee+=ce.shift(),be.lineTo(Te,Ee),ce.length!==0);)Te+=ce.shift(),be.lineTo(Te,Ee);break;case 8:for(;0<ce.length;)k=Te+ce.shift(),I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),Te=B+ce.shift(),Ee=V+ce.shift(),be.curveTo(k,I,B,V,Te,Ee);break;case 10:Ft=ce.pop()+ne,(Vt=se[Ft])&&Je(Vt);break;case 11:return;case 12:switch(Ct=ot[vt],vt+=1,Ct){case 35:k=Te+ce.shift(),I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),ft=B+ce.shift(),gt=V+ce.shift(),ct=ft+ce.shift(),Ut=gt+ce.shift(),bt=ct+ce.shift(),Lt=Ut+ce.shift(),Te=bt+ce.shift(),Ee=Lt+ce.shift(),ce.shift(),be.curveTo(k,I,B,V,ft,gt),be.curveTo(ct,Ut,bt,Lt,Te,Ee);break;case 34:k=Te+ce.shift(),I=Ee,B=k+ce.shift(),V=I+ce.shift(),ft=B+ce.shift(),gt=V,ct=ft+ce.shift(),Ut=V,bt=ct+ce.shift(),Lt=Ee,Te=bt+ce.shift(),be.curveTo(k,I,B,V,ft,gt),be.curveTo(ct,Ut,bt,Lt,Te,Ee);break;case 36:k=Te+ce.shift(),I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),ft=B+ce.shift(),gt=V,ct=ft+ce.shift(),Ut=V,bt=ct+ce.shift(),Lt=Ut+ce.shift(),Te=bt+ce.shift(),be.curveTo(k,I,B,V,ft,gt),be.curveTo(ct,Ut,bt,Lt,Te,Ee);break;case 37:k=Te+ce.shift(),I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),ft=B+ce.shift(),gt=V+ce.shift(),ct=ft+ce.shift(),Ut=gt+ce.shift(),bt=ct+ce.shift(),Lt=Ut+ce.shift(),Math.abs(bt-Te)>Math.abs(Lt-Ee)?Te=bt+ce.shift():Ee=Lt+ce.shift(),be.curveTo(k,I,B,V,ft,gt),be.curveTo(ct,Ut,bt,Lt,Te,Ee);break;default:console.log("Glyph "+b.index+": unknown operator 1200"+Ct),ce.length=0}break;case 14:0<ce.length&&!Me&&(Ke=ce.shift()+we,Me=!0),Oe&&(be.closePath(),Oe=!1);break;case 18:Qe();break;case 19:case 20:Qe(),vt+=Pe+7>>3;break;case 21:2<ce.length&&!Me&&(Ke=ce.shift()+we,Me=!0),Ee+=ce.pop(),nt(Te+=ce.pop(),Ee);break;case 22:1<ce.length&&!Me&&(Ke=ce.shift()+we,Me=!0),nt(Te+=ce.pop(),Ee);break;case 23:Qe();break;case 24:for(;2<ce.length;)k=Te+ce.shift(),I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),Te=B+ce.shift(),Ee=V+ce.shift(),be.curveTo(k,I,B,V,Te,Ee);Te+=ce.shift(),Ee+=ce.shift(),be.lineTo(Te,Ee);break;case 25:for(;6<ce.length;)Te+=ce.shift(),Ee+=ce.shift(),be.lineTo(Te,Ee);k=Te+ce.shift(),I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),Te=B+ce.shift(),Ee=V+ce.shift(),be.curveTo(k,I,B,V,Te,Ee);break;case 26:for(ce.length%2&&(Te+=ce.shift());0<ce.length;)k=Te,I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),Te=B,Ee=V+ce.shift(),be.curveTo(k,I,B,V,Te,Ee);break;case 27:for(ce.length%2&&(Ee+=ce.shift());0<ce.length;)k=Te+ce.shift(),I=Ee,B=k+ce.shift(),V=I+ce.shift(),Te=B+ce.shift(),Ee=V,be.curveTo(k,I,B,V,Te,Ee);break;case 28:mt=ot[vt],_t=ot[vt+1],ce.push((mt<<24|_t<<16)>>16),vt+=2;break;case 29:Ft=ce.pop()+h.gsubrsBias,(Vt=h.gsubrs[Ft])&&Je(Vt);break;case 30:for(;0<ce.length&&(k=Te,I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),Te=B+ce.shift(),Ee=V+(ce.length===1?ce.shift():0),be.curveTo(k,I,B,V,Te,Ee),ce.length!==0);)k=Te+ce.shift(),I=Ee,B=k+ce.shift(),V=I+ce.shift(),Ee=V+ce.shift(),Te=B+(ce.length===1?ce.shift():0),be.curveTo(k,I,B,V,Te,Ee);break;case 31:for(;0<ce.length&&(k=Te+ce.shift(),I=Ee,B=k+ce.shift(),V=I+ce.shift(),Ee=V+ce.shift(),Te=B+(ce.length===1?ce.shift():0),be.curveTo(k,I,B,V,Te,Ee),ce.length!==0);)k=Te,I=Ee+ce.shift(),B=k+ce.shift(),V=I+ce.shift(),Te=B+ce.shift(),Ee=V+(ce.length===1?ce.shift():0),be.curveTo(k,I,B,V,Te,Ee);break;default:Ct<32?console.log("Glyph "+b.index+": unknown operator "+Ct):Ct<247?ce.push(Ct-139):Ct<251?(mt=ot[vt],vt+=1,ce.push(256*(Ct-247)+mt+108)):Ct<255?(mt=ot[vt],vt+=1,ce.push(256*-(Ct-251)-mt-108)):(mt=ot[vt],_t=ot[vt+1],Tt=ot[vt+2],Dt=ot[vt+3],vt+=4,ce.push((mt<<24|_t<<16|Tt<<8|Dt)/65536))}}})(w),b.advanceWidth=Ke,be}function At(h,b){var w,k=$.indexOf(h);return 0<=k&&(w=k),0<=(k=b.indexOf(h))?w=k+$.length:(w=$.length+b.length,b.push(h)),w}function rr(h,b,w){for(var k={},I=0;I<h.length;I+=1){var B=h[I],V=b[B.name];V===void 0||(function J(se,ne){if(se===ne)return 1;if(Array.isArray(se)&&Array.isArray(ne)&&se.length===ne.length){for(var ye=0;ye<se.length;ye+=1)if(!J(se[ye],ne[ye]))return;return 1}})(V,B.value)||(B.type==="SID"&&(V=At(V,w)),k[B.op]={name:B.name,type:B.type,value:V})}return k}function nr(h,b){var w=new Se.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return w.dict=rr(yt,h,b),w}function or(h){var b=new Se.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return b.topDicts=[{name:"topDict_0",type:"TABLE",value:h}],b}function hr(h){for(var b=new Se.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),w=0;w<h.length;w+=1){var k=h.get(w),I=(function(B){for(var V=[],J=B.path,se=(V.push({name:"width",type:"NUMBER",value:B.advanceWidth}),0),ne=0,ye=0;ye<J.commands.length;ye+=1){var we,be,ce,Pe,Me=void 0,Oe=void 0,Te=J.commands[ye];(Te=Te.type==="Q"?{type:"C",x:Te.x,y:Te.y,x1:1/3*se+2/3*Te.x1,y1:1/3*ne+2/3*Te.y1,x2:1/3*Te.x+2/3*Te.x1,y2:1/3*Te.y+2/3*Te.y1}:Te).type==="M"?(Me=Math.round(Te.x-se),Oe=Math.round(Te.y-ne),V.push({name:"dx",type:"NUMBER",value:Me}),V.push({name:"dy",type:"NUMBER",value:Oe}),V.push({name:"rmoveto",type:"OP",value:21}),se=Math.round(Te.x),ne=Math.round(Te.y)):Te.type==="L"?(Me=Math.round(Te.x-se),Oe=Math.round(Te.y-ne),V.push({name:"dx",type:"NUMBER",value:Me}),V.push({name:"dy",type:"NUMBER",value:Oe}),V.push({name:"rlineto",type:"OP",value:5}),se=Math.round(Te.x),ne=Math.round(Te.y)):Te.type==="C"&&(we=Math.round(Te.x1-se),be=Math.round(Te.y1-ne),ce=Math.round(Te.x2-Te.x1),Pe=Math.round(Te.y2-Te.y1),Me=Math.round(Te.x-Te.x2),Oe=Math.round(Te.y-Te.y2),V.push({name:"dx1",type:"NUMBER",value:we}),V.push({name:"dy1",type:"NUMBER",value:be}),V.push({name:"dx2",type:"NUMBER",value:ce}),V.push({name:"dy2",type:"NUMBER",value:Pe}),V.push({name:"dx",type:"NUMBER",value:Me}),V.push({name:"dy",type:"NUMBER",value:Oe}),V.push({name:"rrcurveto",type:"OP",value:8}),se=Math.round(Te.x),ne=Math.round(Te.y))}return V.push({name:"endchar",type:"OP",value:14}),V})(k);b.charStrings.push({name:k.name,type:"CHARSTRING",value:I})}return b}var sr={parse:function(h,b,w){w.tables.cff={},J=h,k=b,(I={}).formatMajor=xe.getCard8(J,k),I.formatMinor=xe.getCard8(J,k+1),I.size=xe.getCard8(J,k+2),I.offsetSize=xe.getCard8(J,k+3),I.startOffset=k,I.endOffset=k+4;var J=$e(h,I.endOffset,xe.bytesToString),k=$e(h,J.endOffset),I=$e(h,k.endOffset,xe.bytesToString),J=$e(h,I.endOffset);if(w.gsubrs=J.objects,w.gsubrsBias=tt(w.gsubrs),(J=Mt(h,b,k.objects,I.objects)).length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+J.length);if(k=J[0],(w.tables.cff.topDict=k)._privateDict&&(w.defaultWidthX=k._privateDict.defaultWidthX,w.nominalWidthX=k._privateDict.nominalWidthX),k.ros[0]!==void 0&&k.ros[1]!==void 0&&(w.isCIDFont=!0),w.isCIDFont){var J=k.fdArray,B=k.fdSelect;if(J===0||B===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");J=Mt(h,b,$e(h,J+=b).objects,I.objects),k._fdArray=J,k._fdSelect=(function(be,ce,Pe,Me){var Oe,Te=[],Ee=new xe.Parser(be,ce);if((be=Ee.parseCard8())===0)for(var Ke=0;Ke<Pe;Ke++){if(Me<=(Oe=Ee.parseCard8()))throw new Error("CFF table CID Font FDSelect has bad FD index value "+Oe+" (FD count "+Me+")");Te.push(Oe)}else{if(be!==3)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+be);var nt,Qe=Ee.parseCard16(),Je=Ee.parseCard16();if(Je!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+Je);for(var ot=0;ot<Qe;ot++){if(Oe=Ee.parseCard8(),nt=Ee.parseCard16(),Me<=Oe)throw new Error("CFF table CID Font FDSelect has bad FD index value "+Oe+" (FD count "+Me+")");if(Pe<nt)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+nt);for(;Je<nt;Je++)Te.push(Oe);Je=nt}if(nt!==Pe)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+nt)}return Te})(h,B+=b,w.numGlyphs,J.length)}var B=b+k.private[1],J=Pt(h,B,k.private[0],I.objects),V=(w.defaultWidthX=J.defaultWidthX,w.nominalWidthX=J.nominalWidthX,J.subrs!==0?(B=$e(h,B+J.subrs),w.subrs=B.objects,w.subrsBias=tt(w.subrs)):(w.subrs=[],w.subrsBias=0),$e(h,b+k.charStrings)),J=(w.nGlyphs=V.objects.length,(function(ye,we,be,ce){var Pe=new xe.Parser(ye,we),Me=(--be,[".notdef"]);if((ye=Pe.parseCard8())===0)for(var Oe=0;Oe<be;Oe+=1)Te=Pe.parseSID(),Me.push(wt(ce,Te));else if(ye===1)for(;Me.length<=be;)for(var Te=Pe.parseSID(),Ee=Pe.parseCard8(),Ke=0;Ke<=Ee;Ke+=1)Me.push(wt(ce,Te)),Te+=1;else{if(ye!==2)throw new Error("Unknown charset format "+ye);for(;Me.length<=be;){Te=Pe.parseSID(),Ee=Pe.parseCard16();for(var nt=0;nt<=Ee;nt+=1)Me.push(wt(ce,Te)),Te+=1}}return Me})(h,b+k.charset,w.nGlyphs,I.objects));k.encoding===0?w.cffEncoding=new Ie(q,J):k.encoding===1?w.cffEncoding=new Ie(te,J):w.cffEncoding=(function(ye,we,be){var ce={},Pe=new xe.Parser(ye,we);if((ye=Pe.parseCard8())===0)for(var Me=Pe.parseCard8(),Oe=0;Oe<Me;Oe+=1)ce[Ee=Pe.parseCard8()]=Oe;else{if(ye!==1)throw new Error("Unknown encoding format "+ye);for(var Te=Pe.parseCard8(),Ee=1,Ke=0;Ke<Te;Ke+=1)for(var nt=Pe.parseCard8(),Qe=Pe.parseCard8(),Je=nt;Je<=nt+Qe;Je+=1)ce[Je]=Ee,Ee+=1}return new Ie(ce,be)})(h,b+k.encoding,J),w.encoding=w.encoding||w.cffEncoding,w.glyphs=new Ye.GlyphSet(w);for(var se=0;se<w.nGlyphs;se+=1){var ne=V.objects[se];w.glyphs.push(se,Ye.cffGlyphLoader(w,se,dt,ne))}},make:function(h,ye){for(var w,k=new Se.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),I=1/ye.unitsPerEm,I={version:ye.version,fullName:ye.fullName,familyName:ye.familyName,weight:ye.weightName,fontBBox:ye.fontBBox||[0,0,0,0],fontMatrix:[I,0,0,I,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},B=[],V=1;V<h.length;V+=1)w=h.get(V),B.push(w.name);var J,se,ne=[],ye=(k.header=new Se.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),k.nameIndex=(function(be){var ce=new Se.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);ce.names=[];for(var Pe=0;Pe<be.length;Pe+=1)ce.names.push({name:"name_"+Pe,type:"NAME",value:be[Pe]});return ce})([ye.postScriptName]),nr(I,ne)),we=(k.topDictIndex=or(ye),k.globalSubrIndex=new Se.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),k.charsets=(function(be,ce){for(var Pe=new Se.Record("Charsets",[{name:"format",type:"Card8",value:0}]),Me=0;Me<be.length;Me+=1){var Oe=At(be[Me],ce);Pe.fields.push({name:"glyph_"+Me,type:"SID",value:Oe})}return Pe})(B,ne),k.charStringsIndex=hr(h),k.privateDict=(we={},J=ne,(se=new Se.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}])).dict=rr(at,we,J),se),k.stringIndex=(function(be){var ce=new Se.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);ce.strings=[];for(var Pe=0;Pe<be.length;Pe+=1)ce.strings.push({name:"string_"+Pe,type:"STRING",value:be[Pe]});return ce})(ne),k.header.sizeOf()+k.nameIndex.sizeOf()+k.topDictIndex.sizeOf()+k.stringIndex.sizeOf()+k.globalSubrIndex.sizeOf());return I.charset=we,I.encoding=0,I.charStrings=I.charset+k.charsets.sizeOf(),I.private[1]=I.charStrings+k.charStringsIndex.sizeOf(),ye=nr(I,ne),k.topDictIndex=or(ye),k}},ir={parse:function(k,b){var w={},k=new xe.Parser(k,b);return w.version=k.parseVersion(),w.fontRevision=Math.round(1e3*k.parseFixed())/1e3,w.checkSumAdjustment=k.parseULong(),w.magicNumber=k.parseULong(),j.argument(w.magicNumber===1594834165,"Font header has wrong magic number."),w.flags=k.parseUShort(),w.unitsPerEm=k.parseUShort(),w.created=k.parseLongDateTime(),w.modified=k.parseLongDateTime(),w.xMin=k.parseShort(),w.yMin=k.parseShort(),w.xMax=k.parseShort(),w.yMax=k.parseShort(),w.macStyle=k.parseUShort(),w.lowestRecPPEM=k.parseUShort(),w.fontDirectionHint=k.parseShort(),w.indexToLocFormat=k.parseShort(),w.glyphDataFormat=k.parseShort(),w},make:function(h){var b=Math.round(new Date().getTime()/1e3)+2082844800,w=b;return h.createdTimestamp&&(w=h.createdTimestamp+2082844800),new Se.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:w},{name:"modified",type:"LONGDATETIME",value:b},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],h)}},de={parse:function(k,b){var w={},k=new xe.Parser(k,b);return w.version=k.parseVersion(),w.ascender=k.parseShort(),w.descender=k.parseShort(),w.lineGap=k.parseShort(),w.advanceWidthMax=k.parseUShort(),w.minLeftSideBearing=k.parseShort(),w.minRightSideBearing=k.parseShort(),w.xMaxExtent=k.parseShort(),w.caretSlopeRise=k.parseShort(),w.caretSlopeRun=k.parseShort(),w.caretOffset=k.parseShort(),k.relativeOffset+=8,w.metricDataFormat=k.parseShort(),w.numberOfHMetrics=k.parseUShort(),w},make:function(h){return new Se.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],h)}},De={parse:function(h,b,w,k,I){for(var B,V,J=new xe.Parser(h,b),se=0;se<k;se+=1){se<w&&(B=J.parseUShort(),V=J.parseShort());var ne=I.get(se);ne.advanceWidth=B,ne.leftSideBearing=V}},make:function(h){for(var b=new Se.Table("hmtx",[]),w=0;w<h.length;w+=1){var I=h.get(w),k=I.advanceWidth||0,I=I.leftSideBearing||0;b.fields.push({name:"advanceWidth_"+w,type:"USHORT",value:k}),b.fields.push({name:"leftSideBearing_"+w,type:"SHORT",value:I})}return b}},Xe={make:function(h){for(var b=new Se.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:h.length}]),w="",k=12+4*h.length,I=0;I<h.length;++I){var B=w.indexOf(h[I]);B<0&&(B=w.length,w+=h[I]),b.fields.push({name:"offset "+I,type:"USHORT",value:k+B}),b.fields.push({name:"length "+I,type:"USHORT",value:h[I].length})}return b.fields.push({name:"stringPool",type:"CHARARRAY",value:w}),b},parse:function(h,b){for(var w=new xe.Parser(h,b),k=w.parseULong(),I=(j.argument(k===1,"Unsupported ltag table version."),w.skip("uLong",1),w.parseULong()),B=[],V=0;V<I;V++){for(var J="",se=b+w.parseUShort(),ne=w.parseUShort(),ye=se;ye<se+ne;++ye)J+=String.fromCharCode(h.getInt8(ye));B.push(J)}return B}},Re={parse:function(k,b){var w={},k=new xe.Parser(k,b);return w.version=k.parseVersion(),w.numGlyphs=k.parseUShort(),w.version===1&&(w.maxPoints=k.parseUShort(),w.maxContours=k.parseUShort(),w.maxCompositePoints=k.parseUShort(),w.maxCompositeContours=k.parseUShort(),w.maxZones=k.parseUShort(),w.maxTwilightPoints=k.parseUShort(),w.maxStorage=k.parseUShort(),w.maxFunctionDefs=k.parseUShort(),w.maxInstructionDefs=k.parseUShort(),w.maxStackElements=k.parseUShort(),w.maxSizeOfInstructions=k.parseUShort(),w.maxComponentElements=k.parseUShort(),w.maxComponentDepth=k.parseUShort()),w},make:function(h){return new Se.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:h}])}},st=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],Le={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},lt={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},ze={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"},it="utf-16",qe={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},xt={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function Et(h,b,w){switch(h){case 0:return it;case 1:return xt[w]||qe[b];case 3:if(b===1||b===10)return it}}function jt(h){var b,w={};for(b in h)w[h[b]]=parseInt(b);return w}function kt(h,b,w,k,I,B){return new Se.Record("NameRecord",[{name:"platformID",type:"USHORT",value:h},{name:"encodingID",type:"USHORT",value:b},{name:"languageID",type:"USHORT",value:w},{name:"nameID",type:"USHORT",value:k},{name:"length",type:"USHORT",value:I},{name:"offset",type:"USHORT",value:B}])}function zt(h,b){if((w=(function(B,V){var J=B.length,se=V.length-J+1;e:for(var ne=0;ne<se;ne++)for(;ne<se;ne++){for(var ye=0;ye<J;ye++)if(V[ne+ye]!==B[ye])continue e;return ne}return-1})(h,b))<0)for(var w=b.length,k=0,I=h.length;k<I;++k)b.push(h[k]);return w}var Nt={parse:function(h,b,w){for(var k={},I=new xe.Parser(h,b),b=I.parseUShort(),B=I.parseUShort(),V=I.offset+I.parseUShort(),J=0;J<B;J++){var Pe=I.parseUShort(),se=I.parseUShort(),ne=I.parseUShort(),ye=I.parseUShort(),ye=st[ye]||ye,we=I.parseUShort(),be=I.parseUShort(),ce=(function(Oe,Te,Ee){switch(Oe){case 0:if(Te===65535)return"und";if(Ee)return Ee[Te];break;case 1:return Le[Te];case 3:return ze[Te]}})(Pe,ne,w),Pe=Et(Pe,se,ne);Pe!==void 0&&ce!==void 0&&(se=void 0,(se=Pe===it?R.UTF16(h,V+be,we):R.MACSTRING(h,V+be,we,Pe))&&((ne=(ne=k[ye])===void 0?k[ye]={}:ne)[ce]=se))}return b===1&&I.parseUShort(),k},make:function(h,b){var w,k=[],I={},B=jt(st);for(w in h){var V=B[w];if(V===void 0&&(V=w),be=parseInt(V),isNaN(be))throw new Error('Name table entry "'+w+'" does not exist, see nameTableNames for complete list.');I[be]=h[w],k.push(be)}for(var J=jt(Le),se=jt(ze),ne=[],ye=[],we=0;we<k.length;we++){var be,ce,Pe=I[be=k[we]];for(ce in Pe){var Me=Pe[ce],nt=1,Oe=J[ce],Te=lt[Oe],Ee=Et(nt,Te,Oe),Ee=N.MACSTRING(Me,Ee),Ke=(Ee===void 0&&(nt=0,(Oe=b.indexOf(ce))<0&&(Oe=b.length,b.push(ce)),Te=4,Ee=N.UTF16(Me)),zt(Ee,ye)),nt=(ne.push(kt(nt,Te,Oe,be,Ee.length,Ke)),se[ce]);nt!==void 0&&(Oe=zt(Te=N.UTF16(Me),ye),ne.push(kt(3,1,nt,be,Te.length,Oe)))}}ne.sort(function(ot,mt){return ot.platformID-mt.platformID||ot.encodingID-mt.encodingID||ot.languageID-mt.languageID||ot.nameID-mt.nameID});for(var Qe=new Se.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:ne.length},{name:"stringOffset",type:"USHORT",value:6+12*ne.length}]),Je=0;Je<ne.length;Je++)Qe.fields.push({name:"record_"+Je,type:"RECORD",value:ne[Je]});return Qe.fields.push({name:"strings",type:"LITERAL",value:ye}),Qe}},Ht=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}],Ot={parse:function(h,b){var w={},k=new xe.Parser(h,b);w.version=k.parseUShort(),w.xAvgCharWidth=k.parseShort(),w.usWeightClass=k.parseUShort(),w.usWidthClass=k.parseUShort(),w.fsType=k.parseUShort(),w.ySubscriptXSize=k.parseShort(),w.ySubscriptYSize=k.parseShort(),w.ySubscriptXOffset=k.parseShort(),w.ySubscriptYOffset=k.parseShort(),w.ySuperscriptXSize=k.parseShort(),w.ySuperscriptYSize=k.parseShort(),w.ySuperscriptXOffset=k.parseShort(),w.ySuperscriptYOffset=k.parseShort(),w.yStrikeoutSize=k.parseShort(),w.yStrikeoutPosition=k.parseShort(),w.sFamilyClass=k.parseShort(),w.panose=[];for(var I=0;I<10;I++)w.panose[I]=k.parseByte();return w.ulUnicodeRange1=k.parseULong(),w.ulUnicodeRange2=k.parseULong(),w.ulUnicodeRange3=k.parseULong(),w.ulUnicodeRange4=k.parseULong(),w.achVendID=String.fromCharCode(k.parseByte(),k.parseByte(),k.parseByte(),k.parseByte()),w.fsSelection=k.parseUShort(),w.usFirstCharIndex=k.parseUShort(),w.usLastCharIndex=k.parseUShort(),w.sTypoAscender=k.parseShort(),w.sTypoDescender=k.parseShort(),w.sTypoLineGap=k.parseShort(),w.usWinAscent=k.parseUShort(),w.usWinDescent=k.parseUShort(),1<=w.version&&(w.ulCodePageRange1=k.parseULong(),w.ulCodePageRange2=k.parseULong()),2<=w.version&&(w.sxHeight=k.parseShort(),w.sCapHeight=k.parseShort(),w.usDefaultChar=k.parseUShort(),w.usBreakChar=k.parseUShort(),w.usMaxContent=k.parseUShort()),w},make:function(h){return new Se.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],h)},unicodeRanges:Ht,getUnicodeRange:function(h){for(var b=0;b<Ht.length;b+=1){var w=Ht[b];if(h>=w.begin&&h<w.end)return b}return-1}},Er={parse:function(h,b){var w={},k=new xe.Parser(h,b);switch(w.version=k.parseVersion(),w.italicAngle=k.parseFixed(),w.underlinePosition=k.parseShort(),w.underlineThickness=k.parseShort(),w.isFixedPitch=k.parseULong(),w.minMemType42=k.parseULong(),w.maxMemType42=k.parseULong(),w.minMemType1=k.parseULong(),w.maxMemType1=k.parseULong(),w.version){case 1:w.names=pe.slice();break;case 2:w.numberOfGlyphs=k.parseUShort(),w.glyphNameIndex=new Array(w.numberOfGlyphs);for(var I=0;I<w.numberOfGlyphs;I++)w.glyphNameIndex[I]=k.parseUShort();w.names=[];for(var B,V=0;V<w.numberOfGlyphs;V++)w.glyphNameIndex[V]>=pe.length&&(B=k.parseChar(),w.names.push(k.parseString(B)));break;case 2.5:w.numberOfGlyphs=k.parseUShort(),w.offset=new Array(w.numberOfGlyphs);for(var J=0;J<w.numberOfGlyphs;J++)w.offset[J]=k.parseChar()}return w},make:function(){return new Se.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}},Bt=new Array(9),Jt=(Bt[1]=function(){var h=this.offset+this.relativeOffset,b=this.parseUShort();return b===1?{substFormat:1,coverage:this.parsePointer(ge.coverage),deltaGlyphId:this.parseUShort()}:b===2?{substFormat:2,coverage:this.parsePointer(ge.coverage),substitute:this.parseOffset16List()}:void j.assert(!1,"0x"+h.toString(16)+": lookup type 1 format must be 1 or 2.")},Bt[2]=function(){var h=this.parseUShort();return j.argument(h===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:h,coverage:this.parsePointer(ge.coverage),sequences:this.parseListOfLists()}},Bt[3]=function(){var h=this.parseUShort();return j.argument(h===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:h,coverage:this.parsePointer(ge.coverage),alternateSets:this.parseListOfLists()}},Bt[4]=function(){var h=this.parseUShort();return j.argument(h===1,"GSUB ligature table identifier-format must be 1"),{substFormat:h,coverage:this.parsePointer(ge.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}},{sequenceIndex:ge.uShort,lookupListIndex:ge.uShort});Bt[5]=function(){var h,b,w=this.offset+this.relativeOffset,k=this.parseUShort();return k===1?{substFormat:k,coverage:this.parsePointer(ge.coverage),ruleSets:this.parseListOfLists(function(){var I=this.parseUShort(),B=this.parseUShort();return{input:this.parseUShortList(I-1),lookupRecords:this.parseRecordList(B,Jt)}})}:k===2?{substFormat:k,coverage:this.parsePointer(ge.coverage),classDef:this.parsePointer(ge.classDef),classSets:this.parseListOfLists(function(){var I=this.parseUShort(),B=this.parseUShort();return{classes:this.parseUShortList(I-1),lookupRecords:this.parseRecordList(B,Jt)}})}:k===3?(h=this.parseUShort(),b=this.parseUShort(),{substFormat:k,coverages:this.parseList(h,ge.pointer(ge.coverage)),lookupRecords:this.parseRecordList(b,Jt)}):void j.assert(!1,"0x"+w.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},Bt[6]=function(){var h=this.offset+this.relativeOffset,b=this.parseUShort();return b===1?{substFormat:1,coverage:this.parsePointer(ge.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Jt)}})}:b===2?{substFormat:2,coverage:this.parsePointer(ge.coverage),backtrackClassDef:this.parsePointer(ge.classDef),inputClassDef:this.parsePointer(ge.classDef),lookaheadClassDef:this.parsePointer(ge.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Jt)}})}:b===3?{substFormat:3,backtrackCoverage:this.parseList(ge.pointer(ge.coverage)),inputCoverage:this.parseList(ge.pointer(ge.coverage)),lookaheadCoverage:this.parseList(ge.pointer(ge.coverage)),lookupRecords:this.parseRecordList(Jt)}:void j.assert(!1,"0x"+h.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},Bt[7]=function(){var h=this.parseUShort(),h=(j.argument(h===1,"GSUB Extension Substitution subtable identifier-format must be 1"),this.parseUShort()),b=new ge(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:h,extension:Bt[h].call(b)}},Bt[8]=function(){var h=this.parseUShort();return j.argument(h===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:h,coverage:this.parsePointer(ge.coverage),backtrackCoverage:this.parseList(ge.pointer(ge.coverage)),lookaheadCoverage:this.parseList(ge.pointer(ge.coverage)),substitutes:this.parseUShortList()}};var fr=new Array(9);fr[1]=function(h){return h.substFormat===1?new Se.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Se.Coverage(h.coverage)},{name:"deltaGlyphID",type:"USHORT",value:h.deltaGlyphId}]):new Se.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new Se.Coverage(h.coverage)}].concat(Se.ushortList("substitute",h.substitute)))},fr[3]=function(h){return j.assert(h.substFormat===1,"Lookup type 3 substFormat must be 1."),new Se.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Se.Coverage(h.coverage)}].concat(Se.tableList("altSet",h.alternateSets,function(b){return new Se.Table("alternateSetTable",Se.ushortList("alternate",b))})))},fr[4]=function(h){return j.assert(h.substFormat===1,"Lookup type 4 substFormat must be 1."),new Se.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Se.Coverage(h.coverage)}].concat(Se.tableList("ligSet",h.ligatureSets,function(b){return new Se.Table("ligatureSetTable",Se.tableList("ligature",b,function(w){return new Se.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:w.ligGlyph}].concat(Se.ushortList("component",w.components,w.components.length+1)))}))})))};var Mr={parse:function(h,b){return b=(h=new ge(h,b=b||0)).parseVersion(1),j.argument(b===1||b===1.1,"Unsupported GSUB table version."),b===1?{version:b,scripts:h.parseScriptList(),features:h.parseFeatureList(),lookups:h.parseLookupList(Bt)}:{version:b,scripts:h.parseScriptList(),features:h.parseFeatureList(),lookups:h.parseLookupList(Bt),variations:h.parseFeatureVariationsList()}},make:function(h){return new Se.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new Se.ScriptList(h.scripts)},{name:"features",type:"TABLE",value:new Se.FeatureList(h.features)},{name:"lookups",type:"TABLE",value:new Se.LookupList(h.lookups,fr)}])}},kr={parse:function(h,b){for(var w=new xe.Parser(h,b),k=w.parseULong(),I=(j.argument(k===1,"Unsupported META table version."),w.parseULong(),w.parseULong(),w.parseULong()),B={},V=0;V<I;V++){var J=w.parseTag(),ne=w.parseULong(),se=w.parseULong(),ne=R.UTF8(h,b+ne,se);B[J]=ne}return B},make:function(h){var b,w=Object.keys(h).length,k="",I=16+12*w,B=new Se.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:I},{name:"numTags",type:"ULONG",value:w}]);for(b in h){var V=k.length;k+=h[b],B.fields.push({name:"tag "+b,type:"TAG",value:b}),B.fields.push({name:"offset "+b,type:"ULONG",value:I+V}),B.fields.push({name:"length "+b,type:"ULONG",value:h[b].length})}return B.fields.push({name:"stringPool",type:"CHARARRAY",value:k}),B}};function Or(h){return Math.log(h)/Math.log(2)|0}function vr(h){for(;h.length%4!=0;)h.push(0);for(var b=0,w=0;w<h.length;w+=4)b+=(h[w]<<24)+(h[w+1]<<16)+(h[w+2]<<8)+h[w+3];return b%=Math.pow(2,32)}function Cr(h,b,w,k){return new Se.Record("Table Record",[{name:"tag",type:"TAG",value:h!==void 0?h:""},{name:"checkSum",type:"ULONG",value:b!==void 0?b:0},{name:"offset",type:"ULONG",value:w!==void 0?w:0},{name:"length",type:"ULONG",value:k!==void 0?k:0}])}function Pr(h){for(var b=new Se.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]),w=(b.tables=h,b.numTables=h.length,Math.pow(2,Or(b.numTables))),k=(b.searchRange=16*w,b.entrySelector=Or(w),b.rangeShift=16*b.numTables-b.searchRange,[]),I=[],B=b.sizeOf()+Cr().sizeOf()*b.numTables;B%4!=0;)B+=1,I.push({name:"padding",type:"BYTE",value:0});for(var V=0;V<h.length;V+=1){var J=h[V],se=(j.argument(J.tableName.length===4,"Table name"+J.tableName+" is invalid."),J.sizeOf()),ne=Cr(J.tableName,vr(J.encode()),B,se);for(k.push({name:ne.tag+" Table Record",type:"RECORD",value:ne}),I.push({name:J.tableName+" table",type:"RECORD",value:J}),B+=se,j.argument(!isNaN(B),"Something went wrong calculating the offset.");B%4!=0;)B+=1,I.push({name:"padding",type:"BYTE",value:0})}return k.sort(function(ye,we){return ye.value.tag>we.value.tag?1:-1}),b.fields=b.fields.concat(k),b.fields=b.fields.concat(I),b}function Ar(h,b,w){for(var k=0;k<b.length;k+=1){var I=h.charToGlyphIndex(b[k]);if(0<I)return h.glyphs.get(I).getMetrics()}return w}var dn={make:Pr,fontToTable:function(h){for(var b,w=[],k=[],I=[],B=[],V=[],J=[],se=[],ne=0,ye=0,we=0,be=0,ce=0,Pe=0;Pe<h.glyphs.length;Pe+=1){var Me=h.glyphs.get(Pe),Oe=0|Me.unicode;if(isNaN(Me.advanceWidth))throw new Error("Glyph "+Me.name+" ("+Pe+"): advanceWidth is not a number.");(Oe<b||b===void 0)&&0<Oe&&(b=Oe),ne<Oe&&(ne=Oe);var Oe=Ot.getUnicodeRange(Oe);if(Oe<32)ye|=1<<Oe;else if(Oe<64)we|=1<<Oe-32;else if(Oe<96)be|=1<<Oe-64;else{if(!(Oe<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");ce|=1<<Oe-96}Me.name!==".notdef"&&(Oe=Me.getMetrics(),w.push(Oe.xMin),k.push(Oe.yMin),I.push(Oe.xMax),B.push(Oe.yMax),J.push(Oe.leftSideBearing),se.push(Oe.rightSideBearing),V.push(Me.advanceWidth))}var Te,Ee={xMin:Math.min.apply(null,w),yMin:Math.min.apply(null,k),xMax:Math.max.apply(null,I),yMax:Math.max.apply(null,B),advanceWidthMax:Math.max.apply(null,V),advanceWidthAvg:(function(Ct){for(var cr=0,tr=0;tr<Ct.length;tr+=1)cr+=Ct[tr];return cr/Ct.length})(V),minLeftSideBearing:Math.min.apply(null,J),maxLeftSideBearing:Math.max.apply(null,J),minRightSideBearing:Math.min.apply(null,se)},Ke=(Ee.ascender=h.ascender,Ee.descender=h.descender,ir.make({flags:3,unitsPerEm:h.unitsPerEm,xMin:Ee.xMin,yMin:Ee.yMin,xMax:Ee.xMax,yMax:Ee.yMax,lowestRecPPEM:3,createdTimestamp:h.createdTimestamp})),nt=de.make({ascender:Ee.ascender,descender:Ee.descender,advanceWidthMax:Ee.advanceWidthMax,minLeftSideBearing:Ee.minLeftSideBearing,minRightSideBearing:Ee.minRightSideBearing,xMaxExtent:Ee.maxLeftSideBearing+(Ee.xMax-Ee.xMin),numberOfHMetrics:h.glyphs.length}),Qe=Re.make(h.glyphs.length),Je=Ot.make({xAvgCharWidth:Math.round(Ee.advanceWidthAvg),usWeightClass:h.tables.os2.usWeightClass,usWidthClass:h.tables.os2.usWidthClass,usFirstCharIndex:b,usLastCharIndex:ne,ulUnicodeRange1:ye,ulUnicodeRange2:we,ulUnicodeRange3:be,ulUnicodeRange4:ce,fsSelection:h.tables.os2.fsSelection,sTypoAscender:Ee.ascender,sTypoDescender:Ee.descender,sTypoLineGap:0,usWinAscent:Ee.yMax,usWinDescent:Math.abs(Ee.yMin),ulCodePageRange1:1,sxHeight:Ar(h,"xyvw",{yMax:Math.round(Ee.ascender/2)}).yMax,sCapHeight:Ar(h,"HIKLEFJMNTZBDPRAGOQSUVWXY",Ee).yMax,usDefaultChar:h.hasChar(" ")?32:0,usBreakChar:h.hasChar(" ")?32:0}),ot=De.make(h.glyphs),mt=Z.make(h.glyphs),gt=h.getEnglishName("fontFamily"),ct=h.getEnglishName("fontSubfamily"),ft=gt+" "+ct,_t=(_t=h.getEnglishName("postScriptName"))||gt.replace(/\s/g,"")+"-"+ct,Tt={};for(Te in h.names)Tt[Te]=h.names[Te];Tt.uniqueID||(Tt.uniqueID={en:h.getEnglishName("manufacturer")+":"+ft}),Tt.postScriptName||(Tt.postScriptName={en:_t}),Tt.preferredFamily||(Tt.preferredFamily=h.names.fontFamily),Tt.preferredSubfamily||(Tt.preferredSubfamily=h.names.fontSubfamily);var Ft=[],Dt=Nt.make(Tt,Ft),Ft=0<Ft.length?Xe.make(Ft):void 0,Vt=Er.make(),ft=sr.make(h.glyphs,{version:h.getEnglishName("version"),fullName:ft,familyName:gt,weightName:ct,postScriptName:_t,unitsPerEm:h.unitsPerEm,fontBBox:[0,Ee.yMin,Ee.ascender,Ee.advanceWidthMax]}),gt=h.metas&&0<Object.keys(h.metas).length?kr.make(h.metas):void 0,ct=[Ke,nt,Qe,Je,Dt,mt,Vt,ft,ot];Ft&&ct.push(Ft),h.tables.gsub&&ct.push(Mr.make(h.tables.gsub)),gt&&ct.push(gt);for(var Ut=vr((_t=Pr(ct)).encode()),bt=_t.fields,Lt=!1,vt=0;vt<bt.length;vt+=1)if(bt[vt].name==="head table"){bt[vt].value.checkSumAdjustment=2981146554-Ut,Lt=!0;break}if(Lt)return _t;throw new Error("Could not find head table with checkSum to adjust.")},computeCheckSum:vr};function br(h,b){for(var w=0,k=h.length-1;w<=k;){var I=w+k>>>1,B=h[I].tag;if(B===b)return I;B<b?w=1+I:k=I-1}return-w-1}function Lr(h,b){for(var w=0,k=h.length-1;w<=k;){var I=w+k>>>1,B=h[I];if(B===b)return I;B<b?w=1+I:k=I-1}return-w-1}function Rr(h,b){for(var w=0,k=h.length-1;w<=k;){var I,B=w+k>>>1,V=(I=h[B]).start;if(V===b)return I;V<b?w=1+B:k=B-1}if(0<w)return b>(I=h[w-1]).end?0:I}function pr(h,b){this.font=h,this.tableName=b}function mr(h){pr.call(this,h,"gpos")}function Wt(h){pr.call(this,h,"gsub")}function Ir(h,b,w){for(var k=h.subtables,I=0;I<k.length;I++){var B=k[I];if(B.substFormat===b)return B}if(w)return k.push(w),w}function Dr(h){for(var b=new ArrayBuffer(h.length),w=new Uint8Array(b),k=0;k<h.length;++k)w[k]=h[k];return b}function $t(h,b){if(!h)throw b}function Fr(h,b,w,k,I){var B=0<(b&k)?(B=h.parseByte(),w+(B=(b&I)==0?-B:B)):0<(b&I)?w:w+h.parseShort();return B}function hn(h,b,w){var k,I=new xe.Parser(b,w);if(h.numberOfContours=I.parseShort(),h._xMin=I.parseShort(),h._yMin=I.parseShort(),h._xMax=I.parseShort(),h._yMax=I.parseShort(),0<h.numberOfContours){for(var B=h.endPointIndices=[],V=0;V<h.numberOfContours;V+=1)B.push(I.parseUShort());h.instructionLength=I.parseUShort(),h.instructions=[];for(var J=0;J<h.instructionLength;J+=1)h.instructions.push(I.parseByte());for(var se=B[B.length-1]+1,ne=[],ye=0;ye<se;ye+=1)if(k=I.parseByte(),ne.push(k),0<(8&k))for(var we=I.parseByte(),be=0;be<we;be+=1)ne.push(k),ye+=1;if(j.argument(ne.length===se,"Bad flags."),0<B.length){var ce,Pe=[];if(0<se){for(var Me=0;Me<se;Me+=1)k=ne[Me],(ce={}).onCurve=!!(1&k),ce.lastPointOfContour=0<=B.indexOf(Me),Pe.push(ce);for(var Oe=0,Te=0;Te<se;Te+=1)k=ne[Te],(ce=Pe[Te]).x=Fr(I,k,Oe,2,16),Oe=ce.x;for(var Ee=0,Ke=0;Ke<se;Ke+=1)k=ne[Ke],(ce=Pe[Ke]).y=Fr(I,k,Ee,4,32),Ee=ce.y}h.points=Pe}else h.points=[]}else if(h.numberOfContours===0)h.points=[];else{h.isComposite=!0,h.points=[],h.components=[];for(var nt=!0;nt;){ne=I.parseUShort();var Qe={glyphIndex:I.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};0<(1&ne)?0<(2&ne)?(Qe.dx=I.parseShort(),Qe.dy=I.parseShort()):Qe.matchedPoints=[I.parseUShort(),I.parseUShort()]:0<(2&ne)?(Qe.dx=I.parseChar(),Qe.dy=I.parseChar()):Qe.matchedPoints=[I.parseByte(),I.parseByte()],0<(8&ne)?Qe.xScale=Qe.yScale=I.parseF2Dot14():0<(64&ne)?(Qe.xScale=I.parseF2Dot14(),Qe.yScale=I.parseF2Dot14()):0<(128&ne)&&(Qe.xScale=I.parseF2Dot14(),Qe.scale01=I.parseF2Dot14(),Qe.scale10=I.parseF2Dot14(),Qe.yScale=I.parseF2Dot14()),h.components.push(Qe),nt=!!(32&ne)}if(256&ne){h.instructionLength=I.parseUShort(),h.instructions=[];for(var Je=0;Je<h.instructionLength;Je+=1)h.instructions.push(I.parseByte())}}}function jr(h,b){for(var w=[],k=0;k<h.length;k+=1){var I=h[k],I={x:b.xScale*I.x+b.scale01*I.y+b.dx,y:b.scale10*I.x+b.yScale*I.y+b.dy,onCurve:I.onCurve,lastPointOfContour:I.lastPointOfContour};w.push(I)}return w}function Ur(h){var b=new Y;if(h)for(var w=(function(we){for(var be=[],ce=[],Pe=0;Pe<we.length;Pe+=1){var Me=we[Pe];ce.push(Me),Me.lastPointOfContour&&(be.push(ce),ce=[])}return j.argument(ce.length===0,"There are still points left in the current contour."),be})(h),k=0;k<w.length;++k){var I,B=w[k],V=B[B.length-1],J=B[0];V.onCurve?b.moveTo(V.x,V.y):J.onCurve?b.moveTo(J.x,J.y):(I={x:.5*(V.x+J.x),y:.5*(V.y+J.y)},b.moveTo(I.x,I.y));for(var se=0;se<B.length;++se){var ne,ye=V,V=J,J=B[(se+1)%B.length];V.onCurve?b.lineTo(V.x,V.y):(ne=J,ye.onCurve||(V.x,ye.x,V.y,ye.y),J.onCurve||(ne={x:.5*(V.x+J.x),y:.5*(V.y+J.y)}),b.quadraticCurveTo(V.x,V.y,ne.x,ne.y))}b.closePath()}return b}function fn(h,b){if(b.isComposite)for(var w=0;w<b.components.length;w+=1){var k=b.components[w],I=h.get(k.glyphIndex);if(I.getPath(),I.points){var B=void 0;if(k.matchedPoints===void 0)B=jr(I.points,k);else{if(k.matchedPoints[0]>b.points.length-1||k.matchedPoints[1]>I.points.length-1)throw Error("Matched points out of range in "+b.name);var V=b.points[k.matchedPoints[0]],J=I.points[k.matchedPoints[1]],k={xScale:k.xScale,scale01:k.scale01,scale10:k.scale10,yScale:k.yScale,dx:0,dy:0},J=jr([J],k)[0];k.dx=V.x-J.x,k.dy=V.y-J.y,B=jr(I.points,k)}b.points=b.points.concat(B)}}return Ur(b.points)}(mr.prototype=pr.prototype={searchTag:br,binSearch:Lr,getTable:function(h){var b=this.font.tables[this.tableName];return b=!b&&h?this.font.tables[this.tableName]=this.createDefaultTable():b},getScriptNames:function(){var h=this.getTable();return h?h.scripts.map(function(b){return b.tag}):[]},getDefaultScriptName:function(){var h=this.getTable();if(h){for(var b=!1,w=0;w<h.scripts.length;w++){var k=h.scripts[w].tag;if(k==="DFLT")return k;k==="latn"&&(b=!0)}return b?"latn":void 0}},getScriptTable:function(h,b){var w,k=this.getTable(b);if(k)return w=k.scripts,0<=(k=br(k.scripts,h=h||"DFLT"))?w[k].script:b?(w.splice(-1-k,0,b={tag:h,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}),b.script):void 0},getLangSysTable:function(I,b,w){var k,I=this.getScriptTable(I,w);if(I)return b&&b!=="dflt"&&b!=="DFLT"?0<=(k=br(I.langSysRecords,b))?I.langSysRecords[k].langSys:w?(I.langSysRecords.splice(-1-k,0,w={tag:b,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}}),w.langSys):void 0:I.defaultLangSys},getFeatureTable:function(h,b,w,k){if(h=this.getLangSysTable(h,b,k),h){for(var I,B=h.featureIndexes,V=this.font.tables[this.tableName].features,J=0;J<B.length;J++)if((I=V[B[J]]).tag===w)return I.feature;if(k)return b=V.length,j.assert(b===0||w>=V[b-1].tag,"Features must be added in alphabetical order."),V.push(I={tag:w,feature:{params:0,lookupListIndexes:[]}}),B.push(b),I.feature}},getLookupTables:function(B,b,w,k,I){var B=this.getFeatureTable(B,b,w,I),V=[];if(B){for(var J,se=B.lookupListIndexes,ne=this.font.tables[this.tableName].lookups,ye=0;ye<se.length;ye++)(J=ne[se[ye]]).lookupType===k&&V.push(J);if(V.length===0&&I)return b=ne.length,ne.push(J={lookupType:k,lookupFlag:0,subtables:[],markFilteringSet:void 0}),se.push(b),[J]}return V},getGlyphClass:function(h,b){switch(h.format){case 1:return h.startGlyph<=b&&b<h.startGlyph+h.classes.length?h.classes[b-h.startGlyph]:0;case 2:var w=Rr(h.ranges,b);return w?w.classId:0}},getCoverageIndex:function(h,b){switch(h.format){case 1:var w=Lr(h.glyphs,b);return 0<=w?w:-1;case 2:return w=Rr(h.ranges,b),w?w.index+b-w.start:-1}},expandCoverage:function(h){if(h.format===1)return h.glyphs;for(var b=[],w=h.ranges,k=0;k<w.length;k++)for(var I=w[k],B=I.start,V=I.end,J=B;J<=V;J++)b.push(J);return b}}).init=function(){var h=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(h)},mr.prototype.getKerningValue=function(h,b,w){for(var k=0;k<h.length;k++)for(var I=h[k].subtables,B=0;B<I.length;B++){var V=I[B],J=this.getCoverageIndex(V.coverage,b);if(!(J<0))switch(V.posFormat){case 1:for(var se=V.pairSets[J],ne=0;ne<se.length;ne++){var ye=se[ne];if(ye.secondGlyph===w)return ye.value1&&ye.value1.xAdvance||0}break;case 2:var be=this.getGlyphClass(V.classDef1,b),we=this.getGlyphClass(V.classDef2,w),be=V.classRecords[be][we];return be.value1&&be.value1.xAdvance||0}}return 0},mr.prototype.getKerningTables=function(h,b){if(this.font.tables.gpos)return this.getLookupTables(h,b,"kern",2)},(Wt.prototype=pr.prototype).createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Wt.prototype.getSingle=function(h,b,w){for(var k=[],I=this.getLookupTables(b,w,h,1),B=0;B<I.length;B++)for(var V=I[B].subtables,J=0;J<V.length;J++){var se=V[J],ne=this.expandCoverage(se.coverage),ye=void 0;if(se.substFormat===1)for(var we=se.deltaGlyphId,ye=0;ye<ne.length;ye++){var be=ne[ye];k.push({sub:be,by:be+we})}else{var ce=se.substitute;for(ye=0;ye<ne.length;ye++)k.push({sub:ne[ye],by:ce[ye]})}}return k},Wt.prototype.getAlternates=function(h,b,w){for(var k=[],I=this.getLookupTables(b,w,h,3),B=0;B<I.length;B++)for(var V=I[B].subtables,J=0;J<V.length;J++)for(var se=V[J],ne=this.expandCoverage(se.coverage),ye=se.alternateSets,we=0;we<ne.length;we++)k.push({sub:ne[we],by:ye[we]});return k},Wt.prototype.getLigatures=function(h,b,w){for(var k=[],I=this.getLookupTables(b,w,h,4),B=0;B<I.length;B++)for(var V=I[B].subtables,J=0;J<V.length;J++)for(var se=V[J],ne=this.expandCoverage(se.coverage),ye=se.ligatureSets,we=0;we<ne.length;we++)for(var be=ne[we],ce=ye[we],Pe=0;Pe<ce.length;Pe++){var Me=ce[Pe];k.push({sub:[be].concat(Me.components),by:Me.ligGlyph})}return k},Wt.prototype.addSingle=function(h,b,w,k){w=Ir(this.getLookupTables(w,k,h,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]}),j.assert(w.coverage.format===1,"Ligature: unable to modify coverage table format "+w.coverage.format),k=b.sub,h=this.binSearch(w.coverage.glyphs,k),h<0&&(w.coverage.glyphs.splice(h=-1-h,0,k),w.substitute.splice(h,0,0)),w.substitute[h]=b.by},Wt.prototype.addAlternate=function(h,b,w,k){w=Ir(this.getLookupTables(w,k,h,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]}),j.assert(w.coverage.format===1,"Ligature: unable to modify coverage table format "+w.coverage.format),k=b.sub,h=this.binSearch(w.coverage.glyphs,k),h<0&&(w.coverage.glyphs.splice(h=-1-h,0,k),w.alternateSets.splice(h,0,0)),w.alternateSets[h]=b.by},Wt.prototype.addLigature=function(B,se,J,I){var J=this.getLookupTables(J,I,B,4,!0)[0],I=J.subtables[0],B=(I||(J.subtables[0]=I={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]}),j.assert(I.coverage.format===1,"Ligature: unable to modify coverage table format "+I.coverage.format),se.sub[0]),V=se.sub.slice(1),J={ligGlyph:se.by,components:V},se=this.binSearch(I.coverage.glyphs,B);if(0<=se){for(var ne=I.ligatureSets[se],ye=0;ye<ne.length;ye++)if((function(we,be){var ce=we.length;if(ce===be.length){for(var Pe=0;Pe<ce;Pe++)if(we[Pe]!==be[Pe])return;return 1}})(ne[ye].components,V))return;ne.push(J)}else I.coverage.glyphs.splice(se=-1-se,0,B),I.ligatureSets.splice(se,0,[J])},Wt.prototype.getFeature=function(h,b,w){if(/ss\d\d/.test(h))return this.getSingle(h,b,w);switch(h){case"aalt":case"salt":return this.getSingle(h,b,w).concat(this.getAlternates(h,b,w));case"dlig":case"liga":case"rlig":return this.getLigatures(h,b,w)}},Wt.prototype.add=function(h,b,w,k){if(/ss\d\d/.test(h))return this.addSingle(h,b,w,k);switch(h){case"aalt":case"salt":return typeof b.by=="number"?this.addSingle(h,b,w,k):this.addAlternate(h,b,w,k);case"dlig":case"liga":case"rlig":return this.addLigature(h,b,w,k)}};var Nr={getPath:Ur,parse:function(h,b,w,k){for(var I=new Ye.GlyphSet(k),B=0;B<w.length-1;B+=1){var V=w[B];V!==w[B+1]?I.push(B,Ye.ttfGlyphLoader(k,B,hn,h,b+V,fn)):I.push(B,Ye.glyphLoader(k,B))}return I}};function Br(h){this.font=h,this.getCommands=function(b){return Nr.getPath(b).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function pn(h){return h}function Gr(h){return Math.sign(h)*Math.round(Math.abs(h))}function mn(h){return Math.sign(h)*Math.round(Math.abs(2*h))/2}function yn(h){return Math.sign(h)*(Math.round(Math.abs(h)+.5)-.5)}function gn(h){return Math.sign(h)*Math.ceil(Math.abs(h))}function vn(h){return Math.sign(h)*Math.floor(Math.abs(h))}function Vr(h){var b=this.srPeriod,w=this.srPhase,k=1;return h<0&&(h=-h,k=-1),h+=this.srThreshold-w,h=Math.trunc(h/b)*b,(h+=w)<0?w*k:h*k}var qt={x:1,y:0,axis:"x",distance:function(h,b,w,k){return(w?h.xo:h.x)-(k?b.xo:b.x)},interpolate:function(h,b,w,k){var I,B,V,J,se,ne,ye;if(!k||k===this)return I=h.xo-b.xo,B=h.xo-w.xo,se=b.x-b.xo,ne=w.x-w.xo,(ye=(V=Math.abs(I))+(J=Math.abs(B)))===0?void(h.x=h.xo+(se+ne)/2):void(h.x=h.xo+(se*J+ne*V)/ye);I=k.distance(h,b,!0,!0),B=k.distance(h,w,!0,!0),se=k.distance(b,b,!1,!0),ne=k.distance(w,w,!1,!0),(ye=(V=Math.abs(I))+(J=Math.abs(B)))===0?qt.setRelative(h,h,(se+ne)/2,k,!0):qt.setRelative(h,h,(se*J+ne*V)/ye,k,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(h,b,w,k,I){var B,V;k&&k!==this?(B=I?b.xo:b.x,V=I?b.yo:b.y,B+=w*k.x,V+=w*k.y,h.x=B+(h.y-V)/k.normalSlope):h.x=(I?b.xo:b.x)+w},slope:0,touch:function(h){h.xTouched=!0},touched:function(h){return h.xTouched},untouch:function(h){h.xTouched=!1}},Xt={x:0,y:1,axis:"y",distance:function(h,b,w,k){return(w?h.yo:h.y)-(k?b.yo:b.y)},interpolate:function(h,b,w,k){var I,B,V,J,se,ne,ye;if(!k||k===this)return I=h.yo-b.yo,B=h.yo-w.yo,se=b.y-b.yo,ne=w.y-w.yo,(ye=(V=Math.abs(I))+(J=Math.abs(B)))===0?void(h.y=h.yo+(se+ne)/2):void(h.y=h.yo+(se*J+ne*V)/ye);I=k.distance(h,b,!0,!0),B=k.distance(h,w,!0,!0),se=k.distance(b,b,!1,!0),ne=k.distance(w,w,!1,!0),(ye=(V=Math.abs(I))+(J=Math.abs(B)))===0?Xt.setRelative(h,h,(se+ne)/2,k,!0):Xt.setRelative(h,h,(se*J+ne*V)/ye,k,!0)},normalSlope:0,setRelative:function(h,b,w,k,I){var B,V;k&&k!==this?(B=I?b.xo:b.x,V=I?b.yo:b.y,B+=w*k.x,V+=w*k.y,h.y=V+k.normalSlope*(h.x-B)):h.y=(I?b.yo:b.y)+w},slope:Number.POSITIVE_INFINITY,touch:function(h){h.yTouched=!0},touched:function(h){return h.yTouched},untouch:function(h){h.yTouched=!1}};function ar(h,b){this.x=h,this.y=b,this.axis=void 0,this.slope=b/h,this.normalSlope=-h/b,Object.freeze(this)}function lr(h,b){var w=Math.sqrt(h*h+b*b);return b/=w,(h/=w)===1&&b===0?qt:h===0&&b===1?Xt:new ar(h,b)}function Yt(h,b,w,k){this.x=this.xo=Math.round(64*h)/64,this.y=this.yo=Math.round(64*b)/64,this.lastPointOfContour=w,this.onCurve=k,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(qt),Object.freeze(Xt),ar.prototype.distance=function(h,b,w,k){return this.x*qt.distance(h,b,w,k)+this.y*Xt.distance(h,b,w,k)},ar.prototype.interpolate=function(h,I,B,k){var V=k.distance(h,I,!0,!0),J=k.distance(h,B,!0,!0),I=k.distance(I,I,!1,!0),B=k.distance(B,B,!1,!0),V=Math.abs(V),J=Math.abs(J),se=V+J;se===0?this.setRelative(h,h,(I+B)/2,k,!0):this.setRelative(h,h,(I*J+B*V)/se,k,!0)},ar.prototype.setRelative=function(h,B,se,ne,J){var V=J?B.xo:B.x,J=J?B.yo:B.y,B=V+se*(ne=ne||this).x,V=J+se*ne.y,J=ne.normalSlope,se=this.slope,ne=h.x,ye=h.y;h.x=(se*ne-J*B+V-ye)/(se-J),h.y=se*(h.x-ne)+ye},ar.prototype.touch=function(h){h.xTouched=!0,h.yTouched=!0},Yt.prototype.nextTouched=function(h){for(var b=this.nextPointOnContour;!h.touched(b)&&b!==this;)b=b.nextPointOnContour;return b},Yt.prototype.prevTouched=function(h){for(var b=this.prevPointOnContour;!h.touched(b)&&b!==this;)b=b.prevPointOnContour;return b};var ur=Object.freeze(new Yt(0,0)),bn={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function Zt(h,b){switch(this.env=h,this.stack=[],this.prog=b,h){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=qt,this.round=Gr}}function yr(h){for(var b=h.tZone=new Array(h.gZone.length),w=0;w<b.length;w++)b[w]=new Yt(0,0)}function zr(h,b){var w,k=h.prog,I=h.ip,B=1;do if((w=k[++I])===88)B++;else if(w===89)B--;else if(w===64)I+=k[I+1]+1;else if(w===65)I+=2*k[I+1]+1;else if(176<=w&&w<=183)I+=w-176+1;else if(184<=w&&w<=191)I+=2*(w-184+1);else if(b&&B===1&&w===27)break;while(0<B);h.ip=I}function Hr(h,b){f.DEBUG&&console.log(b.step,"SVTCA["+h.axis+"]"),b.fv=b.pv=b.dpv=h}function Wr(h,b){f.DEBUG&&console.log(b.step,"SPVTCA["+h.axis+"]"),b.pv=b.dpv=h}function qr(h,b){f.DEBUG&&console.log(b.step,"SFVTCA["+h.axis+"]"),b.fv=h}function Xr(h,b){var w,I=b.stack,k=I.pop(),I=I.pop(),B=b.z2[k],V=b.z1[I];f.DEBUG&&console.log("SPVTL["+h+"]",k,I),k=h?(w=B.y-V.y,V.x-B.x):(w=V.x-B.x,V.y-B.y),b.pv=b.dpv=lr(w,k)}function Yr(h,b){var w,I=b.stack,k=I.pop(),I=I.pop(),B=b.z2[k],V=b.z1[I];f.DEBUG&&console.log("SFVTL["+h+"]",k,I),k=h?(w=B.y-V.y,V.x-B.x):(w=V.x-B.x,V.y-B.y),b.fv=lr(w,k)}function _r(h){f.DEBUG&&console.log(h.step,"POP[]"),h.stack.pop()}function Zr(h,b){var w=b.stack.pop(),k=b.z0[w],I=b.fv,B=b.pv,V=(f.DEBUG&&console.log(b.step,"MDAP["+h+"]",w),B.distance(k,ur));h&&(V=b.round(V)),I.setRelative(k,ur,V,B),I.touch(k),b.rp0=b.rp1=w}function Kr(h,b){var w,k,I,B=b.z2,V=B.length-2;f.DEBUG&&console.log(b.step,"IUP["+h.axis+"]");for(var J=0;J<V;J++)w=B[J],h.touched(w)||(k=w.prevTouched(h))!==w&&(k===(I=w.nextTouched(h))&&h.setRelative(w,w,h.distance(k,k,!1,!0),h,!0),h.interpolate(w,k,I,h))}function Qr(h,b){for(var w=b.stack,k=h?b.rp1:b.rp2,I=(h?b.z0:b.z1)[k],B=b.fv,V=b.pv,J=b.loop,se=b.z2;J--;){var ne=w.pop(),ye=se[ne],we=V.distance(I,I,!1,!0);B.setRelative(ye,ye,we,V),B.touch(ye),f.DEBUG&&console.log(b.step,(1<b.loop?"loop "+(b.loop-J)+": ":"")+"SHP["+(h?"rp1":"rp2")+"]",ne)}b.loop=1}function Jr(h,b){for(var w=b.stack,V=h?b.rp1:b.rp2,k=(h?b.z0:b.z1)[V],I=b.fv,B=b.pv,V=w.pop(),J=b.z2[b.contours[V]],se=J,ne=(f.DEBUG&&console.log(b.step,"SHC["+h+"]",V),B.distance(k,k,!1,!0));se!==k&&I.setRelative(se,se,ne,B),(se=se.nextPointOnContour)!==J;);}function $r(h,b){var w,k,J=b.stack,I=h?b.rp1:b.rp2,I=(h?b.z0:b.z1)[I],B=b.fv,V=b.pv,J=J.pop();switch(f.DEBUG&&console.log(b.step,"SHZ["+h+"]",J),J){case 0:w=b.tZone;break;case 1:w=b.gZone;break;default:throw new Error("Invalid zone")}for(var se=V.distance(I,I,!1,!0),ne=w.length-2,ye=0;ye<ne;ye++)k=w[ye],B.setRelative(k,k,se,V)}function en(h,b){var k=b.stack,w=k.pop()/64,k=k.pop(),I=b.z1[k],B=b.z0[b.rp0],V=b.fv,J=b.pv;V.setRelative(I,B,w,J),V.touch(I),f.DEBUG&&console.log(b.step,"MSIRP["+h+"]",w,k),b.rp1=b.rp0,b.rp2=k,h&&(b.rp0=k)}function tn(h,b){var w=b.stack,J=w.pop(),w=w.pop(),k=b.z0[w],I=b.fv,B=b.pv,V=b.cvt[J],J=(f.DEBUG&&console.log(b.step,"MIAP["+h+"]",J,"(",V,")",w),B.distance(k,ur));h&&(Math.abs(J-V)<b.cvCutIn&&(J=V),J=b.round(J)),I.setRelative(k,ur,J,B),b.zp0===0&&(k.xo=k.x,k.yo=k.y),I.touch(k),b.rp0=b.rp1=w}function rn(h,b){var w=b.stack,k=w.pop(),I=b.z2[k];f.DEBUG&&console.log(b.step,"GC["+h+"]",k),w.push(64*b.dpv.distance(I,ur,h,!1))}function nn(h,b){var k=b.stack,w=k.pop(),k=k.pop(),I=b.z1[w],B=b.z0[k],B=b.dpv.distance(B,I,h,h);f.DEBUG&&console.log(b.step,"MD["+h+"]",w,k,"->",B),b.stack.push(Math.round(64*B))}function xr(h,b){var w=b.stack,k=w.pop(),I=b.fv,B=b.pv,V=b.ppem,J=b.deltaBase+16*(h-1),se=b.deltaShift,ne=b.z0;f.DEBUG&&console.log(b.step,"DELTAP["+h+"]",k,w);for(var ye=0;ye<k;ye++){var we=w.pop(),be=w.pop();J+((240&be)>>4)===V&&(0<=(be=(15&be)-8)&&be++,f.DEBUG&&console.log(b.step,"DELTAPFIX",we,"by",be*se),we=ne[we],I.setRelative(we,we,be*se,B))}}function gr(h,b){var w=b.stack,k=w.pop();f.DEBUG&&console.log(b.step,"ROUND[]"),w.push(64*b.round(k/64))}function wr(h,b){var w=b.stack,k=w.pop(),I=b.ppem,B=b.deltaBase+16*(h-1),V=b.deltaShift;f.DEBUG&&console.log(b.step,"DELTAC["+h+"]",k,w);for(var J=0;J<k;J++){var se=w.pop(),ne=w.pop();B+((240&ne)>>4)===I&&(0<=(ne=(15&ne)-8)&&ne++,ne=ne*V,f.DEBUG&&console.log(b.step,"DELTACFIX",se,"by",ne),b.cvt[se]+=ne)}}function on(h,b){var w,I=b.stack,k=I.pop(),I=I.pop(),B=b.z2[k],V=b.z1[I];f.DEBUG&&console.log(b.step,"SDPVTL["+h+"]",k,I),k=h?(w=B.y-V.y,V.x-B.x):(w=V.x-B.x,V.y-B.y),b.dpv=lr(w,k)}function Kt(h,b){var w=b.stack,k=b.prog,I=b.ip;f.DEBUG&&console.log(b.step,"PUSHB["+h+"]");for(var B=0;B<h;B++)w.push(k[++I]);b.ip=I}function Qt(h,b){var w=b.ip,k=b.prog,I=b.stack;f.DEBUG&&console.log(b.ip,"PUSHW["+h+"]");for(var B=0;B<h;B++){var V=k[++w]<<8|k[++w];32768&V&&(V=-(1+(65535^V))),I.push(V)}b.ip=w}function Ze(h,b,w,k,I,B){var V,J,ne=B.stack,se=h&&ne.pop(),ne=ne.pop(),ye=B.rp0,ye=B.z0[ye],we=B.z1[ne],be=B.minDis,ce=B.fv,Pe=B.dpv,Me=V=Pe.distance(we,ye,!0,!0),Oe=0<=Me?1:-1;Me=Math.abs(Me),h&&(J=B.cvt[se],k&&Math.abs(Me-J)<B.cvCutIn&&(Me=J)),w&&Me<be&&(Me=be),k&&(Me=B.round(Me)),ce.setRelative(we,ye,Oe*Me,Pe),ce.touch(we),f.DEBUG&&console.log(B.step,(h?"MIRP[":"MDRP[")+(b?"M":"m")+(w?">":"_")+(k?"R":"_")+(I===0?"Gr":I===1?"Bl":I===2?"Wh":"")+"]",h?se+"("+B.cvt[se]+","+J+")":"",ne,"(d =",V,"->",Oe*Me,")"),B.rp1=B.rp0,B.rp2=ne,b&&(B.rp0=ne)}Br.prototype.exec=function(h,b){if(typeof b!="number")throw new Error("Point size is not a number!");if(!(2<this._errorState)){var w=this.font,k=this._prepState;if(!k||k.ppem!==b){var I=this._fpgmState;if(!I){Zt.prototype=bn,(I=this._fpgmState=new Zt("fpgm",w.tables.fpgm)).funcs=[],I.font=w,f.DEBUG&&(console.log("---EXEC FPGM---"),I.step=-1);try{er(I)}catch(ne){return console.log("Hinting error in FPGM:"+ne),void(this._errorState=3)}}Zt.prototype=I,(k=this._prepState=new Zt("prep",w.tables.prep)).ppem=b;var B=w.tables.cvt;if(B)for(var V=k.cvt=new Array(B.length),J=b/w.unitsPerEm,se=0;se<B.length;se++)V[se]=B[se]*J;else k.cvt=[];f.DEBUG&&(console.log("---EXEC PREP---"),k.step=-1);try{er(k)}catch(ne){this._errorState<2&&console.log("Hinting error in PREP:"+ne),this._errorState=2}}if(!(1<this._errorState))try{return jn(h,k)}catch(ne){this._errorState<1&&(console.log("Hinting error:"+ne),console.log("Note: further hinting errors are silenced")),this._errorState=1}}};var jn=function(h,b){var w=b.ppem/b.font.unitsPerEm,k=w,I=h.components;if(Zt.prototype=b,I){for(var B=b.font,V=[],J=[],se=0;se<I.length;se++){var ne=I[se],ye=B.glyphs.get(ne.glyphIndex),we=new Zt("glyf",ye.instructions);f.DEBUG&&(console.log("---EXEC COMP "+se+"---"),we.step=-1),sn(ye,we,w,k);for(var be=Math.round(ne.dx*w),ce=Math.round(ne.dy*k),Pe=we.gZone,Me=we.contours,Oe=0;Oe<Pe.length;Oe++){var Te=Pe[Oe];Te.xTouched=Te.yTouched=!1,Te.xo=Te.x=Te.x+be,Te.yo=Te.y=Te.y+ce}var Ee=V.length;V.push.apply(V,Pe);for(var Ke=0;Ke<Me.length;Ke++)J.push(Me[Ke]+Ee)}h.instructions&&!we.inhibitGridFit&&((we=new Zt("glyf",h.instructions)).gZone=we.z0=we.z1=we.z2=V,we.contours=J,V.push(new Yt(0,0),new Yt(Math.round(h.advanceWidth*w),0)),f.DEBUG&&(console.log("---EXEC COMPOSITE---"),we.step=-1),er(we),V.length-=2)}else we=new Zt("glyf",h.instructions),f.DEBUG&&(console.log("---EXEC GLYPH---"),we.step=-1),sn(h,we,w,k),V=we.gZone;return V},sn=function(h,b,w,k){for(var I,B,V,J=h.points||[],se=J.length,ne=b.gZone=b.z0=b.z1=b.z2=[],ye=b.contours=[],we=0;we<se;we++)I=J[we],ne[we]=new Yt(I.x*w,I.y*k,I.lastPointOfContour,I.onCurve);for(var be=0;be<se;be++)I=ne[be],B||(B=I,ye.push(be)),I.lastPointOfContour?((I.nextPointOnContour=B).prevPointOnContour=I,B=void 0):(V=ne[be+1],(I.nextPointOnContour=V).prevPointOnContour=I);if(!b.inhibitGridFit){if(f.DEBUG){console.log("PROCESSING GLYPH",b.stack);for(var ce=0;ce<se;ce++)console.log(ce,ne[ce].x,ne[ce].y)}if(ne.push(new Yt(0,0),new Yt(Math.round(h.advanceWidth*w),0)),er(b),ne.length-=2,f.DEBUG){console.log("FINISHED GLYPH",b.stack);for(var Pe=0;Pe<se;Pe++)console.log(Pe,ne[Pe].x,ne[Pe].y)}}},er=function(h){var b=h.prog;if(b){var w,k=b.length;for(h.ip=0;h.ip<k;h.ip++){if(f.DEBUG&&h.step++,!(w=_n[b[h.ip]]))throw new Error("unknown instruction: 0x"+Number(b[h.ip]).toString(16));w(h)}}},_n=[Hr.bind(void 0,Xt),Hr.bind(void 0,qt),Wr.bind(void 0,Xt),Wr.bind(void 0,qt),qr.bind(void 0,Xt),qr.bind(void 0,qt),Xr.bind(void 0,0),Xr.bind(void 0,1),Yr.bind(void 0,0),Yr.bind(void 0,1),function(h){var b=(w=h.stack).pop(),w=w.pop();f.DEBUG&&console.log(h.step,"SPVFS[]",b,w),h.pv=h.dpv=lr(w,b)},function(h){var b=(w=h.stack).pop(),w=w.pop();f.DEBUG&&console.log(h.step,"SPVFS[]",b,w),h.fv=lr(w,b)},function(h){var b=h.stack,w=h.pv;f.DEBUG&&console.log(h.step,"GPV[]"),b.push(16384*w.x),b.push(16384*w.y)},function(h){var b=h.stack,w=h.fv;f.DEBUG&&console.log(h.step,"GFV[]"),b.push(16384*w.x),b.push(16384*w.y)},function(h){h.fv=h.pv,f.DEBUG&&console.log(h.step,"SFVTPV[]")},function(b){var w=(V=b.stack).pop(),k=V.pop(),I=V.pop(),B=V.pop(),V=V.pop(),se=b.z0,ye=b.z1,J=se[w],se=se[k],ne=ye[I],ye=ye[B],b=b.z2[V],w=(f.DEBUG&&console.log("ISECT[], ",w,k,I,B,V),J.x),k=J.y,I=se.x,B=se.y,V=ne.x,J=ne.y,se=ye.x,ne=ye.y,ye=(w-I)*(J-ne)-(k-B)*(V-se),we=w*B-k*I,be=V*ne-J*se;b.x=(we*(V-se)-be*(w-I))/ye,b.y=(we*(J-ne)-be*(k-B))/ye},function(h){h.rp0=h.stack.pop(),f.DEBUG&&console.log(h.step,"SRP0[]",h.rp0)},function(h){h.rp1=h.stack.pop(),f.DEBUG&&console.log(h.step,"SRP1[]",h.rp1)},function(h){h.rp2=h.stack.pop(),f.DEBUG&&console.log(h.step,"SRP2[]",h.rp2)},function(h){var b=h.stack.pop();switch(f.DEBUG&&console.log(h.step,"SZP0[]",b),h.zp0=b){case 0:h.tZone||yr(h),h.z0=h.tZone;break;case 1:h.z0=h.gZone;break;default:throw new Error("Invalid zone pointer")}},function(h){var b=h.stack.pop();switch(f.DEBUG&&console.log(h.step,"SZP1[]",b),h.zp1=b){case 0:h.tZone||yr(h),h.z1=h.tZone;break;case 1:h.z1=h.gZone;break;default:throw new Error("Invalid zone pointer")}},function(h){var b=h.stack.pop();switch(f.DEBUG&&console.log(h.step,"SZP2[]",b),h.zp2=b){case 0:h.tZone||yr(h),h.z2=h.tZone;break;case 1:h.z2=h.gZone;break;default:throw new Error("Invalid zone pointer")}},function(h){var b=h.stack.pop();switch(f.DEBUG&&console.log(h.step,"SZPS[]",b),h.zp0=h.zp1=h.zp2=b){case 0:h.tZone||yr(h),h.z0=h.z1=h.z2=h.tZone;break;case 1:h.z0=h.z1=h.z2=h.gZone;break;default:throw new Error("Invalid zone pointer")}},function(h){h.loop=h.stack.pop(),f.DEBUG&&console.log(h.step,"SLOOP[]",h.loop)},function(h){f.DEBUG&&console.log(h.step,"RTG[]"),h.round=Gr},function(h){f.DEBUG&&console.log(h.step,"RTHG[]"),h.round=yn},function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"SMD[]",b),h.minDis=b/64},function(h){f.DEBUG&&console.log(h.step,"ELSE[]"),zr(h,!1)},function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"JMPR[]",b),h.ip+=b-1},function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"SCVTCI[]",b),h.cvCutIn=b/64},void 0,void 0,function(h){var b=h.stack;f.DEBUG&&console.log(h.step,"DUP[]"),b.push(b[b.length-1])},_r,function(h){f.DEBUG&&console.log(h.step,"CLEAR[]"),h.stack.length=0},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"SWAP[]"),b.push(w),b.push(k)},function(h){var b=h.stack;f.DEBUG&&console.log(h.step,"DEPTH[]"),b.push(b.length)},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"CINDEX[]",w),b.push(b[b.length-w])},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"MINDEX[]",w),b.push(b.splice(b.length-w,1)[0])},void 0,void 0,void 0,function(h){var b=(k=h.stack).pop(),w=k.pop(),k=(f.DEBUG&&console.log(h.step,"LOOPCALL[]",b,w),h.ip),I=h.prog;h.prog=h.funcs[b];for(var B=0;B<w;B++)er(h),f.DEBUG&&console.log(++h.step,B+1<w?"next loopcall":"done loopcall",B);h.ip=k,h.prog=I},function(h){var b=h.stack.pop(),w=(f.DEBUG&&console.log(h.step,"CALL[]",b),h.ip),k=h.prog;h.prog=h.funcs[b],er(h),h.ip=w,h.prog=k,f.DEBUG&&console.log(++h.step,"returning from",b)},function(h){if(h.env!=="fpgm")throw new Error("FDEF not allowed here");var k=h.stack,b=h.prog,w=h.ip,k=k.pop(),I=w;for(f.DEBUG&&console.log(h.step,"FDEF[]",k);b[++w]!==45;);h.ip=w,h.funcs[k]=b.slice(I+1,w)},void 0,Zr.bind(void 0,0),Zr.bind(void 0,1),Kr.bind(void 0,Xt),Kr.bind(void 0,qt),Qr.bind(void 0,0),Qr.bind(void 0,1),Jr.bind(void 0,0),Jr.bind(void 0,1),$r.bind(void 0,0),$r.bind(void 0,1),function(h){for(var b=h.stack,w=h.loop,k=h.fv,I=b.pop()/64,B=h.z2;w--;){var V=b.pop(),J=B[V];f.DEBUG&&console.log(h.step,(1<h.loop?"loop "+(h.loop-w)+": ":"")+"SHPIX[]",V,I),k.setRelative(J,J,I),k.touch(J)}h.loop=1},function(h){for(var b=h.stack,w=h.rp1,k=h.rp2,I=h.loop,B=h.z0[w],V=h.z1[k],J=h.fv,se=h.dpv,ne=h.z2;I--;){var ye=b.pop(),we=ne[ye];f.DEBUG&&console.log(h.step,(1<h.loop?"loop "+(h.loop-I)+": ":"")+"IP[]",ye,w,"<->",k),J.interpolate(we,B,V,se),J.touch(we)}h.loop=1},en.bind(void 0,0),en.bind(void 0,1),function(h){for(var b=h.stack,w=h.rp0,k=h.z0[w],I=h.loop,B=h.fv,V=h.pv,J=h.z1;I--;){var se=b.pop(),ne=J[se];f.DEBUG&&console.log(h.step,(1<h.loop?"loop "+(h.loop-I)+": ":"")+"ALIGNRP[]",se),B.setRelative(ne,k,0,V),B.touch(ne)}h.loop=1},function(h){f.DEBUG&&console.log(h.step,"RTDG[]"),h.round=mn},tn.bind(void 0,0),tn.bind(void 0,1),function(h){var b=h.prog,w=h.ip,k=h.stack,I=b[++w];f.DEBUG&&console.log(h.step,"NPUSHB[]",I);for(var B=0;B<I;B++)k.push(b[++w]);h.ip=w},function(h){var b=h.ip,w=h.prog,k=h.stack,I=w[++b];f.DEBUG&&console.log(h.step,"NPUSHW[]",I);for(var B=0;B<I;B++){var V=w[++b]<<8|w[++b];32768&V&&(V=-(1+(65535^V))),k.push(V)}h.ip=b},function(h){var k=h.stack,b=(b=h.store)||(h.store=[]),w=k.pop(),k=k.pop();f.DEBUG&&console.log(h.step,"WS",w,k),b[k]=w},function(I){var b=I.stack,w=I.store,k=b.pop(),I=(f.DEBUG&&console.log(I.step,"RS",k),w&&w[k]||0);b.push(I)},function(h){var b=(w=h.stack).pop(),w=w.pop();f.DEBUG&&console.log(h.step,"WCVTP",b,w),h.cvt[w]=b/64},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"RCVT",w),b.push(64*h.cvt[w])},rn.bind(void 0,0),rn.bind(void 0,1),void 0,nn.bind(void 0,0),nn.bind(void 0,1),function(h){f.DEBUG&&console.log(h.step,"MPPEM[]"),h.stack.push(h.ppem)},void 0,function(h){f.DEBUG&&console.log(h.step,"FLIPON[]"),h.autoFlip=!0},void 0,void 0,function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"LT[]",w,k),b.push(k<w?1:0)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"LTEQ[]",w,k),b.push(k<=w?1:0)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"GT[]",w,k),b.push(w<k?1:0)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"GTEQ[]",w,k),b.push(w<=k?1:0)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"EQ[]",w,k),b.push(w===k?1:0)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"NEQ[]",w,k),b.push(w!==k?1:0)},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"ODD[]",w),b.push(Math.trunc(w)%2?1:0)},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"EVEN[]",w),b.push(Math.trunc(w)%2?0:1)},function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"IF[]",b),b||(zr(h,!0),f.DEBUG&&console.log(h.step,"EIF[]"))},function(h){f.DEBUG&&console.log(h.step,"EIF[]")},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"AND[]",w,k),b.push(w&&k?1:0)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"OR[]",w,k),b.push(w||k?1:0)},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"NOT[]",w),b.push(w?0:1)},xr.bind(void 0,1),function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"SDB[]",b),h.deltaBase=b},function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"SDS[]",b),h.deltaShift=Math.pow(.5,b)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"ADD[]",w,k),b.push(k+w)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"SUB[]",w,k),b.push(k-w)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"DIV[]",w,k),b.push(64*k/w)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"MUL[]",w,k),b.push(k*w/64)},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"ABS[]",w),b.push(Math.abs(w))},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"NEG[]",w),b.push(-w)},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"FLOOR[]",w),b.push(64*Math.floor(w/64))},function(h){var b=h.stack,w=b.pop();f.DEBUG&&console.log(h.step,"CEILING[]",w),b.push(64*Math.ceil(w/64))},gr.bind(void 0,0),gr.bind(void 0,1),gr.bind(void 0,2),gr.bind(void 0,3),void 0,void 0,void 0,void 0,function(h){var b=(w=h.stack).pop(),w=w.pop();f.DEBUG&&console.log(h.step,"WCVTF[]",b,w),h.cvt[w]=b*h.ppem/h.font.unitsPerEm},xr.bind(void 0,2),xr.bind(void 0,3),wr.bind(void 0,1),wr.bind(void 0,2),wr.bind(void 0,3),function(h){var b,w=h.stack.pop();switch(f.DEBUG&&console.log(h.step,"SROUND[]",w),h.round=Vr,192&w){case 0:b=.5;break;case 64:b=1;break;case 128:b=2;break;default:throw new Error("invalid SROUND value")}switch(h.srPeriod=b,48&w){case 0:h.srPhase=0;break;case 16:h.srPhase=.25*b;break;case 32:h.srPhase=.5*b;break;case 48:h.srPhase=.75*b;break;default:throw new Error("invalid SROUND value")}h.srThreshold=(w&=15)===0?0:(w/8-.5)*b},function(h){var b,w=h.stack.pop();switch(f.DEBUG&&console.log(h.step,"S45ROUND[]",w),h.round=Vr,192&w){case 0:b=Math.sqrt(2)/2;break;case 64:b=Math.sqrt(2);break;case 128:b=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(h.srPeriod=b,48&w){case 0:h.srPhase=0;break;case 16:h.srPhase=.25*b;break;case 32:h.srPhase=.5*b;break;case 48:h.srPhase=.75*b;break;default:throw new Error("invalid S45ROUND value")}h.srThreshold=(w&=15)===0?0:(w/8-.5)*b},void 0,void 0,function(h){f.DEBUG&&console.log(h.step,"ROFF[]"),h.round=pn},void 0,function(h){f.DEBUG&&console.log(h.step,"RUTG[]"),h.round=gn},function(h){f.DEBUG&&console.log(h.step,"RDTG[]"),h.round=vn},_r,_r,void 0,void 0,void 0,void 0,void 0,function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"SCANCTRL[]",b)},on.bind(void 0,0),on.bind(void 0,1),function(h){var b=h.stack,w=b.pop(),k=0;f.DEBUG&&console.log(h.step,"GETINFO[]",w),1&w&&(k=35),32&w&&(k|=4096),b.push(k)},void 0,function(h){var b=h.stack,w=b.pop(),k=b.pop(),I=b.pop();f.DEBUG&&console.log(h.step,"ROLL[]"),b.push(k),b.push(w),b.push(I)},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"MAX[]",w,k),b.push(Math.max(k,w))},function(h){var b=h.stack,w=b.pop(),k=b.pop();f.DEBUG&&console.log(h.step,"MIN[]",w,k),b.push(Math.min(k,w))},function(h){var b=h.stack.pop();f.DEBUG&&console.log(h.step,"SCANTYPE[]",b)},function(h){var b=h.stack.pop(),w=h.stack.pop();switch(f.DEBUG&&console.log(h.step,"INSTCTRL[]",b,w),b){case 1:return void(h.inhibitGridFit=!!w);case 2:return void(h.ignoreCvt=!!w);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Kt.bind(void 0,1),Kt.bind(void 0,2),Kt.bind(void 0,3),Kt.bind(void 0,4),Kt.bind(void 0,5),Kt.bind(void 0,6),Kt.bind(void 0,7),Kt.bind(void 0,8),Qt.bind(void 0,1),Qt.bind(void 0,2),Qt.bind(void 0,3),Qt.bind(void 0,4),Qt.bind(void 0,5),Qt.bind(void 0,6),Qt.bind(void 0,7),Qt.bind(void 0,8),Ze.bind(void 0,0,0,0,0,0),Ze.bind(void 0,0,0,0,0,1),Ze.bind(void 0,0,0,0,0,2),Ze.bind(void 0,0,0,0,0,3),Ze.bind(void 0,0,0,0,1,0),Ze.bind(void 0,0,0,0,1,1),Ze.bind(void 0,0,0,0,1,2),Ze.bind(void 0,0,0,0,1,3),Ze.bind(void 0,0,0,1,0,0),Ze.bind(void 0,0,0,1,0,1),Ze.bind(void 0,0,0,1,0,2),Ze.bind(void 0,0,0,1,0,3),Ze.bind(void 0,0,0,1,1,0),Ze.bind(void 0,0,0,1,1,1),Ze.bind(void 0,0,0,1,1,2),Ze.bind(void 0,0,0,1,1,3),Ze.bind(void 0,0,1,0,0,0),Ze.bind(void 0,0,1,0,0,1),Ze.bind(void 0,0,1,0,0,2),Ze.bind(void 0,0,1,0,0,3),Ze.bind(void 0,0,1,0,1,0),Ze.bind(void 0,0,1,0,1,1),Ze.bind(void 0,0,1,0,1,2),Ze.bind(void 0,0,1,0,1,3),Ze.bind(void 0,0,1,1,0,0),Ze.bind(void 0,0,1,1,0,1),Ze.bind(void 0,0,1,1,0,2),Ze.bind(void 0,0,1,1,0,3),Ze.bind(void 0,0,1,1,1,0),Ze.bind(void 0,0,1,1,1,1),Ze.bind(void 0,0,1,1,1,2),Ze.bind(void 0,0,1,1,1,3),Ze.bind(void 0,1,0,0,0,0),Ze.bind(void 0,1,0,0,0,1),Ze.bind(void 0,1,0,0,0,2),Ze.bind(void 0,1,0,0,0,3),Ze.bind(void 0,1,0,0,1,0),Ze.bind(void 0,1,0,0,1,1),Ze.bind(void 0,1,0,0,1,2),Ze.bind(void 0,1,0,0,1,3),Ze.bind(void 0,1,0,1,0,0),Ze.bind(void 0,1,0,1,0,1),Ze.bind(void 0,1,0,1,0,2),Ze.bind(void 0,1,0,1,0,3),Ze.bind(void 0,1,0,1,1,0),Ze.bind(void 0,1,0,1,1,1),Ze.bind(void 0,1,0,1,1,2),Ze.bind(void 0,1,0,1,1,3),Ze.bind(void 0,1,1,0,0,0),Ze.bind(void 0,1,1,0,0,1),Ze.bind(void 0,1,1,0,0,2),Ze.bind(void 0,1,1,0,0,3),Ze.bind(void 0,1,1,0,1,0),Ze.bind(void 0,1,1,0,1,1),Ze.bind(void 0,1,1,0,1,2),Ze.bind(void 0,1,1,0,1,3),Ze.bind(void 0,1,1,1,0,0),Ze.bind(void 0,1,1,1,0,1),Ze.bind(void 0,1,1,1,0,2),Ze.bind(void 0,1,1,1,0,3),Ze.bind(void 0,1,1,1,1,0),Ze.bind(void 0,1,1,1,1,1),Ze.bind(void 0,1,1,1,1,2),Ze.bind(void 0,1,1,1,1,3)],xn=Array.from||function(h){return h.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[^\uD800-\uDFFF]|./g)||[]};function ht(h){(h=h||{}).empty||($t(h.familyName,"When creating a new Font object, familyName is required."),$t(h.styleName,"When creating a new Font object, styleName is required."),$t(h.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),$t(h.ascender,"When creating a new Font object, ascender is required."),$t(h.descender,"When creating a new Font object, descender is required."),$t(h.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:h.familyName||" "},fontSubfamily:{en:h.styleName||" "},fullName:{en:h.fullName||h.familyName+" "+h.styleName},postScriptName:{en:h.postScriptName||(h.familyName+h.styleName).replace(/\s/g,"")},designer:{en:h.designer||" "},designerURL:{en:h.designerURL||" "},manufacturer:{en:h.manufacturer||" "},manufacturerURL:{en:h.manufacturerURL||" "},license:{en:h.license||" "},licenseURL:{en:h.licenseURL||" "},version:{en:h.version||"Version 0.1"},description:{en:h.description||" "},copyright:{en:h.copyright||" "},trademark:{en:h.trademark||" "}},this.unitsPerEm=h.unitsPerEm||1e3,this.ascender=h.ascender,this.descender=h.descender,this.createdTimestamp=h.createdTimestamp,this.tables={os2:{usWeightClass:h.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:h.widthClass||this.usWidthClasses.MEDIUM,fsSelection:h.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Ye.GlyphSet(this,h.glyphs||[]),this.encoding=new je(this),this.position=new mr(this),this.substitution=new Wt(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting||(this.outlinesFormat==="truetype"?this._hinting=new Br(this):void 0)}})}function an(h,b){var w,k=JSON.stringify(h),I=256;for(w in b){var B=parseInt(w);if(B&&!(B<256)){if(JSON.stringify(b[w])===k)return B;I<=B&&(I=B+1)}}return b[I]=h,I}ht.prototype.hasChar=function(h){return this.encoding.charToGlyphIndex(h)!==null},ht.prototype.charToGlyphIndex=function(h){return this.encoding.charToGlyphIndex(h)},ht.prototype.charToGlyph=function(h){return h=this.charToGlyphIndex(h),this.glyphs.get(h)||this.glyphs.get(0)},ht.prototype.stringToGlyphs=function(h,b){b=b||this.defaultRenderOptions;for(var w=xn(h),k=[],I=0;I<w.length;I+=1){var B=w[I];k.push(this.charToGlyphIndex(B))}var V=k.length;if(b.features){var h=b.script||this.substitution.getDefaultScriptName(),J=[];b.features.liga&&(J=J.concat(this.substitution.getFeature("liga",h,b.language))),b.features.rlig&&(J=J.concat(this.substitution.getFeature("rlig",h,b.language)));for(var se=0;se<V;se+=1)for(var ne=0;ne<J.length;ne++){for(var ye=J[ne],we=ye.sub,be=we.length,ce=0;ce<be&&we[ce]===k[se+ce];)ce++;ce===be&&(k.splice(se,be,ye.by),V=V-be+1)}}for(var Pe=new Array(V),Me=this.glyphs.get(0),Oe=0;Oe<V;Oe+=1)Pe[Oe]=this.glyphs.get(k[Oe])||Me;return Pe},ht.prototype.nameToGlyphIndex=function(h){return this.glyphNames.nameToGlyphIndex(h)},ht.prototype.nameToGlyph=function(h){return h=this.nameToGlyphIndex(h),this.glyphs.get(h)||this.glyphs.get(0)},ht.prototype.glyphIndexToName=function(h){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(h):""},ht.prototype.getKerningValue=function(h,b){h=h.index||h,b=b.index||b;var w=this.position.defaultKerningTables;return w?this.position.getKerningValue(w,h,b):this.kerningPairs[h+","+b]||0},ht.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},ht.prototype.forEachGlyph=function(h,b,w,k,I,B){b=b!==void 0?b:0,w=w!==void 0?w:0,I=I||this.defaultRenderOptions;var V,J=1/this.unitsPerEm*(k=k!==void 0?k:72),se=this.stringToGlyphs(h,I);I.kerning&&(h=I.script||this.position.getDefaultScriptName(),V=this.position.getKerningTables(h,I.language));for(var ne=0;ne<se.length;ne+=1){var ye=se[ne];B.call(this,ye,b,w,k,I),ye.advanceWidth&&(b+=ye.advanceWidth*J),I.kerning&&ne<se.length-1&&(b+=(V?this.position.getKerningValue(V,ye.index,se[ne+1].index):this.getKerningValue(ye,se[ne+1]))*J),I.letterSpacing?b+=I.letterSpacing*k:I.tracking&&(b+=I.tracking/1e3*k)}return b},ht.prototype.getPath=function(h,b,w,k,I){var B=new Y;return this.forEachGlyph(h,b,w,k,I,function(V,J,se,ne){V=V.getPath(J,se,ne,I,this),B.extend(V)}),B},ht.prototype.getPaths=function(h,b,w,k,I){var B=[];return this.forEachGlyph(h,b,w,k,I,function(V,J,se,ne){V=V.getPath(J,se,ne,I,this),B.push(V)}),B},ht.prototype.getAdvanceWidth=function(h,b,w){return this.forEachGlyph(h,0,0,b,w,function(){})},ht.prototype.draw=function(h,b,w,k,I,B){this.getPath(b,w,k,I,B).draw(h)},ht.prototype.drawPoints=function(h,b,w,k,I,B){this.forEachGlyph(b,w,k,I,B,function(V,J,se,ne){V.drawPoints(h,J,se,ne)})},ht.prototype.drawMetrics=function(h,b,w,k,I,B){this.forEachGlyph(b,w,k,I,B,function(V,J,se,ne){V.drawMetrics(h,J,se,ne)})},ht.prototype.getEnglishName=function(h){if(h=this.names[h],h)return h.en},ht.prototype.validate=function(){var h=this;function b(w){w=h.getEnglishName(w),w&&w.trim().length}b("fontFamily"),b("weightName"),b("manufacturer"),b("copyright"),b("version"),this.unitsPerEm},ht.prototype.toTables=function(){return dn.fontToTable(this)},ht.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},ht.prototype.toArrayBuffer=function(){for(var h=this.toTables().encode(),b=new ArrayBuffer(h.length),w=new Uint8Array(b),k=0;k<h.length;k++)w[k]=h[k];return b},ht.prototype.download=function(h){var b=this.getEnglishName("fontFamily"),w=this.getEnglishName("fontSubfamily"),k=(h=h||b.replace(/\s/g,"")+"-"+w+".otf",this.toArrayBuffer());typeof window<"u"?(window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,k.byteLength,function(I){I.root.getFile(h,{create:!0},function(B){B.createWriter(function(V){var J=new DataView(k),J=new Blob([J],{type:"font/opentype"});V.write(J),V.addEventListener("writeend",function(){location.href=B.toURL()},!1)})})},function(I){throw new Error(I.name+": "+I.message)})):(b=t("fs"),w=(function(I){for(var B=new p(I.byteLength),V=new Uint8Array(I),J=0;J<B.length;++J)B[J]=V[J];return B})(k),b.writeFileSync(h,w))},ht.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},ht.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},ht.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var wn={make:function(h,b){var w=new Se.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:h.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:h.instances.length},{name:"instanceSize",type:"USHORT",value:4+4*h.axes.length}]);w.offsetToData=w.sizeOf();for(var k,I,B,V=0;V<h.axes.length;V++)w.fields=w.fields.concat((k=V,I=h.axes[V],B=b,B=an(I.name,b),[{name:"tag_"+k,type:"TAG",value:I.tag},{name:"minValue_"+k,type:"FIXED",value:I.minValue<<16},{name:"defaultValue_"+k,type:"FIXED",value:I.defaultValue<<16},{name:"maxValue_"+k,type:"FIXED",value:I.maxValue<<16},{name:"flags_"+k,type:"USHORT",value:0},{name:"nameID_"+k,type:"USHORT",value:B}]));for(var J=0;J<h.instances.length;J++)w.fields=w.fields.concat((function(se,ne,ye,we){for(var be=[{name:"nameID_"+se,type:"USHORT",value:an(ne.name,we)},{name:"flags_"+se,type:"USHORT",value:0}],ce=0;ce<ye.length;++ce){var Pe=ye[ce].tag;be.push({name:"axis_"+se+" "+Pe,type:"FIXED",value:ne.coordinates[Pe]<<16})}return be})(J,h.instances[J],h.axes,b));return w},parse:function(h,b,w){for(var k,I,B,V,J=new xe.Parser(h,b),se=J.parseULong(),ne=(j.argument(se===65536,"Unsupported fvar table version."),J.parseOffset16()),ye=(J.skip("uShort",1),J.parseUShort()),we=J.parseUShort(),be=J.parseUShort(),ce=J.parseUShort(),Pe=[],Me=0;Me<ye;Me++)Pe.push((k=h,I=b+ne+Me*we,B=w,V={},k=new xe.Parser(k,I),V.tag=k.parseTag(),V.minValue=k.parseFixed(),V.defaultValue=k.parseFixed(),V.maxValue=k.parseFixed(),k.skip("uShort",1),V.name=B[k.parseUShort()]||{},V));for(var Oe=[],Te=b+ne+ye*we,Ee=0;Ee<be;Ee++)Oe.push((function(Ke,nt,Qe,Je){var ot={},mt=new xe.Parser(Ke,nt);ot.name=Je[mt.parseUShort()]||{},mt.skip("uShort",1),ot.coordinates={};for(var _t=0;_t<Qe.length;++_t)ot.coordinates[Qe[_t].tag]=mt.parseFixed();return ot})(h,Te+Ee*ce,Pe,w));return{axes:Pe,instances:Oe}}},Gt=new Array(10);Gt[1]=function(){var h=this.offset+this.relativeOffset,b=this.parseUShort();return b===1?{posFormat:1,coverage:this.parsePointer(ge.coverage),value:this.parseValueRecord()}:b===2?{posFormat:2,coverage:this.parsePointer(ge.coverage),values:this.parseValueRecordList()}:void j.assert(!1,"0x"+h.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Gt[2]=function(){var h,b,w,k,B=this.offset+this.relativeOffset,I=this.parseUShort(),B=(j.assert(I===1||I===2,"0x"+B.toString(16)+": GPOS lookup type 2 format must be 1 or 2."),this.parsePointer(ge.coverage)),V=this.parseUShort(),J=this.parseUShort();return I===1?{posFormat:I,coverage:B,valueFormat1:V,valueFormat2:J,pairSets:this.parseList(ge.pointer(ge.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(V),value2:this.parseValueRecord(J)}})))}:I===2?(h=this.parsePointer(ge.classDef),b=this.parsePointer(ge.classDef),w=this.parseUShort(),k=this.parseUShort(),{posFormat:I,coverage:B,valueFormat1:V,valueFormat2:J,classDef1:h,classDef2:b,class1Count:w,class2Count:k,classRecords:this.parseList(w,ge.list(k,function(){return{value1:this.parseValueRecord(V),value2:this.parseValueRecord(J)}}))}):void 0},Gt[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Gt[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Gt[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Gt[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Gt[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Gt[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Gt[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var Sn=new Array(10),Tn={parse:function(h,b){return b=(h=new ge(h,b=b||0)).parseVersion(1),j.argument(b===1||b===1.1,"Unsupported GPOS table version "+b),b===1?{version:b,scripts:h.parseScriptList(),features:h.parseFeatureList(),lookups:h.parseLookupList(Gt)}:{version:b,scripts:h.parseScriptList(),features:h.parseFeatureList(),lookups:h.parseLookupList(Gt),variations:h.parseFeatureVariationsList()}},make:function(h){return new Se.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new Se.ScriptList(h.scripts)},{name:"features",type:"TABLE",value:new Se.FeatureList(h.features)},{name:"lookups",type:"TABLE",value:new Se.LookupList(h.lookups,Sn)}])}},En={parse:function(h,b){if(h=new xe.Parser(h,b),(b=h.parseUShort())===0){var w=h,k={},we=(w.skip("uShort"),w.parseUShort()),I=(j.argument(we===0,"Unsupported kern sub-table version."),w.skip("uShort",2),w.parseUShort());w.skip("uShort",3);for(var B=0;B<I;B+=1){var V=w.parseUShort(),J=w.parseUShort(),se=w.parseShort();k[V+","+J]=se}return k}if(b!==1)throw new Error("Unsupported kern table version ("+b+").");var ne=h,ye={},we=(ne.skip("uShort"),1<ne.parseULong()&&console.warn("Only the first kern subtable is supported."),ne.skip("uLong"),255&ne.parseUShort());if(ne.skip("uShort"),we==0){var be=ne.parseUShort();ne.skip("uShort",3);for(var ce=0;ce<be;ce+=1){var Pe=ne.parseUShort(),Me=ne.parseUShort(),Oe=ne.parseShort();ye[Pe+","+Me]=Oe}}return ye}},Mn={parse:function(h,b,w,k){for(var I=new xe.Parser(h,b),B=k?I.parseUShort:I.parseULong,V=[],J=0;J<w+1;J+=1){var se=B.call(I);k&&(se*=2),V.push(se)}return V}};function kn(h,b){t("fs").readFile(h,function(w,k){if(w)return b(w.message);b(null,Dr(k))})}function On(h,b){var w=new XMLHttpRequest;w.open("get",h,!0),w.responseType="arraybuffer",w.onload=function(){return w.response?b(null,w.response):b("Font could not be loaded: "+w.statusText)},w.onerror=function(){b("Font could not be loaded")},w.send()}function ln(h,b){for(var w=[],k=12,I=0;I<b;I+=1){var B=xe.getTag(h,k),V=xe.getULong(h,k+4),J=xe.getULong(h,k+8),se=xe.getULong(h,k+12);w.push({tag:B,checksum:V,offset:J,length:se,compression:!1}),k+=16}return w}function St(w,b){if(b.compression!=="WOFF")return{data:w,offset:b.offset};var w=new Uint8Array(w.buffer,b.offset+2,b.compressedLength-2),k=new Uint8Array(b.length);if(G(w,k),k.byteLength!==b.length)throw new Error("Decompression error: "+b.tag+" decompressed length doesn't match recorded length");return{data:new DataView(k.buffer,0),offset:0}}function Sr(Ee){var b,w,k,I,B,V,J,se,ne,ye,we,be,ce,Pe,Me=new ht({empty:!0}),Oe=new DataView(Ee,0),Te=[],Ee=xe.getTag(Oe,0);if(Ee==="\0\0\0"||Ee==="true"||Ee==="typ1")Me.outlinesFormat="truetype",Te=ln(Oe,k=xe.getUShort(Oe,4));else if(Ee==="OTTO")Me.outlinesFormat="cff",Te=ln(Oe,k=xe.getUShort(Oe,4));else{if(Ee!=="wOFF")throw new Error("Unsupported OpenType signature "+Ee);var Ke=xe.getTag(Oe,4);if(Ke==="\0\0\0")Me.outlinesFormat="truetype";else{if(Ke!=="OTTO")throw new Error("Unsupported OpenType flavor "+Ee);Me.outlinesFormat="cff"}Te=(function(gt,ct){for(var Ut=[],bt=44,Lt=0;Lt<ct;Lt+=1){var vt=xe.getTag(gt,bt),Ct=xe.getULong(gt,bt+4),cr=xe.getULong(gt,bt+8),tr=xe.getULong(gt,bt+12),un=void 0,un=cr<tr&&"WOFF";Ut.push({tag:vt,offset:Ct,compression:un,compressedLength:cr,length:tr}),bt+=20}return Ut})(Oe,k=xe.getUShort(Oe,12))}for(var nt=0;nt<k;nt+=1){var Qe=Te[nt],Je=void 0;switch(Qe.tag){case"cmap":Je=St(Oe,Qe),Me.tables.cmap=Z.parse(Je.data,Je.offset),Me.encoding=new ke(Me.tables.cmap);break;case"cvt ":Je=St(Oe,Qe),Pe=new xe.Parser(Je.data,Je.offset),Me.tables.cvt=Pe.parseShortList(Qe.length/2);break;case"fvar":B=Qe;break;case"fpgm":Je=St(Oe,Qe),Pe=new xe.Parser(Je.data,Je.offset),Me.tables.fpgm=Pe.parseByteList(Qe.length);break;case"head":Je=St(Oe,Qe),Me.tables.head=ir.parse(Je.data,Je.offset),Me.unitsPerEm=Me.tables.head.unitsPerEm,b=Me.tables.head.indexToLocFormat;break;case"hhea":Je=St(Oe,Qe),Me.tables.hhea=de.parse(Je.data,Je.offset),Me.ascender=Me.tables.hhea.ascender,Me.descender=Me.tables.hhea.descender,Me.numberOfHMetrics=Me.tables.hhea.numberOfHMetrics;break;case"hmtx":ne=Qe;break;case"ltag":Je=St(Oe,Qe),w=Xe.parse(Je.data,Je.offset);break;case"maxp":Je=St(Oe,Qe),Me.tables.maxp=Re.parse(Je.data,Je.offset),Me.numGlyphs=Me.tables.maxp.numGlyphs;break;case"name":be=Qe;break;case"OS/2":Je=St(Oe,Qe),Me.tables.os2=Ot.parse(Je.data,Je.offset);break;case"post":Je=St(Oe,Qe),Me.tables.post=Er.parse(Je.data,Je.offset),Me.glyphNames=new Fe(Me.tables.post);break;case"prep":Je=St(Oe,Qe),Pe=new xe.Parser(Je.data,Je.offset),Me.tables.prep=Pe.parseByteList(Qe.length);break;case"glyf":V=Qe;break;case"loca":we=Qe;break;case"CFF ":I=Qe;break;case"kern":ye=Qe;break;case"GPOS":J=Qe;break;case"GSUB":se=Qe;break;case"meta":ce=Qe}}if(Ke=St(Oe,be),Me.tables.name=Nt.parse(Ke.data,Ke.offset,w),Me.names=Me.tables.name,V&&we)Ee=b===0,Ke=St(Oe,we),Ke=Mn.parse(Ke.data,Ke.offset,Me.numGlyphs,Ee),Ee=St(Oe,V),Me.glyphs=Nr.parse(Ee.data,Ee.offset,Ke,Me);else{if(!I)throw new Error("Font doesn't contain TrueType or CFF outlines.");Ee=St(Oe,I),sr.parse(Ee.data,Ee.offset,Me)}for(var Ke=St(Oe,ne),ot=(De.parse(Ke.data,Ke.offset,Me.numberOfHMetrics,Me.numGlyphs,Me.glyphs),Me),mt=ot.tables.cmap.glyphIndexMap,_t=Object.keys(mt),Tt=0;Tt<_t.length;Tt+=1){var Dt,Ft=_t[Tt],Vt=mt[Ft];(Dt=ot.glyphs.get(Vt)).addUnicode(parseInt(Ft))}for(var ft=0;ft<ot.glyphs.length;ft+=1)Dt=ot.glyphs.get(ft),ot.cffEncoding?ot.isCIDFont?Dt.name="gid"+ft:Dt.name=ot.cffEncoding.charset[ft]:ot.glyphNames.names&&(Dt.name=ot.glyphNames.glyphIndexToName(ft));return ye?(Ee=St(Oe,ye),Me.kerningPairs=En.parse(Ee.data,Ee.offset)):Me.kerningPairs={},J&&(Ke=St(Oe,J),Me.tables.gpos=Tn.parse(Ke.data,Ke.offset),Me.position.init()),se&&(Ee=St(Oe,se),Me.tables.gsub=Mr.parse(Ee.data,Ee.offset)),B&&(Ke=St(Oe,B),Me.tables.fvar=wn.parse(Ke.data,Ke.offset,Me.names)),ce&&(Ee=St(Oe,ce),Me.tables.meta=kr.parse(Ee.data,Ee.offset),Me.metas=Me.tables.meta),Me}f.Font=ht,f.Glyph=We,f.Path=Y,f.BoundingBox=H,f._parse=xe,f.parse=Sr,f.load=function(h,b){(typeof window>"u"?kn:On)(h,function(w,k){if(w)return b(w);var I;try{I=Sr(k)}catch(B){return b(B,null)}return b(null,I)})},f.loadSync=function(h){return Sr(Dr(t("fs").readFileSync(h)))},Object.defineProperty(f,"__esModule",{value:!0})},typeof C=="object"&&W!==void 0?u(C):typeof Rt=="function"&&Rt.amd?Rt(["exports"],u):u(m.opentype={})}).call(this,t("buffer").Buffer)},{buffer:4,fs:2}],258:[function(t,W,C){(function(p){function m(g,y){for(var o=0,a=g.length-1;0<=a;a--){var r=g[a];r==="."?g.splice(a,1):r===".."?(g.splice(a,1),o++):o&&(g.splice(a,1),o--)}if(y)for(;o--;)g.unshift("..");return g}function u(g,y){if(g.filter)return g.filter(y);for(var o=[],a=0;a<g.length;a++)y(g[a],a,g)&&o.push(g[a]);return o}C.resolve=function(){for(var g="",y=!1,o=arguments.length-1;-1<=o&&!y;o--){var a=0<=o?arguments[o]:p.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");a&&(g=a+"/"+g,y=a.charAt(0)==="/")}return(y?"/":"")+(g=m(u(g.split("/"),function(r){return!!r}),!y).join("/"))||"."},C.normalize=function(g){var y=C.isAbsolute(g),o=f(g,-1)==="/";return(g=(g=m(u(g.split("/"),function(a){return!!a}),!y).join("/"))||y?g:".")&&o&&(g+="/"),(y?"/":"")+g},C.isAbsolute=function(g){return g.charAt(0)==="/"},C.join=function(){var g=Array.prototype.slice.call(arguments,0);return C.normalize(u(g,function(y,o){if(typeof y!="string")throw new TypeError("Arguments to path.join must be strings");return y}).join("/"))},C.relative=function(g,y){function o(c){for(var d=0;d<c.length&&c[d]==="";d++);for(var v=c.length-1;0<=v&&c[v]==="";v--);return v<d?[]:c.slice(d,v-d+1)}g=C.resolve(g).substr(1),y=C.resolve(y).substr(1);for(var a=o(g.split("/")),r=o(y.split("/")),i=Math.min(a.length,r.length),s=i,n=0;n<i;n++)if(a[n]!==r[n]){s=n;break}for(var l=[],n=s;n<a.length;n++)l.push("..");return(l=l.concat(r.slice(s))).join("/")},C.sep="/",C.delimiter=":",C.dirname=function(g){if(typeof g!="string"&&(g+=""),g.length===0)return".";for(var y=g.charCodeAt(0)===47,o=-1,a=!0,r=g.length-1;1<=r;--r)if(g.charCodeAt(r)===47){if(!a){o=r;break}}else a=!1;return o===-1?y?"/":".":y&&o===1?"/":g.slice(0,o)},C.basename=function(g,y){return g=(function(o){typeof o!="string"&&(o+="");for(var a=0,r=-1,i=!0,s=o.length-1;0<=s;--s)if(o.charCodeAt(s)===47){if(!i){a=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":o.slice(a,r)})(g),g=y&&g.substr(-1*y.length)===y?g.substr(0,g.length-y.length):g},C.extname=function(g){typeof g!="string"&&(g+="");for(var y=-1,o=0,a=-1,r=!0,i=0,s=g.length-1;0<=s;--s){var n=g.charCodeAt(s);if(n===47){if(r)continue;o=s+1;break}a===-1&&(r=!1,a=s+1),n===46?y===-1?y=s:i!==1&&(i=1):y!==-1&&(i=-1)}return y===-1||a===-1||i===0||i===1&&y===a-1&&y===o+1?"":g.slice(y,a)};var f="ab".substr(-1)==="b"?function(g,y,o){return g.substr(y,o)}:function(g,y,o){return y<0&&(y=g.length+y),g.substr(y,o)}}).call(this,t("_process"))},{_process:259}],259:[function(t,u,C){var p,m,u=u.exports={};function f(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}try{p=typeof setTimeout=="function"?setTimeout:f}catch{p=f}try{m=typeof clearTimeout=="function"?clearTimeout:g}catch{m=g}function y(d){if(p===setTimeout)return setTimeout(d,0);if((p===f||!p)&&setTimeout)return(p=setTimeout)(d,0);try{return p(d,0)}catch{try{return p.call(null,d,0)}catch{return p.call(this,d,0)}}}var o,a=[],r=!1,i=-1;function s(){r&&o&&(r=!1,o.length?a=o.concat(a):i=-1,a.length&&n())}function n(){if(!r){for(var d=y(s),v=(r=!0,a.length);v;){for(o=a,a=[];++i<v;)o&&o[i].run();i=-1,v=a.length}o=null,r=!1,(function(S){if(m===clearTimeout)return clearTimeout(S);if((m===g||!m)&&clearTimeout)return(m=clearTimeout)(S);try{m(S)}catch{try{return m.call(null,S)}catch{return m.call(this,S)}}})(d)}}function l(d,v){this.fun=d,this.array=v}function c(){}u.nextTick=function(d){var v=new Array(arguments.length-1);if(1<arguments.length)for(var S=1;S<arguments.length;S++)v[S-1]=arguments[S];a.push(new l(d,v)),a.length!==1||r||y(n)},l.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=c,u.addListener=c,u.once=c,u.off=c,u.removeListener=c,u.removeAllListeners=c,u.emit=c,u.prependListener=c,u.prependOnceListener=c,u.listeners=function(d){return[]},u.binding=function(d){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(d){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],260:[function(t,W,C){W=(function(p){"use strict";var m,u=Object.prototype,f=u.hasOwnProperty,E=typeof Symbol=="function"?Symbol:{},g=E.iterator||"@@iterator",y=E.asyncIterator||"@@asyncIterator",o=E.toStringTag||"@@toStringTag";function a(z,R,U,N){var Y,oe,L,j,R=R&&R.prototype instanceof d?R:d,R=Object.create(R.prototype),N=new F(N||[]);return R._invoke=(Y=z,oe=U,L=N,j=i,function(X,K){if(j===n)throw new Error("Generator is already running");if(j===l){if(X==="throw")throw K;return A()}for(L.method=X,L.arg=K;;){var re=L.delegate;if(re&&(re=(function ie(ee,ae){var ue=ee.iterator[ae.method];if(ue===m){if(ae.delegate=null,ae.method==="throw"){if(ee.iterator.return&&(ae.method="return",ae.arg=m,ie(ee,ae),ae.method==="throw"))return c;ae.method="throw",ae.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}if(ue=r(ue,ee.iterator,ae.arg),ue.type==="throw")return ae.method="throw",ae.arg=ue.arg,ae.delegate=null,c;if(ue=ue.arg,!ue)return ae.method="throw",ae.arg=new TypeError("iterator result is not an object"),ae.delegate=null,c;{if(!ue.done)return ue;ae[ee.resultName]=ue.value,ae.next=ee.nextLoc,ae.method!=="return"&&(ae.method="next",ae.arg=m)}return ae.delegate=null,c})(re,L),re)){if(re===c)continue;return re}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(j===i)throw j=l,L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);if(j=n,re=r(Y,oe,L),re.type==="normal"){if(j=L.done?l:s,re.arg!==c)return{value:re.arg,done:L.done}}else re.type==="throw"&&(j=l,L.method="throw",L.arg=re.arg)}}),R}function r(z,G,U){try{return{type:"normal",arg:z.call(G,U)}}catch(H){return{type:"throw",arg:H}}}p.wrap=a;var i="suspendedStart",s="suspendedYield",n="executing",l="completed",c={};function d(){}function v(){}function S(){}var E={},_=(E[g]=function(){return this},Object.getPrototypeOf),_=_&&_(_(D([]))),x=(_&&_!==u&&f.call(_,g)&&(E=_),S.prototype=d.prototype=Object.create(E));function O(z){["next","throw","return"].forEach(function(G){z[G]=function(U){return this._invoke(G,U)}})}function T(z){var G;this._invoke=function(U,H){function Y(){return new Promise(function(oe,L){(function j(ie,N,X,K){var re,ie=r(z[ie],z,N);if(ie.type!=="throw")return(N=(re=ie.arg).value)&&typeof N=="object"&&f.call(N,"__await")?Promise.resolve(N.__await).then(function(ee){j("next",ee,X,K)},function(ee){j("throw",ee,X,K)}):Promise.resolve(N).then(function(ee){re.value=ee,X(re)},function(ee){return j("throw",ee,X,K)});K(ie.arg)})(U,H,oe,L)})}return G=G?G.then(Y,Y):Y()}}function P(z){var G={tryLoc:z[0]};1 in z&&(G.catchLoc=z[1]),2 in z&&(G.finallyLoc=z[2],G.afterLoc=z[3]),this.tryEntries.push(G)}function M(z){var G=z.completion||{};G.type="normal",delete G.arg,z.completion=G}function F(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(P,this),this.reset(!0)}function D(z){if(z){var G,U=z[g];if(U)return U.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length))return G=-1,(U=function H(){for(;++G<z.length;)if(f.call(z,G))return H.value=z[G],H.done=!1,H;return H.value=m,H.done=!0,H}).next=U}return{next:A}}function A(){return{value:m,done:!0}}return(v.prototype=x.constructor=S).constructor=v,S[o]=v.displayName="GeneratorFunction",p.isGeneratorFunction=function(z){return z=typeof z=="function"&&z.constructor,!!z&&(z===v||(z.displayName||z.name)==="GeneratorFunction")},p.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,S):(z.__proto__=S,o in z||(z[o]="GeneratorFunction")),z.prototype=Object.create(x),z},p.awrap=function(z){return{__await:z}},O(T.prototype),T.prototype[y]=function(){return this},p.AsyncIterator=T,p.async=function(z,G,U,H){var Y=new T(a(z,G,U,H));return p.isGeneratorFunction(G)?Y:Y.next().then(function(oe){return oe.done?oe.value:Y.next()})},O(x),x[o]="Generator",x[g]=function(){return this},x.toString=function(){return"[object Generator]"},p.keys=function(z){var G,U=[];for(G in z)U.push(G);return U.reverse(),function H(){for(;U.length;){var Y=U.pop();if(Y in z)return H.value=Y,H.done=!1,H}return H.done=!0,H}},p.values=D,F.prototype={constructor:F,reset:function(z){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(M),!z)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=m)},stop:function(){this.done=!0;var z=this.tryEntries[0].completion;if(z.type==="throw")throw z.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var G=this;function U(R,N){return oe.type="throw",oe.arg=z,G.next=R,N&&(G.method="next",G.arg=m),!!N}for(var H=this.tryEntries.length-1;0<=H;--H){var Y=this.tryEntries[H],oe=Y.completion;if(Y.tryLoc==="root")return U("end");if(Y.tryLoc<=this.prev){var L=f.call(Y,"catchLoc"),j=f.call(Y,"finallyLoc");if(L&&j){if(this.prev<Y.catchLoc)return U(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return U(Y.finallyLoc)}else if(L){if(this.prev<Y.catchLoc)return U(Y.catchLoc,!0)}else{if(!j)throw new Error("try statement without catch or finally");if(this.prev<Y.finallyLoc)return U(Y.finallyLoc)}}}},abrupt:function(z,G){for(var U=this.tryEntries.length-1;0<=U;--U){var H=this.tryEntries[U];if(H.tryLoc<=this.prev&&f.call(H,"finallyLoc")&&this.prev<H.finallyLoc){var Y=H;break}}var oe=(Y=Y&&(z==="break"||z==="continue")&&Y.tryLoc<=G&&G<=Y.finallyLoc?null:Y)?Y.completion:{};return oe.type=z,oe.arg=G,Y?(this.method="next",this.next=Y.finallyLoc,c):this.complete(oe)},complete:function(z,G){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&G&&(this.next=G),c},finish:function(z){for(var G=this.tryEntries.length-1;0<=G;--G){var U=this.tryEntries[G];if(U.finallyLoc===z)return this.complete(U.completion,U.afterLoc),M(U),c}},catch:function(z){for(var G=this.tryEntries.length-1;0<=G;--G){var U,H,Y=this.tryEntries[G];if(Y.tryLoc===z)return(U=Y.completion).type==="throw"&&(H=U.arg,M(Y)),H}throw new Error("illegal catch attempt")},delegateYield:function(z,G,U){return this.delegate={iterator:D(z),resultName:G,nextLoc:U},this.method==="next"&&(this.arg=m),c}},p})(typeof W=="object"?W.exports:{});try{regeneratorRuntime=W}catch{Function("r","regeneratorRuntime = r")(W)}},{}],261:[function(t,W,C){(function(p){"use strict";var m,u,f,g,y,o,a,r,i,s;function n(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(M))throw new TypeError("Invalid character in header field name");return M.toLowerCase()}function l(M){return M=typeof M!="string"?String(M):M}function c(M){var F={next:function(){var D=M.shift();return{done:D===void 0,value:D}}};return u&&(F[Symbol.iterator]=function(){return F}),F}function d(M){this.map={},M instanceof d?M.forEach(function(F,D){this.append(D,F)},this):Array.isArray(M)?M.forEach(function(F){this.append(F[0],F[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(F){this.append(F,M[F])},this)}function v(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function S(M){return new Promise(function(F,D){M.onload=function(){F(M.result)},M.onerror=function(){D(M.error)}})}function E(M){var F=new FileReader,D=S(F);return F.readAsArrayBuffer(M),D}function _(M){var F;return M.slice?M.slice(0):((F=new Uint8Array(M.byteLength)).set(new Uint8Array(M)),F.buffer)}function x(){return this.bodyUsed=!1,this._initBody=function(M){if(this._bodyInit=M)if(typeof M=="string")this._bodyText=M;else if(f&&Blob.prototype.isPrototypeOf(M))this._bodyBlob=M;else if(g&&FormData.prototype.isPrototypeOf(M))this._bodyFormData=M;else if(m&&URLSearchParams.prototype.isPrototypeOf(M))this._bodyText=M.toString();else if(y&&f&&a(M))this._bodyArrayBuffer=_(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!y||!ArrayBuffer.prototype.isPrototypeOf(M)&&!r(M))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=_(M)}else this._bodyText="";this.headers.get("content-type")||(typeof M=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f&&(this.blob=function(){var M=v(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(E)}),this.text=function(){var M,F,D=v(this);if(D)return D;if(this._bodyBlob)return D=this._bodyBlob,M=new FileReader,F=S(M),M.readAsText(D),F;if(this._bodyArrayBuffer)return Promise.resolve((function(A){for(var z=new Uint8Array(A),G=new Array(z.length),U=0;U<z.length;U++)G[U]=String.fromCharCode(z[U]);return G.join("")})(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},g&&(this.formData=function(){return this.text().then(T)}),this.json=function(){return this.text().then(JSON.parse)},this}function O(M,F){var D,A=(F=F||{}).body;if(M instanceof O){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,F.headers||(this.headers=new d(M.headers)),this.method=M.method,this.mode=M.mode,A||M._bodyInit==null||(A=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=F.credentials||this.credentials||"omit",!F.headers&&this.headers||(this.headers=new d(F.headers)),this.method=(M=F.method||this.method||"GET",D=M.toUpperCase(),-1<i.indexOf(D)?D:M),this.mode=F.mode||this.mode||null,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&A)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(A)}function T(M){var F=new FormData;return M.trim().split("&").forEach(function(D){var A;D&&(A=(D=D.split("=")).shift().replace(/\+/g," "),D=D.join("=").replace(/\+/g," "),F.append(decodeURIComponent(A),decodeURIComponent(D)))}),F}function P(M,F){F=F||{},this.type="default",this.status=F.status===void 0?200:F.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in F?F.statusText:"OK",this.headers=new d(F.headers),this.url=F.url||"",this._initBody(M)}p.fetch||(m="URLSearchParams"in p,u="Symbol"in p&&"iterator"in Symbol,f="FileReader"in p&&"Blob"in p&&(function(){try{return new Blob,!0}catch{return!1}})(),g="FormData"in p,(y="ArrayBuffer"in p)&&(o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=function(M){return M&&DataView.prototype.isPrototypeOf(M)},r=ArrayBuffer.isView||function(M){return M&&-1<o.indexOf(Object.prototype.toString.call(M))}),d.prototype.append=function(M,F){M=n(M),F=l(F);var D=this.map[M];this.map[M]=D?D+","+F:F},d.prototype.delete=function(M){delete this.map[n(M)]},d.prototype.get=function(M){return M=n(M),this.has(M)?this.map[M]:null},d.prototype.has=function(M){return this.map.hasOwnProperty(n(M))},d.prototype.set=function(M,F){this.map[n(M)]=l(F)},d.prototype.forEach=function(M,F){for(var D in this.map)this.map.hasOwnProperty(D)&&M.call(F,this.map[D],D,this)},d.prototype.keys=function(){var M=[];return this.forEach(function(F,D){M.push(D)}),c(M)},d.prototype.values=function(){var M=[];return this.forEach(function(F){M.push(F)}),c(M)},d.prototype.entries=function(){var M=[];return this.forEach(function(F,D){M.push([D,F])}),c(M)},u&&(d.prototype[Symbol.iterator]=d.prototype.entries),i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"],O.prototype.clone=function(){return new O(this,{body:this._bodyInit})},x.call(O.prototype),x.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},P.error=function(){var M=new P(null,{status:0,statusText:""});return M.type="error",M},s=[301,302,303,307,308],P.redirect=function(M,F){if(s.indexOf(F)===-1)throw new RangeError("Invalid status code");return new P(null,{status:F,headers:{location:M}})},p.Headers=d,p.Request=O,p.Response=P,p.fetch=function(M,F){return new Promise(function(D,A){var z=new O(M,F),G=new XMLHttpRequest;G.onload=function(){var U,H={status:G.status,statusText:G.statusText,headers:(H=G.getAllResponseHeaders()||"",U=new d,H.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(L){var L=L.split(":"),j=L.shift().trim();j&&(L=L.join(":").trim(),U.append(j,L))}),U)},Y=(H.url="responseURL"in G?G.responseURL:H.headers.get("X-Request-URL"),"response"in G?G.response:G.responseText);D(new P(Y,H))},G.onerror=function(){A(new TypeError("Network request failed"))},G.ontimeout=function(){A(new TypeError("Network request failed"))},G.open(z.method,z.url,!0),z.credentials==="include"?G.withCredentials=!0:z.credentials==="omit"&&(G.withCredentials=!1),"responseType"in G&&f&&(G.responseType="blob"),z.headers.forEach(function(U,H){G.setRequestHeader(H,U)}),G.send(z._bodyInit===void 0?null:z._bodyInit)})},p.fetch.polyfill=!0)})(typeof self<"u"?self:this)},{}],262:[function(t,W,C){"use strict";t("core-js/modules/es.function.name"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p,m=f(t("../core/main")),u=f(t("../color/color_conversion"));function f(o){return o&&o.__esModule?o:{default:o}}var g=[{h:0,s:0,b:.8275,name:"gray"},{h:0,s:0,b:.8627,name:"gray"},{h:0,s:0,b:.7529,name:"gray"},{h:.0167,s:.1176,b:1,name:"light pink"}],y=[{h:0,s:0,b:0,name:"black"},{h:0,s:0,b:.5,name:"gray"},{h:0,s:0,b:1,name:"white"},{h:0,s:.5,b:.5,name:"dark maroon"},{h:0,s:.5,b:1,name:"salmon pink"},{h:0,s:1,b:0,name:"black"},{h:0,s:1,b:.5,name:"dark red"},{h:0,s:1,b:1,name:"red"},{h:5,s:0,b:1,name:"very light peach"},{h:5,s:.5,b:.5,name:"brown"},{h:5,s:.5,b:1,name:"peach"},{h:5,s:1,b:.5,name:"brick red"},{h:5,s:1,b:1,name:"crimson"},{h:10,s:0,b:1,name:"light peach"},{h:10,s:.5,b:.5,name:"brown"},{h:10,s:.5,b:1,name:"light orange"},{h:10,s:1,b:.5,name:"brown"},{h:10,s:1,b:1,name:"orange"},{h:15,s:0,b:1,name:"very light yellow"},{h:15,s:.5,b:.5,name:"olive green"},{h:15,s:.5,b:1,name:"light yellow"},{h:15,s:1,b:0,name:"dark olive green"},{h:15,s:1,b:.5,name:"olive green"},{h:15,s:1,b:1,name:"yellow"},{h:20,s:0,b:1,name:"very light yellow"},{h:20,s:.5,b:.5,name:"olive green"},{h:20,s:.5,b:1,name:"light yellow green"},{h:20,s:1,b:0,name:"dark olive green"},{h:20,s:1,b:.5,name:"dark yellow green"},{h:20,s:1,b:1,name:"yellow green"},{h:25,s:.5,b:.5,name:"dark yellow green"},{h:25,s:.5,b:1,name:"light green"},{h:25,s:1,b:.5,name:"dark green"},{h:25,s:1,b:1,name:"green"},{h:30,s:.5,b:1,name:"light green"},{h:30,s:1,b:.5,name:"dark green"},{h:30,s:1,b:1,name:"green"},{h:35,s:0,b:.5,name:"light green"},{h:35,s:0,b:1,name:"very light green"},{h:35,s:.5,b:.5,name:"dark green"},{h:35,s:.5,b:1,name:"light green"},{h:35,s:1,b:0,name:"very dark green"},{h:35,s:1,b:.5,name:"dark green"},{h:35,s:1,b:1,name:"green"},{h:40,s:0,b:1,name:"very light green"},{h:40,s:.5,b:.5,name:"dark green"},{h:40,s:.5,b:1,name:"light green"},{h:40,s:1,b:.5,name:"dark green"},{h:40,s:1,b:1,name:"green"},{h:45,s:.5,b:1,name:"light turquoise"},{h:45,s:1,b:.5,name:"dark turquoise"},{h:45,s:1,b:1,name:"turquoise"},{h:50,s:0,b:1,name:"light sky blue"},{h:50,s:.5,b:.5,name:"dark cyan"},{h:50,s:.5,b:1,name:"light cyan"},{h:50,s:1,b:.5,name:"dark cyan"},{h:50,s:1,b:1,name:"cyan"},{h:55,s:0,b:1,name:"light sky blue"},{h:55,s:.5,b:1,name:"light sky blue"},{h:55,s:1,b:.5,name:"dark blue"},{h:55,s:1,b:1,name:"sky blue"},{h:60,s:0,b:.5,name:"gray"},{h:60,s:0,b:1,name:"very light blue"},{h:60,s:.5,b:.5,name:"blue"},{h:60,s:.5,b:1,name:"light blue"},{h:60,s:1,b:.5,name:"navy blue"},{h:60,s:1,b:1,name:"blue"},{h:65,s:0,b:1,name:"lavender"},{h:65,s:.5,b:.5,name:"navy blue"},{h:65,s:.5,b:1,name:"light purple"},{h:65,s:1,b:.5,name:"dark navy blue"},{h:65,s:1,b:1,name:"blue"},{h:70,s:0,b:1,name:"lavender"},{h:70,s:.5,b:.5,name:"navy blue"},{h:70,s:.5,b:1,name:"lavender blue"},{h:70,s:1,b:.5,name:"dark navy blue"},{h:70,s:1,b:1,name:"blue"},{h:75,s:.5,b:1,name:"lavender"},{h:75,s:1,b:.5,name:"dark purple"},{h:75,s:1,b:1,name:"purple"},{h:80,s:.5,b:1,name:"pinkish purple"},{h:80,s:1,b:.5,name:"dark purple"},{h:80,s:1,b:1,name:"purple"},{h:85,s:0,b:1,name:"light pink"},{h:85,s:.5,b:.5,name:"purple"},{h:85,s:.5,b:1,name:"light fuchsia"},{h:85,s:1,b:.5,name:"dark fuchsia"},{h:85,s:1,b:1,name:"fuchsia"},{h:90,s:.5,b:.5,name:"dark fuchsia"},{h:90,s:.5,b:1,name:"hot pink"},{h:90,s:1,b:.5,name:"dark fuchsia"},{h:90,s:1,b:1,name:"fuchsia"},{h:95,s:0,b:1,name:"pink"},{h:95,s:.5,b:1,name:"light pink"},{h:95,s:1,b:.5,name:"dark magenta"},{h:95,s:1,b:1,name:"magenta"}];m.default.prototype._rgbColorName=function(i){var a,r,i=u.default._rgbaToHSBA(i),s=[(p=i)[0],i[1],i[2]];s[0]!==0&&(s[0]=Math.round(100*s[0]),(i=s[0].toString().split(""))[r=i.length-1]=parseInt(i[r]),i[r]<2.5?i[r]=0:2.5<=i[r]&&i[r]<7.5&&(i[r]=5),i.length===2?(i[0]=parseInt(i[0]),7.5<=i[r]&&(i[r]=0,i[0]=i[0]+1),s[0]=10*i[0]+i[1]):7.5<=i[r]?s[0]=10:s[0]=i[r]),s[2]=s[2]/255;for(var n=s.length-1;1<=n;n--)s[n]<=.25?s[n]=0:.25<s[n]&&s[n]<.75?s[n]=.5:s[n]=1;if(s[0]===0&&s[1]===0&&s[2]===1){for(var l=2;0<=l;l--)p[l]=Math.round(1e4*p[l])/1e4;for(var c=0;c<g.length;c++){if(g[c].h===p[0]&&g[c].s===p[1]&&g[c].b===p[2]){a=g[c].name;break}a="white"}}else for(var d=0;d<y.length;d++)if(y[d].h===s[0]&&y[d].s===s[1]&&y[d].b===s[2]){a=y[d].name;break}return a},t=m.default,C.default=t},{"../color/color_conversion":268,"../core/main":283,"core-js/modules/es.function.name":174,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.split":206}],263:[function(t,W,C){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.replace"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t},m="_Description",u="_fallbackDesc",f="_fallbackTable",g="_Label",y="_labelDesc",o="_labelTable";function a(r){if(r==="label"||r==="fallback")throw new Error("description should not be LABEL or FALLBACK");return r.endsWith(".")||r.endsWith(";")||r.endsWith(",")||r.endsWith("?")||r.endsWith("!")||(r+="."),r}p.default.prototype.describe=function(r,i){var s;p.default._validateParameters("describe",arguments),typeof r=="string"&&(s=this.canvas.id,r=a(r),this.dummyDOM||(this.dummyDOM=document.getElementById(s).parentNode),this.descriptions||(this.descriptions={}),this.descriptions.fallback?this.descriptions.fallback.innerHTML!==r&&(this.descriptions.fallback.innerHTML=r):this._describeHTML("fallback",r),i===this.LABEL&&(this.descriptions.label?this.descriptions.label.innerHTML!==r&&(this.descriptions.label.innerHTML=r):this._describeHTML("label",r)))},p.default.prototype.describeElement=function(r,i,s){var n,l;p.default._validateParameters("describeElement",arguments),typeof i=="string"&&typeof r=="string"&&(n=this.canvas.id,i=a(i),l=(function(c){if(c==="label"||c==="fallback")throw new Error("element name should not be LABEL or FALLBACK");return c.endsWith(".")||c.endsWith(";")||c.endsWith(",")?c=c.replace(/.$/,":"):c.endsWith(":")||(c+=":"),c})(r),r=r.replace(/[^a-zA-Z0-9]/g,""),l='<th scope="row">'.concat(l,"</th><td>").concat(i,"</td>"),this.dummyDOM||(this.dummyDOM=document.getElementById(n).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[r]?this.descriptions.fallbackElements[r].innerHTML!==l&&(this.descriptions.fallbackElements[r].innerHTML=l):this._describeElementHTML("fallback",r,l),s===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[r]?this.descriptions.labelElements[r].innerHTML!==l&&(this.descriptions.labelElements[r].innerHTML=l):this._describeElementHTML("label",r,l)))},p.default.prototype._describeHTML=function(r,i){var s,n=this.canvas.id;r==="fallback"?(this.dummyDOM.querySelector("#".concat(n+m))?this.dummyDOM.querySelector("#"+n+f).insertAdjacentHTML("beforebegin",'<p id="'.concat(n+u,'"></p>')):(s='<div id="'.concat(n).concat(m,'" role="region" aria-label="Canvas Description"><p id="').concat(n).concat(u,'"></p></div>'),this.dummyDOM.querySelector("#".concat(n,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutput")).insertAdjacentHTML("beforebegin",s):this.dummyDOM.querySelector("#".concat(n)).innerHTML=s),this.descriptions.fallback=this.dummyDOM.querySelector("#".concat(n).concat(u)),this.descriptions.fallback.innerHTML=i):r==="label"&&(this.dummyDOM.querySelector("#".concat(n+g))?this.dummyDOM.querySelector("#".concat(n+o))&&this.dummyDOM.querySelector("#".concat(n+o)).insertAdjacentHTML("beforebegin",'<p id="'.concat(n).concat(y,'"></p>')):(s='<div id="'.concat(n).concat(g,'" class="p5Label"><p id="').concat(n).concat(y,'"></p></div>'),this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",s):this.dummyDOM.querySelector("#"+n).insertAdjacentHTML("afterend",s)),this.descriptions.label=this.dummyDOM.querySelector("#"+n+y),this.descriptions.label.innerHTML=i)},p.default.prototype._describeElementHTML=function(r,i,s){var n,l=this.canvas.id;r==="fallback"?(this.dummyDOM.querySelector("#".concat(l+m))?this.dummyDOM.querySelector("#"+l+f)||this.dummyDOM.querySelector("#"+l+u).insertAdjacentHTML("afterend",'<table id="'.concat(l).concat(f,'"><caption>Canvas elements and their descriptions</caption></table>')):(n='<div id="'.concat(l).concat(m,'" role="region" aria-label="Canvas Description"><table id="').concat(l).concat(f,'"><caption>Canvas elements and their descriptions</caption></table></div>'),this.dummyDOM.querySelector("#".concat(l,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(l,"accessibleOutput")).insertAdjacentHTML("beforebegin",n):this.dummyDOM.querySelector("#"+l).innerHTML=n),(n=document.createElement("tr")).id=l+"_fte_"+i,this.dummyDOM.querySelector("#"+l+f).appendChild(n),this.descriptions.fallbackElements[i]=this.dummyDOM.querySelector("#".concat(l).concat("_fte_").concat(i)),this.descriptions.fallbackElements[i].innerHTML=s):r==="label"&&(this.dummyDOM.querySelector("#".concat(l+g))?this.dummyDOM.querySelector("#".concat(l+o))||this.dummyDOM.querySelector("#"+l+y).insertAdjacentHTML("afterend",'<table id="'.concat(l+o,'"></table>')):(n='<div id="'.concat(l).concat(g,'" class="p5Label"><table id="').concat(l).concat(o,'"></table></div>'),this.dummyDOM.querySelector("#".concat(l,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(l,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",n):this.dummyDOM.querySelector("#"+l).insertAdjacentHTML("afterend",n)),(r=document.createElement("tr")).id=l+"_lte_"+i,this.dummyDOM.querySelector("#"+l+o).appendChild(r),this.descriptions.labelElements[i]=this.dummyDOM.querySelector("#".concat(l).concat("_lte_").concat(i)),this.descriptions.labelElements[i].innerHTML=s)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.ends-with":198,"core-js/modules/es.string.replace":204}],264:[function(t,W,C){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};p.default.prototype._updateGridOutput=function(m){var u,f,g,y;this._renderer&&this._renderer instanceof p.default.RendererGL?this._didOutputGridWebGLMessage||(this._didOutputGridWebGLMessage=!0,console.error("gridOutput() does not yet work in WebGL mode.")):this.dummyDOM.querySelector("#".concat(m,"_summary"))&&(u=this._accessibleOutputs[m],g=(function(o,a,r,i){return a="".concat(a," canvas, ").concat(r," by ").concat(i," pixels, contains ").concat(o[0]),a=(o[0]===1?"".concat(a," shape: "):"".concat(a," shapes: ")).concat(o[1]),a})((f=(function(o,a){var r,i="",s="",n=0;for(r in a){var l,c=0;for(l in a[r]){var d='<li id="'.concat(o,"shape").concat(n,'">').concat(a[r][l].color," ").concat(r,",");r==="line"?d+=" location = ".concat(a[r][l].pos,", length = ").concat(a[r][l].length," pixels"):(d+=" location = ".concat(a[r][l].pos),r!=="point"&&(d+=", area = ".concat(a[r][l].area," %")),d+="</li>"),i+=d,c++,n++}s=1<c?"".concat(s," ").concat(c," ").concat(r,"s"):"".concat(s," ").concat(c," ").concat(r)}return{numShapes:[n,s],details:i}})(m,this.ingredients.shapes)).numShapes,this.ingredients.colors.background,this.width,this.height),y=(function(o,a){var r,i,s=0,n="",l=Array.from(Array(10),function(){return Array(10)});for(r in a)for(var c in a[r]){var d=void 0;d=r!=="line"?'<a href="#'.concat(o,"shape").concat(s,'">').concat(a[r][c].color," ").concat(r,"</a>"):'<a href="#'.concat(o,"shape").concat(s,'">').concat(a[r][c].color," ").concat(r," midpoint</a>"),a[r][c].loc.locY<l.length&&a[r][c].loc.locX<l[a[r][c].loc.locY].length&&(l[a[r][c].loc.locY][a[r][c].loc.locX]?l[a[r][c].loc.locY][a[r][c].loc.locX]=l[a[r][c].loc.locY][a[r][c].loc.locX]+"  "+d:l[a[r][c].loc.locY][a[r][c].loc.locX]=d,s++)}for(i in l){var v,S="<tr>";for(v in l[i])S+="<td>",l[i][v]!==void 0&&(S+=l[i][v]),S+="</td>";n=n+S+"</tr>"}return n})(m,this.ingredients.shapes),g!==u.summary.innerHTML&&(u.summary.innerHTML=g),y!==u.map.innerHTML&&(u.map.innerHTML=y),f.details!==u.shapeDetails.innerHTML&&(u.shapeDetails.innerHTML=f.details),this._accessibleOutputs[m]=u)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.from":162,"core-js/modules/es.array.map":168,"core-js/modules/es.string.iterator":200}],265:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(f){return(function(g){if(Array.isArray(g)){for(var y=0,o=new Array(g.length);y<g.length;y++)o[y]=g[y];return o}})(f)||(function(g){if(Symbol.iterator in Object(g)||Object.prototype.toString.call(g)==="[object Arguments]")return Array.from(g)})(f)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}function u(o,r,y){var a=o[0],o=o[1],a=Math.floor(a/r*10),r=Math.floor(o/y*10);return{locX:Math.min(Math.max(a,0),9),locY:Math.min(Math.max(r,0),9)}}p.default.prototype.textOutput=function(f){p.default._validateParameters("textOutput",arguments),this._accessibleOutputs.text||(this._accessibleOutputs.text=!0,this._createOutput("textOutput","Fallback"),f===this.LABEL&&(this._accessibleOutputs.textLabel=!0,this._createOutput("textOutput","Label")))},p.default.prototype.gridOutput=function(f){p.default._validateParameters("gridOutput",arguments),this._accessibleOutputs.grid||(this._accessibleOutputs.grid=!0,this._createOutput("gridOutput","Fallback"),f===this.LABEL&&(this._accessibleOutputs.gridLabel=!0,this._createOutput("gridOutput","Label")))},p.default.prototype._addAccsOutput=function(){return this._accessibleOutputs||(this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1}),this._accessibleOutputs.grid||this._accessibleOutputs.text},p.default.prototype._createOutput=function(f,g){var y,o,a,r=this.canvas.id,i=(this.ingredients||(this.ingredients={shapes:{},colors:{background:"white",fill:"white",stroke:"black"},pShapes:"",pBackground:""}),this.dummyDOM||(this.dummyDOM=document.getElementById(r).parentNode),"");g==="Fallback"?(y=r+f,this.dummyDOM.querySelector("#".concat(o=r+"accessibleOutput"))||(this.dummyDOM.querySelector("#".concat(r,"_Description"))?this.dummyDOM.querySelector("#".concat(r,"_Description")).insertAdjacentHTML("afterend",'<div id="'.concat(o,'" role="region" aria-label="Canvas Outputs"></div>')):this.dummyDOM.querySelector("#".concat(r)).innerHTML='<div id="'.concat(o,'" role="region" aria-label="Canvas Outputs"></div>'))):g==="Label"&&(y=r+f+(i=g),this.dummyDOM.querySelector("#".concat(o=r+"accessibleOutput"+g))||(this.dummyDOM.querySelector("#".concat(r,"_Label"))?this.dummyDOM.querySelector("#".concat(r,"_Label")):this.dummyDOM.querySelector("#".concat(r))).insertAdjacentHTML("afterend",'<div id="'.concat(o,'"></div>'))),this._accessibleOutputs[y]={},f==="textOutput"?(i="#".concat(r,"gridOutput").concat(i),a='<div id="'.concat(y,'">Text Output<div id="').concat(y,'Summary" aria-label="text output summary"><p id="').concat(y,'_summary"></p><ul id="').concat(y,'_list"></ul></div><table id="').concat(y,'_shapeDetails" summary="text output shape details"></table></div>'),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("beforebegin",a):this.dummyDOM.querySelector("#".concat(o)).innerHTML=a,this._accessibleOutputs[y].list=this.dummyDOM.querySelector("#".concat(y,"_list"))):f==="gridOutput"&&(i="#".concat(r,"textOutput").concat(i),a='<div id="'.concat(y,'">Grid Output<p id="').concat(y,'_summary" aria-label="grid output summary"><table id="').concat(y,'_map" summary="grid output content"></table><ul id="').concat(y,'_shapeDetails" aria-label="grid output shape details"></ul></div>'),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("afterend",a):this.dummyDOM.querySelector("#".concat(o)).innerHTML=a,this._accessibleOutputs[y].map=this.dummyDOM.querySelector("#".concat(y,"_map"))),this._accessibleOutputs[y].shapeDetails=this.dummyDOM.querySelector("#".concat(y,"_shapeDetails")),this._accessibleOutputs[y].summary=this.dummyDOM.querySelector("#".concat(y,"_summary"))},p.default.prototype._updateAccsOutput=function(){var f=this.canvas.id;JSON.stringify(this.ingredients.shapes)===this.ingredients.pShapes&&this.ingredients.colors.background===this.ingredients.pBackground||(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(f+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(f+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(f+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(f+"gridOutputLabel"))},p.default.prototype._accsBackground=function(f){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.pBackground=this.ingredients.colors.background,this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==f&&(this.ingredients.colors.backgroundRGBA=f,this.ingredients.colors.background=this._rgbColorName(f))},p.default.prototype._accsCanvasColors=function(f,g){f==="fill"?this.ingredients.colors.fillRGBA!==g&&(this.ingredients.colors.fillRGBA=g,this.ingredients.colors.fill=this._rgbColorName(g)):f==="stroke"&&this.ingredients.colors.strokeRGBA!==g&&(this.ingredients.colors.strokeRGBA=g,this.ingredients.colors.stroke=this._rgbColorName(g))},p.default.prototype._accsOutput=function(f,g){f==="ellipse"&&g[2]===g[3]?f="circle":f==="rectangle"&&g[2]===g[3]&&(f="square");var y,o,a={},r=!0,i=(function(n,l){var c;return n=n==="rectangle"||n==="ellipse"||n==="arc"||n==="circle"||n==="square"?(c=Math.round(l[0]+l[2]/2),Math.round(l[1]+l[3]/2)):n==="triangle"?(c=(l[0]+l[2]+l[4])/3,(l[1]+l[3]+l[5])/3):n==="quadrilateral"?(c=(l[0]+l[2]+l[4]+l[6])/4,(l[1]+l[3]+l[5]+l[7])/4):n==="line"?(c=(l[0]+l[2])/2,(l[1]+l[3])/2):(c=l[0],l[1]),[c,n]})(f,g);if(f==="line"?(a.color=this.ingredients.colors.stroke,a.length=Math.round(this.dist(g[0],g[1],g[2],g[3])),y=this._getPos(g[0],[1]),o=this._getPos(g[2],[3]),a.loc=u(i,this.width,this.height),a.pos=y===o?"at ".concat(y):"from ".concat(y," to ").concat(o)):(f==="point"?a.color=this.ingredients.colors.stroke:(a.color=this.ingredients.colors.fill,a.area=this._getArea(f,g)),a.pos=this._getPos.apply(this,m(i)),a.loc=u(i,this.width,this.height)),this.ingredients.shapes[f]){for(var s in this.ingredients.shapes[f])JSON.stringify(this.ingredients.shapes[f][s])===JSON.stringify(a)&&(r=!1);r===!0&&this.ingredients.shapes[f].push(a)}else this.ingredients.shapes[f]=[a]},p.default.prototype._getPos=function(o,y){var o=new DOMPointReadOnly(o,y),y=this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform(),o=o.matrixTransform(y),y=o.x,o=o.y,a=this.width*this._pixelDensity,r=this.height*this._pixelDensity;return y<.4*a?o<.4*r?"top left":.6*r<o?"bottom left":"mid left":.6*a<y?o<.4*r?"top right":.6*r<o?"bottom right":"mid right":o<.4*r?"top middle":.6*r<o?"bottom middle":"middle"},p.default.prototype._getArea=function(f,g){var y,o,a=0,r=(f==="arc"?(a=(y=((g[5]-g[4])%(2*Math.PI)+2*Math.PI)%(2*Math.PI))*g[2]*g[3]/8,g[6]!=="open"&&g[6]!=="chord"||(o=g[0],l=g[1],r=g[0]+g[2]/2*Math.cos(g[4]).toFixed(2),c=g[1]+g[3]/2*Math.sin(g[4]).toFixed(2),s=g[0]+g[2]/2*Math.cos(g[5]).toFixed(2),i=g[1]+g[3]/2*Math.sin(g[5]).toFixed(2),o=Math.abs(o*(c-i)+r*(i-l)+s*(l-c))/2,y>Math.PI?a+=o:a-=o)):f==="ellipse"||f==="circle"?a=3.14*g[2]/2*g[3]/2:f==="line"||f==="point"?a=0:f==="quadrilateral"?a=Math.abs((g[6]+g[0])*(g[7]-g[1])+(g[0]+g[2])*(g[1]-g[3])+(g[2]+g[4])*(g[3]-g[5])+(g[4]+g[6])*(g[5]-g[7]))/2:f==="rectangle"||f==="square"?a=g[2]*g[3]:f==="triangle"&&(a=Math.abs(g[0]*(g[3]-g[5])+g[2]*(g[5]-g[1])+g[4]*(g[1]-g[3]))/2),this.width*this._pixelDensity),i=this.height*this._pixelDensity,s=[new DOMPoint(0,0),new DOMPoint(r,0),new DOMPoint(r,i),new DOMPoint(0,i)],n=(this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform()).inverse(),l=s.map(function(d){return d.matrixTransform(n)}),c=Math.abs((l[3].x+l[0].x)*(l[3].y-l[0].y)+(l[0].x+l[1].x)*(l[0].y-l[1].y)+(l[1].x+l[2].x)*(l[1].y-l[2].y)+(l[2].x+l[3].x)*(l[2].y-l[3].y))/2;return Math.round(100*a/c)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],266:[function(t,W,C){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.concat"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};p.default.prototype._updateTextOutput=function(m){var u,f,g,y;this._renderer&&this._renderer instanceof p.default.RendererGL?this._didOutputTextWebGLMessage||(this._didOutputTextWebGLMessage=!0,console.error("textOutput() does not yet work in WebGL mode.")):this.dummyDOM.querySelector("#".concat(m,"_summary"))&&(u=this._accessibleOutputs[m],g=(function(o,a,r,i){return r="Your output is a, ".concat(r," by ").concat(i," pixels, ").concat(a," canvas containing the following"),r=o===1?"".concat(r," shape:"):"".concat(r," ").concat(o," shapes:"),r})((f=(function(o,a){var r,i="",s=0;for(r in a)for(var n in a[r]){var l='<li><a href="#'.concat(o,"shape").concat(s,'">').concat(a[r][n].color," ").concat(r,"</a>");r==="line"?l+=", ".concat(a[r][n].pos,", ").concat(a[r][n].length," pixels long.</li>"):(l+=", at ".concat(a[r][n].pos),r!=="point"&&(l+=", covering ".concat(a[r][n].area,"% of the canvas")),l+=".</li>"),i+=l,s++}return{numShapes:s,listShapes:i}})(m,this.ingredients.shapes)).numShapes,this.ingredients.colors.background,this.width,this.height),y=(function(o,a){var r,i="",s=0;for(r in a)for(var n in a[r]){var l='<tr id="'.concat(o,"shape").concat(s,'"><th>').concat(a[r][n].color," ").concat(r,"</th>");r==="line"?l+="<td>location = ".concat(a[r][n].pos,"</td><td>length = ").concat(a[r][n].length," pixels</td></tr>"):(l+="<td>location = ".concat(a[r][n].pos,"</td>"),r!=="point"&&(l+="<td> area = ".concat(a[r][n].area,"%</td>")),l+="</tr>"),i+=l,s++}return i})(m,this.ingredients.shapes),g!==u.summary.innerHTML&&(u.summary.innerHTML=g),f.listShapes!==u.list.innerHTML&&(u.list.innerHTML=f.listShapes),y!==u.shapeDetails.innerHTML&&(u.shapeDetails.innerHTML=y),this._accessibleOutputs[m]=u)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153}],267:[function(t,W,C){"use strict";var p=(p=t("./core/main"))&&p.__esModule?p:{default:p};t("./core/constants"),t("./core/environment"),t("./core/friendly_errors/stacktrace"),t("./core/friendly_errors/validate_params"),t("./core/friendly_errors/file_errors"),t("./core/friendly_errors/fes_core"),t("./core/friendly_errors/sketch_reader"),t("./core/helpers"),t("./core/legacy"),t("./core/preload"),t("./core/p5.Element"),t("./core/p5.Graphics"),t("./core/p5.Renderer"),t("./core/p5.Renderer2D"),t("./core/rendering"),t("./core/shim"),t("./core/structure"),t("./core/transform"),t("./core/shape/2d_primitives"),t("./core/shape/attributes"),t("./core/shape/curves"),t("./core/shape/vertex"),t("./accessibility/outputs"),t("./accessibility/textOutput"),t("./accessibility/gridOutput"),t("./accessibility/color_namer"),t("./color/color_conversion"),t("./color/creating_reading"),t("./color/p5.Color"),t("./color/setting"),t("./data/p5.TypedDict"),t("./data/local_storage.js"),t("./dom/dom"),t("./accessibility/describe"),t("./events/acceleration"),t("./events/keyboard"),t("./events/mouse"),t("./events/touch"),t("./image/filters"),t("./image/image"),t("./image/loading_displaying"),t("./image/p5.Image"),t("./image/pixels"),t("./io/files"),t("./io/p5.Table"),t("./io/p5.TableRow"),t("./io/p5.XML"),t("./math/calculation"),t("./math/math"),t("./math/noise"),t("./math/p5.Vector"),t("./math/random"),t("./math/trigonometry"),t("./typography/attributes"),t("./typography/loading_displaying"),t("./typography/p5.Font"),t("./utilities/array_functions"),t("./utilities/conversion"),t("./utilities/string_functions"),t("./utilities/time_date"),t("./webgl/3d_primitives"),t("./webgl/interaction"),t("./webgl/light"),t("./webgl/loading"),t("./webgl/material"),t("./webgl/p5.Camera"),t("./webgl/p5.DataArray"),t("./webgl/p5.Geometry"),t("./webgl/p5.Matrix"),t("./webgl/p5.Quat"),t("./webgl/p5.RendererGL.Immediate"),t("./webgl/p5.RendererGL"),t("./webgl/p5.RendererGL.Retained"),t("./webgl/p5.Framebuffer"),t("./webgl/p5.Shader"),t("./webgl/p5.RenderBuffer"),t("./webgl/p5.Texture"),t("./webgl/text"),t("./core/init"),W.exports=p.default},{"./accessibility/color_namer":262,"./accessibility/describe":263,"./accessibility/gridOutput":264,"./accessibility/outputs":265,"./accessibility/textOutput":266,"./color/color_conversion":268,"./color/creating_reading":269,"./color/p5.Color":270,"./color/setting":271,"./core/constants":272,"./core/environment":273,"./core/friendly_errors/fes_core":274,"./core/friendly_errors/file_errors":275,"./core/friendly_errors/sketch_reader":276,"./core/friendly_errors/stacktrace":277,"./core/friendly_errors/validate_params":278,"./core/helpers":279,"./core/init":280,"./core/legacy":282,"./core/main":283,"./core/p5.Element":284,"./core/p5.Graphics":285,"./core/p5.Renderer":286,"./core/p5.Renderer2D":287,"./core/preload":288,"./core/rendering":289,"./core/shape/2d_primitives":290,"./core/shape/attributes":291,"./core/shape/curves":292,"./core/shape/vertex":293,"./core/shim":294,"./core/structure":295,"./core/transform":296,"./data/local_storage.js":297,"./data/p5.TypedDict":298,"./dom/dom":299,"./events/acceleration":300,"./events/keyboard":301,"./events/mouse":302,"./events/touch":303,"./image/filters":304,"./image/image":305,"./image/loading_displaying":306,"./image/p5.Image":307,"./image/pixels":308,"./io/files":309,"./io/p5.Table":310,"./io/p5.TableRow":311,"./io/p5.XML":312,"./math/calculation":313,"./math/math":314,"./math/noise":315,"./math/p5.Vector":316,"./math/random":317,"./math/trigonometry":318,"./typography/attributes":319,"./typography/loading_displaying":320,"./typography/p5.Font":321,"./utilities/array_functions":322,"./utilities/conversion":323,"./utilities/string_functions":324,"./utilities/time_date":325,"./webgl/3d_primitives":326,"./webgl/interaction":328,"./webgl/light":329,"./webgl/loading":330,"./webgl/material":331,"./webgl/p5.Camera":332,"./webgl/p5.DataArray":333,"./webgl/p5.Framebuffer":334,"./webgl/p5.Geometry":335,"./webgl/p5.Matrix":336,"./webgl/p5.Quat":337,"./webgl/p5.RenderBuffer":338,"./webgl/p5.RendererGL":341,"./webgl/p5.RendererGL.Immediate":339,"./webgl/p5.RendererGL.Retained":340,"./webgl/p5.Shader":342,"./webgl/p5.Texture":343,"./webgl/text":344}],268:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.ColorConversion={_hsbaToHSLA:function(p){var m=p[0],u=p[1],f=p[2],g=(2-u)*f/2;return g!=0&&(g==1?u=0:g<.5?u/=2-u:u=u*f/(2-2*g)),[m,u,g,p[3]]},_hsbaToRGBA:function(p){var m,u,f,g,y,o=6*p[0],a=p[1],r=p[2];return a===0?[r,r,r,p[3]]:(u=r*(1-a),f=r*(1-a*(o-(m=Math.floor(o)))),a=r*(1-a*(1+m-o)),o=m===1?(g=f,y=r,u):m===2?(g=u,y=r,a):m===3?(g=u,y=f,r):m===4?(g=a,y=u,r):m===5?(g=r,y=u,f):(g=r,y=a,u),[g,y,o,p[3]])},_hslaToHSBA:function(p){var m=p[0],u=p[1],f=p[2],g=f<.5?(1+u)*f:f+u-f*u;return[m,u=2*(g-f)/g,g,p[3]]},_hslaToRGBA:function(p){var m,u=6*p[0],f=p[1],g=p[2];return f===0?[g,g,g,p[3]]:[(m=function(y,o,a){return y<0?y+=6:6<=y&&(y-=6),y<1?o+(a-o)*y:y<3?a:y<4?o+(a-o)*(4-y):o})(2+u,f=2*g-(g=g<.5?(1+f)*g:g+f-g*f),g),m(u,f,g),m(u-2,f,g),p[3]]},_rgbaToHSBA:function(p){var m,u,f=p[0],g=p[1],y=p[2],o=Math.max(f,g,y),a=o-Math.min(f,g,y);return a==0?u=m=0:(u=a/o,f===o?m=(g-y)/a:g===o?m=2+(y-f)/a:y===o&&(m=4+(f-g)/a),m<0?m+=6:6<=m&&(m-=6)),[m/6,u,o,p[3]]},_rgbaToHSLA:function(p){var m,u,f=p[0],g=p[1],y=p[2],o=Math.max(f,g,y),r=Math.min(f,g,y),a=o+r,r=o-r;return r==0?u=m=0:(u=a<1?r/a:r/(2-a),f===o?m=(g-y)/r:g===o?m=2+(y-f)/r:y===o&&(m=4+(f-g)/r),m<0?m+=6:6<=m&&(m-=6)),[m/6,u,a/2,p[3]]}},t=t.default.ColorConversion,C.default=t},{"../core/main":283}],269:[function(t,W,C){"use strict";function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function m(o){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(a){return p(a)}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":p(a)})(o)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.map"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(y=t("../core/main"))&&y.__esModule?y:{default:y},f=(function(o){if(o&&o.__esModule)return o;if(o===null||m(o)!=="object"&&typeof o!="function")return{default:o};var a=g();if(a&&a.has(o))return a.get(o);var r,i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in o){var n;Object.prototype.hasOwnProperty.call(o,r)&&((n=s?Object.getOwnPropertyDescriptor(o,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=o[r])}return i.default=o,a&&a.set(o,i),i})(t("../core/constants"));function g(){var o;return typeof WeakMap!="function"?null:(o=new WeakMap,g=function(){return o},o)}t("./p5.Color"),t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),u.default.prototype.alpha=function(o){return u.default._validateParameters("alpha",arguments),this.color(o)._getAlpha()},u.default.prototype.blue=function(o){return u.default._validateParameters("blue",arguments),this.color(o)._getBlue()},u.default.prototype.brightness=function(o){return u.default._validateParameters("brightness",arguments),this.color(o)._getBrightness()},u.default.prototype.color=function(){for(var o,a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];return u.default._validateParameters("color",r),r[0]instanceof u.default.Color?r[0]:(o=Array.isArray(r[0])?r[0]:r,new u.default.Color(this,o))},u.default.prototype.green=function(o){return u.default._validateParameters("green",arguments),this.color(o)._getGreen()},u.default.prototype.hue=function(o){return u.default._validateParameters("hue",arguments),this.color(o)._getHue()},u.default.prototype.lerpColor=function(o,a,r){u.default._validateParameters("lerpColor",arguments),o instanceof u.default.Color||(o=color(o)),a instanceof u.default.Color||(a=color(a));var i,s,n,l=this._colorMode,c=this._colorMaxes;if(l===f.RGB)s=o.levels.map(function(d){return d/255}),n=a.levels.map(function(d){return d/255});else if(l===f.HSB)o._getBrightness(),a._getBrightness(),s=o.hsba,n=a.hsba;else{if(l!==f.HSL)throw new Error("".concat(l," cannot be used for interpolation."));o._getLightness(),a._getLightness(),s=o.hsla,n=a.hsla}return r=Math.max(Math.min(r,1),0),this.lerp===void 0&&(this.lerp=function(d,v,S){return S*(v-d)+d}),l===f.RGB?i=this.lerp(s[0],n[0],r):(.5<Math.abs(s[0]-n[0])&&(s[0]>n[0]?n[0]+=1:s[0]+=1),1<=(i=this.lerp(s[0],n[0],r))&&--i),o=this.lerp(s[1],n[1],r),a=this.lerp(s[2],n[2],r),s=this.lerp(s[3],n[3],r),i*=c[l][0],o*=c[l][1],a*=c[l][2],s*=c[l][3],this.color(i,o,a,s)},u.default.prototype.paletteLerp=function(o,a){var r=o[0];if(a<r[1])return this.color(r[0]);for(var i=1;i<o.length;i++){var s,n=o[i];if(a<n[1])return s=o[i-1],this.lerpColor(this.color(s[0]),this.color(n[0]),(a-s[1])/(n[1]-s[1]))}return this.color(o[o.length-1][0])},u.default.prototype.lightness=function(o){return u.default._validateParameters("lightness",arguments),this.color(o)._getLightness()},u.default.prototype.red=function(o){return u.default._validateParameters("red",arguments),this.color(o)._getRed()},u.default.prototype.saturation=function(o){return u.default._validateParameters("saturation",arguments),this.color(o)._getSaturation()};var y=u.default;C.default=y},{"../core/constants":272,"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"./p5.Color":270,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],270:[function(i,W,C){"use strict";function p(d){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(d)}function m(d){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(v){return p(v)}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":p(v)})(d)}i("core-js/modules/es.symbol"),i("core-js/modules/es.symbol.description"),i("core-js/modules/es.symbol.iterator"),i("core-js/modules/es.array.includes"),i("core-js/modules/es.array.iterator"),i("core-js/modules/es.array.join"),i("core-js/modules/es.array.map"),i("core-js/modules/es.array.slice"),i("core-js/modules/es.object.get-own-property-descriptor"),i("core-js/modules/es.object.to-string"),i("core-js/modules/es.regexp.constructor"),i("core-js/modules/es.regexp.exec"),i("core-js/modules/es.regexp.to-string"),i("core-js/modules/es.string.includes"),i("core-js/modules/es.string.iterator"),i("core-js/modules/es.string.trim"),i("core-js/modules/es.weak-map"),i("core-js/modules/web.dom-collections.iterator"),i("core-js/modules/es.array.includes"),i("core-js/modules/es.array.join"),i("core-js/modules/es.array.map"),i("core-js/modules/es.array.slice"),i("core-js/modules/es.object.to-string"),i("core-js/modules/es.regexp.constructor"),i("core-js/modules/es.regexp.exec"),i("core-js/modules/es.regexp.to-string"),i("core-js/modules/es.string.includes"),i("core-js/modules/es.string.trim"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=o(i("../core/main")),f=(function(d){if(d&&d.__esModule)return d;if(d===null||m(d)!=="object"&&typeof d!="function")return{default:d};var v=y();if(v&&v.has(d))return v.get(d);var S,E={},_=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(S in d){var x;Object.prototype.hasOwnProperty.call(d,S)&&((x=_?Object.getOwnPropertyDescriptor(d,S):null)&&(x.get||x.set)?Object.defineProperty(E,S,x):E[S]=d[S])}return E.default=d,v&&v.set(d,E),E})(i("../core/constants")),g=o(i("./color_conversion"));function y(){var d;return typeof WeakMap!="function"?null:(d=new WeakMap,y=function(){return d},d)}function o(d){return d&&d.__esModule?d:{default:d}}function a(d,v){for(var S=0;S<v.length;S++){var E=v[S];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(d,E.key,E)}}var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},i=/\s*/,c=/(\d{1,3})/,s=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,n=new RegExp("".concat(s.source,"%")),l={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX4:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,HEX8:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:new RegExp(["^rgb\\(",c.source,",",c.source,",",c.source,"\\)$"].join(i.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",n.source,",",n.source,",",n.source,"\\)$"].join(i.source),"i"),RGBA:new RegExp(["^rgba\\(",c.source,",",c.source,",",c.source,",",s.source,"\\)$"].join(i.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",n.source,",",n.source,",",n.source,",",s.source,"\\)$"].join(i.source),"i"),HSL:new RegExp(["^hsl\\(",c.source,",",n.source,",",n.source,"\\)$"].join(i.source),"i"),HSLA:new RegExp(["^hsla\\(",c.source,",",n.source,",",n.source,",",s.source,"\\)$"].join(i.source),"i"),HSB:new RegExp(["^hsb\\(",c.source,",",n.source,",",n.source,"\\)$"].join(i.source),"i"),HSBA:new RegExp(["^hsba\\(",c.source,",",n.source,",",n.source,",",s.source,"\\)$"].join(i.source),"i")},c=(u.default.Color=(function(){function d(_,x){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");if(this._storeModeAndMaxes(_._colorMode,_._colorMaxes),![f.RGB,f.HSL,f.HSB].includes(this.mode))throw new Error("".concat(this.mode," is an invalid colorMode."));this._array=d._parseInputs.apply(this,x),this._calculateLevels()}var v,S,E;return v=d,E=[{key:"_parseInputs",value:function(_,x,O,T){var P,M=arguments.length,F=this.mode,D=this.maxes[F],A=[];if(3<=M){for(A[0]=_/D[0],A[1]=x/D[1],A[2]=O/D[2],A[3]=typeof T=="number"?T/D[3]:1,P=A.length-1;0<=P;--P){var z=A[P];z<0?A[P]=0:1<z&&(A[P]=1)}return F===f.HSL?g.default._hslaToRGBA(A):F===f.HSB?g.default._hsbaToRGBA(A):A}if(M===1&&typeof _=="string"){if(O=_.trim().toLowerCase(),r[O])return d._parseInputs.call(this,r[O]);if(l.HEX3.test(O))return(A=l.HEX3.exec(O).slice(1).map(function(G){return parseInt(G+G,16)/255}))[3]=1,A;if(l.HEX6.test(O))return(A=l.HEX6.exec(O).slice(1).map(function(G){return parseInt(G,16)/255}))[3]=1,A;if(l.HEX4.test(O))return A=l.HEX4.exec(O).slice(1).map(function(G){return parseInt(G+G,16)/255});if(l.HEX8.test(O))return A=l.HEX8.exec(O).slice(1).map(function(G){return parseInt(G,16)/255});if(l.RGB.test(O))return(A=l.RGB.exec(O).slice(1).map(function(G){return G/255}))[3]=1,A;if(l.RGB_PERCENT.test(O))return(A=l.RGB_PERCENT.exec(O).slice(1).map(function(G){return parseFloat(G)/100}))[3]=1,A;if(l.RGBA.test(O))return A=l.RGBA.exec(O).slice(1).map(function(G,U){return U===3?parseFloat(G):G/255});if(l.RGBA_PERCENT.test(O))return A=l.RGBA_PERCENT.exec(O).slice(1).map(function(G,U){return U===3?parseFloat(G):parseFloat(G)/100});if(l.HSL.test(O)?(A=l.HSL.exec(O).slice(1).map(function(G,U){return U===0?parseInt(G,10)/360:parseInt(G,10)/100}))[3]=1:l.HSLA.test(O)&&(A=l.HSLA.exec(O).slice(1).map(function(G,U){return U===0?parseInt(G,10)/360:U===3?parseFloat(G):parseInt(G,10)/100})),(A=A.map(function(G){return Math.max(Math.min(G,1),0)})).length)return g.default._hslaToRGBA(A);if(l.HSB.test(O)?(A=l.HSB.exec(O).slice(1).map(function(G,U){return U===0?parseInt(G,10)/360:parseInt(G,10)/100}))[3]=1:l.HSBA.test(O)&&(A=l.HSBA.exec(O).slice(1).map(function(G,U){return U===0?parseInt(G,10)/360:U===3?parseFloat(G):parseInt(G,10)/100})),A.length){for(P=A.length-1;0<=P;--P)A[P]=Math.max(Math.min(A[P],1),0);return g.default._hsbaToRGBA(A)}A=[1,1,1,1]}else{if(M!==1&&M!==2||typeof _!="number")throw new Error("".concat(arguments,"is not a valid color representation."));A[0]=_/D[2],A[1]=_/D[2],A[2]=_/D[2],A[3]=typeof x=="number"?x/D[3]:1,A=A.map(function(G){return Math.max(Math.min(G,1),0)})}return A}}],(S=[{key:"toString",value:function(_){var x=this.levels,O=this._array,T=O[3];switch(_){case"#rrggbb":return"#".concat(x[0]<16?"0".concat(x[0].toString(16)):x[0].toString(16),x[1]<16?"0".concat(x[1].toString(16)):x[1].toString(16),x[2]<16?"0".concat(x[2].toString(16)):x[2].toString(16));case"#rrggbbaa":return"#".concat(x[0]<16?"0".concat(x[0].toString(16)):x[0].toString(16),x[1]<16?"0".concat(x[1].toString(16)):x[1].toString(16),x[2]<16?"0".concat(x[2].toString(16)):x[2].toString(16),x[3]<16?"0".concat(x[3].toString(16)):x[3].toString(16));case"#rgb":return"#".concat(Math.round(15*O[0]).toString(16),Math.round(15*O[1]).toString(16),Math.round(15*O[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*O[0]).toString(16),Math.round(15*O[1]).toString(16),Math.round(15*O[2]).toString(16),Math.round(15*O[3]).toString(16));case"rgb":return"rgb(".concat(x[0],", ",x[1],", ",x[2],")");case"rgb%":return"rgb(".concat((100*O[0]).toPrecision(3),"%, ",(100*O[1]).toPrecision(3),"%, ",(100*O[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*O[0]).toPrecision(3),"%, ",(100*O[1]).toPrecision(3),"%, ",(100*O[2]).toPrecision(3),"%, ",(100*O[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=g.default._rgbaToHSBA(this._array)),"hsb(".concat(this.hsba[0]*this.maxes[f.HSB][0],", ",this.hsba[1]*this.maxes[f.HSB][1],", ",this.hsba[2]*this.maxes[f.HSB][2],")");case"hsb%":case"hsv%":return this.hsba||(this.hsba=g.default._rgbaToHSBA(this._array)),"hsb(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%)");case"hsba":case"hsva":return this.hsba||(this.hsba=g.default._rgbaToHSBA(this._array)),"hsba(".concat(this.hsba[0]*this.maxes[f.HSB][0],", ",this.hsba[1]*this.maxes[f.HSB][1],", ",this.hsba[2]*this.maxes[f.HSB][2],", ",T,")");case"hsba%":case"hsva%":return this.hsba||(this.hsba=g.default._rgbaToHSBA(this._array)),"hsba(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%, ",(100*T).toPrecision(3),"%)");case"hsl":return this.hsla||(this.hsla=g.default._rgbaToHSLA(this._array)),"hsl(".concat(this.hsla[0]*this.maxes[f.HSL][0],", ",this.hsla[1]*this.maxes[f.HSL][1],", ",this.hsla[2]*this.maxes[f.HSL][2],")");case"hsl%":return this.hsla||(this.hsla=g.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%)");case"hsla":return this.hsla||(this.hsla=g.default._rgbaToHSLA(this._array)),"hsla(".concat(this.hsla[0]*this.maxes[f.HSL][0],", ",this.hsla[1]*this.maxes[f.HSL][1],", ",this.hsla[2]*this.maxes[f.HSL][2],", ",T,")");case"hsla%":return this.hsla||(this.hsla=g.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%, ",(100*T).toPrecision(3),"%)");default:return"rgba(".concat(x[0],",",x[1],",",x[2],",",T,")")}}},{key:"setRed",value:function(_){this._array[0]=_/this.maxes[f.RGB][0],this._calculateLevels()}},{key:"setGreen",value:function(_){this._array[1]=_/this.maxes[f.RGB][1],this._calculateLevels()}},{key:"setBlue",value:function(_){this._array[2]=_/this.maxes[f.RGB][2],this._calculateLevels()}},{key:"setAlpha",value:function(_){this._array[3]=_/this.maxes[this.mode][3],this._calculateLevels()}},{key:"_calculateLevels",value:function(){for(var _=this._array,x=this.levels=new Array(_.length),O=_.length-1;0<=O;--O)x[O]=Math.round(255*_[O]);this.hsla=null,this.hsba=null}},{key:"_getAlpha",value:function(){return this._array[3]*this.maxes[this.mode][3]}},{key:"_storeModeAndMaxes",value:function(_,x){this.mode=_,this.maxes=x}},{key:"_getMode",value:function(){return this.mode}},{key:"_getMaxes",value:function(){return this.maxes}},{key:"_getBlue",value:function(){return this._array[2]*this.maxes[f.RGB][2]}},{key:"_getBrightness",value:function(){return this.hsba||(this.hsba=g.default._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[f.HSB][2]}},{key:"_getGreen",value:function(){return this._array[1]*this.maxes[f.RGB][1]}},{key:"_getHue",value:function(){return this.mode===f.HSB?(this.hsba||(this.hsba=g.default._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[f.HSB][0]):(this.hsla||(this.hsla=g.default._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[f.HSL][0])}},{key:"_getLightness",value:function(){return this.hsla||(this.hsla=g.default._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[f.HSL][2]}},{key:"_getRed",value:function(){return this._array[0]*this.maxes[f.RGB][0]}},{key:"_getSaturation",value:function(){return this.mode===f.HSB?(this.hsba||(this.hsba=g.default._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[f.HSB][1]):(this.hsla||(this.hsla=g.default._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[f.HSL][1])}}])&&a(v.prototype,S),E&&a(v,E),d})(),u.default.Color);C.default=c},{"../core/constants":272,"../core/main":283,"./color_conversion":268,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],271:[function(t,W,C){"use strict";function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function m(o){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(a){return p(a)}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":p(a)})(o)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.fill"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(y=t("../core/main"))&&y.__esModule?y:{default:y},f=(function(o){if(o&&o.__esModule)return o;if(o===null||m(o)!=="object"&&typeof o!="function")return{default:o};var a=g();if(a&&a.has(o))return a.get(o);var r,i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in o){var n;Object.prototype.hasOwnProperty.call(o,r)&&((n=s?Object.getOwnPropertyDescriptor(o,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=o[r])}return i.default=o,a&&a.set(o,i),i})(t("../core/constants"));function g(){var o;return typeof WeakMap!="function"?null:(o=new WeakMap,g=function(){return o},o)}t("./p5.Color"),u.default.prototype.beginClip=function(){this._renderer.beginClip(0<arguments.length&&arguments[0]!==void 0?arguments[0]:{})},u.default.prototype.endClip=function(){this._renderer.endClip()},u.default.prototype.clip=function(o,a){this._renderer.beginClip(a),o(),this._renderer.endClip(a)},u.default.prototype.background=function(){var o;return(o=this._renderer).background.apply(o,arguments),this},u.default.prototype.clear=function(){return this._renderer.clear((arguments.length<=0?void 0:arguments[0])||0,(arguments.length<=1?void 0:arguments[1])||0,(arguments.length<=2?void 0:arguments[2])||0,(arguments.length<=3?void 0:arguments[3])||0),this},u.default.prototype.colorMode=function(o,a,r,i,s){return u.default._validateParameters("colorMode",arguments),o!==f.RGB&&o!==f.HSB&&o!==f.HSL||(this._colorMode=o,o=this._colorMaxes[o],arguments.length===2?(o[0]=a,o[1]=a,o[2]=a,o[3]=a):arguments.length===4?(o[0]=a,o[1]=r,o[2]=i):arguments.length===5&&(o[0]=a,o[1]=r,o[2]=i,o[3]=s)),this},u.default.prototype.fill=function(){var o;return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),(o=this._renderer).fill.apply(o,arguments),this},u.default.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},u.default.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},u.default.prototype.stroke=function(){var o;return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),(o=this._renderer).stroke.apply(o,arguments),this},u.default.prototype.erase=function(){return this._renderer.erase(0<arguments.length&&arguments[0]!==void 0?arguments[0]:255,1<arguments.length&&arguments[1]!==void 0?arguments[1]:255),this},u.default.prototype.noErase=function(){return this._renderer.noErase(),this};var y=u.default;C.default=y},{"../core/constants":272,"../core/main":283,"./p5.Color":270,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],272:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.QUADRATIC=C.LINEAR=C._CTX_MIDDLE=C._DEFAULT_LEADMULT=C._DEFAULT_TEXT_FILL=C.WORD=C.CHAR=C.BOLDITALIC=C.BOLD=C.ITALIC=C.NORMAL=C.BLUR=C.ERODE=C.DILATE=C.POSTERIZE=C.INVERT=C.OPAQUE=C.GRAY=C.THRESHOLD=C.BURN=C.DODGE=C.SOFT_LIGHT=C.HARD_LIGHT=C.OVERLAY=C.REPLACE=C.SCREEN=C.MULTIPLY=C.EXCLUSION=C.SUBTRACT=C.DIFFERENCE=C.LIGHTEST=C.DARKEST=C.ADD=C.REMOVE=C.BLEND=C.UP_ARROW=C.TAB=C.SHIFT=C.RIGHT_ARROW=C.RETURN=C.OPTION=C.LEFT_ARROW=C.ESCAPE=C.ENTER=C.DOWN_ARROW=C.DELETE=C.CONTROL=C.BACKSPACE=C.ALT=C.AUTO=C.HSL=C.HSB=C.RGB=C.MITER=C.BEVEL=C.ROUND=C.SQUARE=C.PROJECT=C.PIE=C.CHORD=C.OPEN=C.CLOSE=C.TESS=C.QUAD_STRIP=C.QUADS=C.TRIANGLE_STRIP=C.TRIANGLE_FAN=C.TRIANGLES=C.LINE_LOOP=C.LINE_STRIP=C.LINES=C.POINTS=C.BASELINE=C.BOTTOM=C.TOP=C.CENTER=C.LEFT=C.RIGHT=C.RADIUS=C.CORNERS=C.CORNER=C.RAD_TO_DEG=C.DEG_TO_RAD=C.RADIANS=C.DEGREES=C.TWO_PI=C.TAU=C.QUARTER_PI=C.PI=C.HALF_PI=C.WAIT=C.TEXT=C.MOVE=C.HAND=C.CROSS=C.ARROW=C.WEBGL2=C.WEBGL=C.P2D=C.VERSION=void 0,C.RGBA=C.HALF_FLOAT=C.FLOAT=C.UNSIGNED_INT=C.UNSIGNED_BYTE=C.COVER=C.CONTAIN=C.FALLBACK=C.LABEL=C.AXES=C.GRID=C._DEFAULT_FILL=C._DEFAULT_STROKE=C.PORTRAIT=C.LANDSCAPE=C.SMOOTH=C.FLAT=C.MIRROR=C.CLAMP=C.REPEAT=C.NEAREST=C.IMAGE=C.IMMEDIATE=C.TEXTURE=C.FILL=C.STROKE=C.CURVE=C.BEZIER=void 0;var p=Math.PI,m=(C.VERSION="1.11.11",C.P2D="p2d",C.WEBGL="webgl",C.WEBGL2="webgl2",C.ARROW="default",C.CROSS="crosshair",C.HAND="pointer",C.MOVE="move",C.TEXT="text",C.WAIT="wait",p/2),m=(C.HALF_PI=m,p),m=(C.PI=m,p/4),m=(C.QUARTER_PI=m,2*p),m=(C.TAU=m,2*p),m=(C.TWO_PI=m,C.DEGREES="degrees",C.RADIANS="radians",p/180),m=(C.DEG_TO_RAD=m,180/p);C.RAD_TO_DEG=m,C.CORNER="corner",C.CORNERS="corners",C.RADIUS="radius",C.RIGHT="right",C.LEFT="left",C.CENTER="center",C.TOP="top",C.BOTTOM="bottom",C.BASELINE="alphabetic",C.POINTS=0,C.LINES=1,C.LINE_STRIP=3,C.LINE_LOOP=2,C.TRIANGLES=4,C.TRIANGLE_FAN=6,C.TRIANGLE_STRIP=5,C.QUADS="quads",C.QUAD_STRIP="quad_strip",C.TESS="tess",C.CLOSE="close",C.OPEN="open",C.CHORD="chord",C.PIE="pie",C.PROJECT="square",C.SQUARE="butt",C.ROUND="round",C.BEVEL="bevel",C.MITER="miter",C.RGB="rgb",C.HSB="hsb",C.HSL="hsl",C.AUTO="auto",C.ALT=18,C.BACKSPACE=8,C.CONTROL=17,C.DELETE=46,C.DOWN_ARROW=40,C.ENTER=13,C.ESCAPE=27,C.LEFT_ARROW=37,C.OPTION=18,C.RETURN=13,C.RIGHT_ARROW=39,C.SHIFT=16,C.TAB=9,C.UP_ARROW=38,C.BLEND="source-over",C.REMOVE="destination-out",C.ADD="lighter",C.DARKEST="darken",C.LIGHTEST="lighten",C.DIFFERENCE="difference",C.SUBTRACT="subtract",C.EXCLUSION="exclusion",C.MULTIPLY="multiply",C.SCREEN="screen",C.REPLACE="copy",C.OVERLAY="overlay",C.HARD_LIGHT="hard-light",C.SOFT_LIGHT="soft-light",C.DODGE="color-dodge",C.BURN="color-burn",C.THRESHOLD="threshold",C.GRAY="gray",C.OPAQUE="opaque",C.INVERT="invert",C.POSTERIZE="posterize",C.DILATE="dilate",C.ERODE="erode",C.BLUR="blur",C.NORMAL="normal",C.ITALIC="italic",C.BOLD="bold",C.BOLDITALIC="bold italic",C.CHAR="CHAR",C.WORD="WORD",C._DEFAULT_TEXT_FILL="#000000",C._DEFAULT_LEADMULT=1.25,C._CTX_MIDDLE="middle",C.LINEAR="linear",C.QUADRATIC="quadratic",C.BEZIER="bezier",C.CURVE="curve",C.STROKE="stroke",C.FILL="fill",C.TEXTURE="texture",C.IMMEDIATE="immediate",C.IMAGE="image",C.NEAREST="nearest",C.REPEAT="repeat",C.CLAMP="clamp",C.MIRROR="mirror",C.FLAT="flat",C.SMOOTH="smooth",C.LANDSCAPE="landscape",C.PORTRAIT="portrait",C._DEFAULT_STROKE="#000000",C._DEFAULT_FILL="#FFFFFF",C.GRID="grid",C.AXES="axes",C.LABEL="label",C.FALLBACK="fallback",C.CONTAIN="contain",C.COVER="cover",C.UNSIGNED_BYTE="unsigned-byte",C.UNSIGNED_INT="unsigned-int",C.FLOAT="float",C.HALF_FLOAT="half-float",C.RGBA="rgba"},{}],273:[function(t,W,C){"use strict";function p(s){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function m(s){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(n){return p(n)}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":p(n)})(s)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.search"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.search"),t("core-js/modules/es.string.split"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(f=t("./main"))&&f.__esModule?f:{default:f},f=(function(s){if(s&&s.__esModule)return s;if(s===null||m(s)!=="object"&&typeof s!="function")return{default:s};var n=g();if(n&&n.has(s))return n.get(s);var l,c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(l in s){var v;Object.prototype.hasOwnProperty.call(s,l)&&((v=d?Object.getOwnPropertyDescriptor(s,l):null)&&(v.get||v.set)?Object.defineProperty(c,l,v):c[l]=s[l])}return c.default=s,n&&n.set(s,c),c})(t("./constants"));function g(){var s;return typeof WeakMap!="function"?null:(s=new WeakMap,g=function(){return s},s)}var y=[f.ARROW,f.CROSS,f.HAND,f.MOVE,f.TEXT,f.WAIT],o=(u.default.prototype._frameRate=0,u.default.prototype._lastFrameTime=window.performance.now(),u.default.prototype._targetFrameRate=60,window.print),a=!1;function r(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function i(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}u.default.prototype.print=function(){var s;arguments.length?(s=console).log.apply(s,arguments):a||(o(),window.confirm("You just tried to print the webpage. Do you want to prevent this from running again?")&&(a=!0))},u.default.prototype.frameCount=0,u.default.prototype.deltaTime=0,u.default.prototype.focused=document.hasFocus(),u.default.prototype.cursor=function(s,n,l){var c,d="auto",v=this._curElement.elt;y.includes(s)?d=s:typeof s=="string"&&(c="",n&&l&&typeof n=="number"&&typeof l=="number"&&(c="".concat(n," ").concat(l)),d=s.substring(0,7)==="http://"||s.substring(0,8)==="https://"||/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(s)?"url(".concat(s,") ").concat(c,", auto"):s),v.style.cursor=d},u.default.prototype.frameRate=function(s){return u.default._validateParameters("frameRate",arguments),typeof s!="number"||s<0?this._frameRate:(this._setProperty("_targetFrameRate",s),s===0&&this._setProperty("_frameRate",s),this)},u.default.prototype.getFrameRate=function(){return this.frameRate()},u.default.prototype.setFrameRate=function(s){return this.frameRate(s)},u.default.prototype.getTargetFrameRate=function(){return this._targetFrameRate},u.default.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},u.default.prototype.webglVersion=f.P2D,u.default.prototype.displayWidth=screen.width,u.default.prototype.displayHeight=screen.height,u.default.prototype.windowWidth=0,u.default.prototype.windowHeight=0,u.default.prototype._onresize=function(s){this._setProperty("windowWidth",r()),this._setProperty("windowHeight",i());var n=this._isGlobal?window:this;typeof n.windowResized!="function"||(n=n.windowResized(s))===void 0||n||s.preventDefault()},u.default.prototype._updateWindowSize=function(){this._setProperty("windowWidth",r()),this._setProperty("windowHeight",i())},u.default.prototype.width=0,u.default.prototype.height=0,u.default.prototype.fullscreen=function(s){if(u.default._validateParameters("fullscreen",arguments),s===void 0)return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;if(s){if(s=document.documentElement,!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw new Error("Fullscreen not enabled in this browser.");s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.msRequestFullscreen&&s.msRequestFullscreen()}else document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},u.default.prototype.pixelDensity=function(s){var n;return u.default._validateParameters("pixelDensity",arguments),typeof s=="number"?(s!==this._pixelDensity&&(this._pixelDensity=this._maxAllowedPixelDimensions=s),(n=this).resizeCanvas(this.width,this.height,!0)):n=this._pixelDensity,n},u.default.prototype.displayDensity=function(){return window.devicePixelRatio},u.default.prototype.getURL=function(){return location.href},u.default.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(s){return s!==""})},u.default.prototype.getURLParams=function(){for(var s,n=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,l={};(s=n.exec(location.search))!=null;)s.index===n.lastIndex&&n.lastIndex++,l[s[1]]=s[2];return l},t=u.default,C.default=t},{"./constants":272,"./main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.search":205,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],274:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.starts-with"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.starts-with"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(y=t("../main"))&&y.__esModule?y:{default:y};t("../internationalization");function m(o,a){a=a||console.log.bind(console),u||g(),u.some(function(r){var i;if(o.message&&o.message.match("\\W?".concat(r.name,"\\W"))!==null)return i=r.type==="function"?"".concat(r.name,"()"):r.name,a("Did you just try to use p5.js's ".concat(i," ").concat(r.type,`? If so, you may want to move it into your sketch's setup() function.

For more details, see: `).concat(f)),!0})}var u=null,g=null,f=(p.default._friendlyError=p.default._checkForUserDefinedFunctions=p.default._fesErrorMonitor=function(){},u=null,"https://github.com/processing/p5.js/wiki/p5.js-overview#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup"),g=function(){function o(r){return Object.getOwnPropertyNames(r).filter(function(i){return i[0]!=="_"&&!(i in a)&&(a[i]=!0)}).map(function(i){var s=typeof r[i]=="function"?"function":i===i.toUpperCase()?"constant":"variable";return{name:i,type:s}})}var a={};(u=[].concat(o(p.default.prototype),o(t("../constants")))).sort(function(r,i){return i.name.length-r.name.length})},y=(p.default.prototype._helpForMisusedAtTopLevelCode=m,document.readyState!=="complete"&&(window.addEventListener("error",m,!1),window.addEventListener("load",function(){window.removeEventListener("error",m,!1)})),p.default);C.default=y},{"../constants":272,"../internationalization":281,"../main":283,"./browser_errors":void 0,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.some":170,"core-js/modules/es.function.name":174,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-names":187,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.starts-with":207,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],275:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(p=t("../main"))&&p.__esModule?p:{default:p};t("../internationalization"),p.default._friendlyFileLoadError=function(){},t=p.default,C.default=t},{"../internationalization":281,"../main":283}],276:[function(t,W,C){"use strict";function p(j){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(j)}function m(j){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(R){return p(R)}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":p(R)})(j)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=G(t("../main")),f=t("../internationalization"),g=z(t("../constants")),y,o,a,r,i,s,n,l,c,d,v,S,E,_,x,O,T,P,M,F,D;function A(){var j;return typeof WeakMap!="function"?null:(j=new WeakMap,A=function(){return j},j)}function z(j){if(j&&j.__esModule)return j;if(j===null||m(j)!=="object"&&typeof j!="function")return{default:j};var R=A();if(R&&R.has(j))return R.get(j);var N,X,K={},re=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(N in j)Object.prototype.hasOwnProperty.call(j,N)&&((X=re?Object.getOwnPropertyDescriptor(j,N):null)&&(X.get||X.set)?Object.defineProperty(K,N,X):K[N]=j[N]);return K.default=j,R&&R.set(j,K),K}function G(j){return j&&j.__esModule?j:{default:j}}function U(j){return oe(j)||Y(j)||H()}function H(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Y(j){if(Symbol.iterator in Object(j)||Object.prototype.toString.call(j)==="[object Arguments]")return Array.from(j)}function oe(j){if(Array.isArray(j)){for(var R=0,N=new Array(j.length);R<j.length;R++)N[R]=j[R];return N}}u.default._fesCodeReader=function(){};var L=u.default;C.default=L},{"../constants":272,"../internationalization":281,"../main":283,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],277:[function(t,W,C){"use strict";t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../main"))&&t.__esModule?t:{default:t};function p(){var m=/(^|@)\S+:\d+/,u=/^\s*at .*(\S+:\d+|\(native\))/m,f=/^(eval@)?(\[native code])?$/;return{parse:function(g){return g.stacktrace!==void 0||g["opera#sourceloc"]!==void 0?this.parseOpera(g):g.stack&&g.stack.match(u)?this.parseV8OrIE(g):g.stack?this.parseFFOrSafari(g):void 0},extractLocation:function(g){return g.indexOf(":")===-1?[g]:[(g=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(g.replace(/[()]/g,"")))[1],g[2]||void 0,g[3]||void 0]},parseV8OrIE:function(g){return g.stack.split(`
`).filter(function(y){return!!y.match(u)},this).map(function(y){var o=(y=-1<y.indexOf("(eval ")?y.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""):y).replace(/^\s+/,"").replace(/\(eval code/g,"("),a=o.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(o=a?o.replace(a[0],""):o).split(/\s+/).slice(1),a=this.extractLocation(a?a[1]:o.pop());return{functionName:o.join(" ")||void 0,fileName:-1<["eval","<anonymous>"].indexOf(a[0])?void 0:a[0],lineNumber:a[1],columnNumber:a[2],source:y}},this)},parseFFOrSafari:function(g){return g.stack.split(`
`).filter(function(y){return!y.match(f)},this).map(function(y){var o,a;return(y=-1<y.indexOf(" > eval")?y.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1"):y).indexOf("@")===-1&&y.indexOf(":")===-1?{functionName:y}:{functionName:(a=y.match(o=/((.*".+"[^@]*)?[^@]*)(?:@)/))&&a[1]?a[1]:void 0,fileName:(a=this.extractLocation(y.replace(o,"")))[0],lineNumber:a[1],columnNumber:a[2],source:y}},this)},parseOpera:function(g){return!g.stacktrace||-1<g.message.indexOf(`
`)&&g.message.split(`
`).length>g.stacktrace.split(`
`).length?this.parseOpera9(g):g.stack?this.parseOpera11(g):this.parseOpera10(g)},parseOpera9:function(g){for(var y=/Line (\d+).*script (?:in )?(\S+)/i,o=g.message.split(`
`),a=[],r=2,i=o.length;r<i;r+=2){var s=y.exec(o[r]);s&&a.push({fileName:s[2],lineNumber:s[1],source:o[r]})}return a},parseOpera10:function(g){for(var y=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,o=g.stacktrace.split(`
`),a=[],r=0,i=o.length;r<i;r+=2){var s=y.exec(o[r]);s&&a.push({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:o[r]})}return a},parseOpera11:function(g){return g.stack.split(`
`).filter(function(y){return!!y.match(m)&&!y.match(/^Error created at/)},this).map(function(y){var o,r=y.split("@"),a=this.extractLocation(r.pop()),r=r.shift()||"";return{functionName:r.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,args:(o=r.match(/\(([^)]*)\)/)?r.replace(/^[^(]+\(([^)]*)\)$/,"$1"):o)===void 0||o==="[arguments not available]"?void 0:o.split(","),fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:y}},this)}}}t.default._getErrorStackParser=function(){return new p},t=t.default,C.default=t},{"../main":283,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.match":201,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206}],278:[function(t,W,C){"use strict";function p(g){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(g)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var m=(m=t("../main"))&&m.__esModule?m:{default:m};(function(g){if(!(g&&g.__esModule)&&!(g===null||f(g)!=="object"&&typeof g!="function")){var y=u();if(y&&y.has(g))return y.get(g);var o,a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in g){var i;Object.prototype.hasOwnProperty.call(g,o)&&((i=r?Object.getOwnPropertyDescriptor(g,o):null)&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=g[o])}a.default=g,y&&y.set(g,a)}})(t("../constants")),t("../internationalization");function u(){var g;return typeof WeakMap!="function"?null:(g=new WeakMap,u=function(){return g},g)}function f(g){return(f=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(y){return p(y)}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":p(y)})(g)}m.default._validateParameters=m.default._clearValidateParamsCache=function(){},t=m.default,C.default=t},{"../../../docs/parameterData.json":void 0,"../constants":272,"../internationalization":281,"../main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.function.name":174,"core-js/modules/es.map":175,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],279:[function(t,W,C){"use strict";function p(g){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(g)}function m(g){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(y){return p(y)}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":p(y)})(g)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(function(g){if(g&&g.__esModule)return g;if(g===null||m(g)!=="object"&&typeof g!="function")return{default:g};var y=f();if(y&&y.has(g))return y.get(g);var o,a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in g){var i;Object.prototype.hasOwnProperty.call(g,o)&&((i=r?Object.getOwnPropertyDescriptor(g,o):null)&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=g[o])}return a.default=g,y&&y.set(g,a),a})(t("./constants"));function f(){var g;return typeof WeakMap!="function"?null:(g=new WeakMap,f=function(){return g},g)}C.default={modeAdjust:function(g,y,o,a,r){var i;return r===u.CORNER?i={x:g,y,w:Math.abs(o),h:Math.abs(a)}:r===u.CORNERS?i={x:Math.min(g,o),y:Math.min(y,a),w:Math.abs(o-g),h:Math.abs(a-y)}:r===u.RADIUS?i={x:g-(o=Math.abs(o)),y:y-(a=Math.abs(a)),w:2*o,h:2*a}:r===u.CENTER&&(i={x:g-.5*(o=Math.abs(o)),y:y-.5*(a=Math.abs(a)),w:o,h:a}),i}}},{"./constants":272,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],280:[function(t,W,C){"use strict";t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator");var p=(m=t("../core/main"))&&m.__esModule?m:{default:m};t("./internationalization");var m=Promise.resolve();Promise.all([new Promise(function(u,f){document.readyState==="complete"?u():window.addEventListener("load",u,!1)}),m]).then(function(){var u;window._setupDone!==void 0?console.warn("p5.js seems to have been imported multiple times. Please remove the duplicate import"):window.mocha||(u=new Event("p5Ready"),window.dispatchEvent(u),(window.setup&&typeof window.setup=="function"||window.draw&&typeof window.draw=="function")&&!p.default.instance&&new p.default)})},{"../core/main":283,"./internationalization":281,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.string.iterator":200,"core-js/modules/web.dom-collections.iterator":246}],281:[function(t,W,C){"use strict";t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.setTranslatorLanguage=C.currentTranslatorLanguage=C.availableTranslatorLanguages=C.initialize=C.translator=void 0;var p,m,u=y(t("i18next")),f=y(t("i18next-browser-languagedetector")),g=t("./constants");function y(r){return r&&r.__esModule?r:{default:r}}function o(r,i){for(var s=0;s<i.length;s++){var n=i[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}var a=(function(){function r(l,c){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.init(l,c)}var i,s,n;return i=r,(s=[{key:"fetchWithTimeout",value:function(l,c){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:2e3;return Promise.race([fetch(l,c),new Promise(function(v,S){return setTimeout(function(){return S(new Error("timeout"))},d)})])}},{key:"init",value:function(l){var c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};this.services=l,this.options=c}},{key:"read",value:function(l,c,d){var v=this.options.loadPath;l===this.options.fallback?d(null,p[l][c]):m.includes(l)?(v=this.services.interpolator.interpolate(v,{lng:l,ns:c}),this.loadUrl(v,d)):d("Not found",!1)}},{key:"loadUrl",value:function(l,c){this.fetchWithTimeout(l).then(function(d){if(d.ok)return d.json();throw new Error("failed loading ".concat(l))},function(){throw new Error("failed loading ".concat(l))}).then(function(d){return c(null,d)}).catch(c)}}])&&o(i.prototype,s),n&&o(i,n),r})();a.type="backend",C.translator=function(r,i){console.debug("p5.js translator called before translations were loaded"),u.default.t(r,i)},C.initialize=function(){return u.default.use(f.default).use(a).init({fallbackLng:"en",nestingPrefix:"$tr(",nestingSuffix:")",defaultNS:"translation",returnEmptyString:!1,interpolation:{escapeValue:!1},detection:{checkWhitelist:!1,order:["querystring","navigator","htmlTag","path","subdomain"],caches:[]},backend:{fallback:"en",loadPath:"https://cdn.jsdelivr.net/npm/p5@".concat(g.VERSION.replace(/^(\d+\.\d+)\.\d+.*$/,"$1"),"/translations/{{lng}}/{{ns}}.json")},partialBundledLanguages:!0,resources:p}).then(function(r){C.translator=r},function(r){return console.debug("Translations failed to load (".concat(r,")"))})},C.availableTranslatorLanguages=function(){return u.default.languages},C.currentTranslatorLanguage=function(r){return u.default.language},C.setTranslatorLanguage=function(r){return u.default.changeLanguage(r||void 0,function(i){return console.debug("Translations failed to load (".concat(i,")"))})}},{"../../translations":void 0,"../../translations/dev":void 0,"./constants":272,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/web.dom-collections.iterator":246,i18next:3,"i18next-browser-languagedetector":3}],282:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("./main"))&&t.__esModule?t:{default:t},t.default.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},t.default.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},t.default.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},t.default.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")},t=t.default,C.default=t},{"./main":283}],283:[function(t,W,C){"use strict";function p(a){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(a)}function m(a){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(r){return p(r)}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":p(r)})(a)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t("./shim");var u=(function(a){if(a&&a.__esModule)return a;if(a===null||m(a)!=="object"&&typeof a!="function")return{default:a};var r=f();if(r&&r.has(a))return r.get(a);var i,s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in a){var l;Object.prototype.hasOwnProperty.call(a,i)&&((l=n?Object.getOwnPropertyDescriptor(a,i):null)&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=a[i])}return s.default=a,r&&r.set(a,s),s})(t("./constants"));function f(){var a;return typeof WeakMap!="function"?null:(a=new WeakMap,f=function(){return a},a)}function g(a,r){for(var i=0;i<r.length;i++){var s=r[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}var y,o=(function(){function a(n,d){var c=this;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this._isGlobal=!n,this._setupDone=!1,this._preloadDone=!1,this._pixelDensity=Math.ceil(window.devicePixelRatio)||1,this._maxAllowedPixelDimensions=0,this._userNode=d,this._curElement=null,this._elements=[],this._glAttributes=null,this._requestAnimId=0,this._preloadCount=0,this._loop=!0,this._startListener=null,this._initializeInstanceVariables(),this._defaultCanvasSize={width:100,height:100},this._events={mousemove:null,mousedown:null,mouseup:null,dragend:null,dragover:null,click:null,dblclick:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,touchstart:null,touchmove:null,touchend:null,resize:null,blur:null},this._millisStart=-1,this._recording=!1,this.touchstart=!1,this.touchend=!1,this._lcg_random_state=null,this._gaussian_previous=!1,this._events.wheel=null,this._loadingScreenId="p5_loading",this._registeredMethods={};var d=Object.getOwnPropertyNames(a.prototype._registeredMethods),v=!0,S=!1,E=void 0;try{for(var _,x=d[Symbol.iterator]();!(v=(_=x.next()).done);v=!0){var O=_.value;this._registeredMethods[O]=a.prototype._registeredMethods[O].slice()}}catch(U){S=!0,E=U}finally{try{v||x.return==null||x.return()}finally{if(S)throw E}}window.DeviceOrientationEvent&&(this._events.deviceorientation=null),window.DeviceMotionEvent&&!window._isNodeWebkit&&(this._events.devicemotion=null),a.prototype.callRegisteredHooksFor=function(U){var H=this||a.prototype,Y=this._isGlobal?window:this;if(H._registeredMethods.hasOwnProperty(U)){var H=H._registeredMethods[U],oe=!0,U=!1,L=void 0;try{for(var j,R=H[Symbol.iterator]();!(oe=(j=R.next()).done);oe=!0){var N=j.value;typeof N=="function"&&N.call(Y)}}catch(re){U=!0,L=re}finally{try{oe||R.return==null||R.return()}finally{if(U)throw L}}}},this._start=function(){c._userNode&&typeof c._userNode=="string"&&(c._userNode=document.getElementById(c._userNode));var U=c._isGlobal?window:c;if(U.preload){c.callRegisteredHooksFor("beforePreload");var H,Y=document.getElementById(c._loadingScreenId),oe=(Y||((Y=document.createElement("div")).innerHTML="Loading...",Y.style.position="absolute",Y.id=c._loadingScreenId,(c._userNode||document.body).appendChild(Y)),c._preloadMethods);for(H in oe){oe[H]=oe[H]||a;var L=oe[H];L!==a.prototype&&L!==a||(c._isGlobal&&(window[H]=c._wrapPreload(c,H)),L=c),c._registeredPreloadMethods[H]=L[H],L[H]=c._wrapPreload(L,H)}U.preload(),c._runIfPreloadsAreDone()}else c._setup(),c._recording||c._draw()},this._runIfPreloadsAreDone=function(){var U,H=this._isGlobal?window:this;H._preloadCount===0&&((U=document.getElementById(H._loadingScreenId))&&U.parentNode.removeChild(U),this.callRegisteredHooksFor("afterPreload"),this._setupDone||(this._lastTargetFrameTime=window.performance.now(),this._lastRealFrameTime=window.performance.now(),H._setup(),this._recording||H._draw()))},this._decrementPreload=function(){var U=this._isGlobal?window:this;U._preloadDone||typeof U.preload!="function"||(U._setProperty("_preloadCount",U._preloadCount-1),U._runIfPreloadsAreDone())},this._wrapPreload=function(U,H){var Y=this;return function(){Y._incrementPreload();for(var oe=arguments.length,L=new Array(oe),j=0;j<oe;j++)L[j]=arguments[j];return Y._registeredPreloadMethods[H].apply(U,L)}},this._incrementPreload=function(){var U=this._isGlobal?window:this;U._preloadDone||U._setProperty("_preloadCount",U._preloadCount+1)},this._setup=function(){c.callRegisteredHooksFor("beforeSetup"),c.createCanvas(c._defaultCanvasSize.width,c._defaultCanvasSize.height,"p2d");var U=c._isGlobal?window:c;if(typeof U.preload=="function")for(var H in c._preloadMethods)U[H]=c._preloadMethods[H][H],U[H]&&c&&(U[H]=U[H].bind(c));c._millisStart=window.performance.now(),U._preloadDone=!0,typeof U.setup=="function"&&U.setup();var Y=document.getElementsByTagName("canvas"),oe=!0,L=!1,j=void 0;try{for(var R,N=Y[Symbol.iterator]();!(oe=(R=N.next()).done);oe=!0){var X=R.value;X.dataset.hidden==="true"&&(X.style.visibility="",delete X.dataset.hidden)}}catch(K){L=!0,j=K}finally{try{oe||N.return==null||N.return()}finally{if(L)throw j}}c._lastTargetFrameTime=window.performance.now(),c._lastRealFrameTime=window.performance.now(),c._setupDone=!0,(c._accessibleOutputs.grid||c._accessibleOutputs.text)&&c._updateAccsOutput(),c.callRegisteredHooksFor("afterSetup")},this._draw=function(H){var H=H||window.performance.now(),Y=H-c._lastTargetFrameTime,oe=1e3/c._targetFrameRate;(!c._loop||oe-5<=Y)&&(c.deltaTime=H-c._lastRealFrameTime,c._setProperty("deltaTime",c.deltaTime),c._frameRate=1e3/c.deltaTime,c.redraw(),c._lastTargetFrameTime=Math.max(c._lastTargetFrameTime+oe,H),c._lastRealFrameTime=H,c._updateMouseCoords!==void 0&&(c._updateMouseCoords(),c._setProperty("movedX",0),c._setProperty("movedY",0))),c._loop&&(c._requestAnimId=window.requestAnimationFrame(c._draw))},this._setProperty=function(U,H){c[U]=H,c._isGlobal&&(window[U]=H)},this.remove=function(){c._startListener&&window.removeEventListener("load",c._startListener,!1);var U=document.getElementById(c._loadingScreenId);if(U&&(U.parentNode.removeChild(U),c._incrementPreload()),c._curElement){for(var H in c._loop=!1,c._requestAnimId&&window.cancelAnimationFrame(c._requestAnimId),c._events)window.removeEventListener(H,c._events[H]);var Y=!0,U=!1,oe=void 0;try{for(var L,j=c._elements[Symbol.iterator]();!(Y=(L=j.next()).done);Y=!0){var R,N=L.value;for(R in N.elt&&N.elt.parentNode&&N.elt.parentNode.removeChild(N.elt),N._events)N.elt.removeEventListener(R,N._events[R])}}catch(ee){U=!0,oe=ee}finally{try{Y||j.return==null||j.return()}finally{if(U)throw oe}}var X=c;c._registeredMethods.remove.forEach(function(ee){ee!==void 0&&ee.call(X)})}if(c._isGlobal){for(var K in a.prototype)try{delete window[K]}catch{window[K]=void 0}for(var re in c)if(c.hasOwnProperty(re))try{delete window[re]}catch{window[re]=void 0}a.instance=null}};var T,P,M=this._createFriendlyGlobalFunctionBinder();if(this._isGlobal){for(var F in a.instance=this,a.prototype)typeof a.prototype[F]=="function"?(T=F.substring(2),this._events.hasOwnProperty(T)||(Math.hasOwnProperty(F)&&Math[F]===a.prototype[F]?M(F,a.prototype[F]):M(F,a.prototype[F].bind(this)))):M(F,a.prototype[F]);for(var D in this)this.hasOwnProperty(D)&&M(D,this[D])}else n(this),a._checkForUserDefinedFunctions(this);for(P in this._updateWindowSize(),this.callRegisteredHooksFor("init"),this._setupPromisePreloads(),this._events){var A=this["_on".concat(P)];A&&(A=A.bind(this),window.addEventListener(P,A,{passive:!1}),this._events[P]=A)}function z(){c._setProperty("focused",!0)}function G(){c._setProperty("focused",!1)}window.addEventListener("focus",z),window.addEventListener("blur",G),this.registerMethod("remove",function(){window.removeEventListener("focus",z),window.removeEventListener("blur",G)}),document.readyState==="complete"?this._start():(this._startListener=this._start.bind(this),window.addEventListener("load",this._startListener,!1))}var r,i,s;return r=a,(i=[{key:"_initializeInstanceVariables",value:function(){this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1},this._styles=[],this._bezierDetail=20,this._curveDetail=20,this._colorMode=u.RGB,this._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},this._downKeys={}}},{key:"registerPreloadMethod",value:function(n,l){a.prototype._preloadMethods.hasOwnProperty(n)||(a.prototype._preloadMethods[n]=l)}},{key:"registerMethod",value:function(n,l){var c=this||a.prototype;c._registeredMethods.hasOwnProperty(n)||(c._registeredMethods[n]=[]),c._registeredMethods[n].push(l)}},{key:"unregisterMethod",value:function(n,l){var c=this||a.prototype;if(c._registeredMethods.hasOwnProperty(n)){for(var d=c._registeredMethods[n],v=[],S=0;S<d.length;S++)d[S]===l&&v.push(S);for(var E=v.length-1;0<=E;E--)d.splice(v[E],1)}}},{key:"_createFriendlyGlobalFunctionBinder",value:function(){var n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},l=n.globalObject||window;return n.log||console.log.bind(console),function(c,d){a.disableFriendlyErrors,l[c]=d}}}])&&g(r.prototype,i),s&&g(r,s),a})();for(y in o.instance=null,o.disableFriendlyErrors=!1,u)o.prototype[y]=u[y];o.VERSION=u.VERSION,o.prototype._preloadMethods={loadJSON:o.prototype,loadImage:o.prototype,loadStrings:o.prototype,loadXML:o.prototype,loadBytes:o.prototype,loadTable:o.prototype,loadFont:o.prototype,loadModel:o.prototype,loadShader:o.prototype},o.prototype._registeredMethods={init:[],pre:[],post:[],remove:[]},o.prototype._registeredPreloadMethods={},C.default=o},{"./constants":272,"./shim":294,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-own-property-names":187,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],284:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("./main"))&&t.__esModule?t:{default:t};function m(u,f){for(var g=0;g<f.length;g++){var y=f[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(u,y.key,y)}}p.default.Element=(function(){function u(o,a){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.elt=o,this._pInst=this._pixelsState=a,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight}var f,g,y;return f=u,y=[{key:"_adjustListener",value:function(o,a,r){return a===!1?p.default.Element._detachListener(o,r):p.default.Element._attachListener(o,a,r),this}},{key:"_attachListener",value:function(o,a,r){r._events[o]&&p.default.Element._detachListener(o,r),a=a.bind(r),r.elt.addEventListener(o,a,!1),r._events[o]=a}},{key:"_detachListener",value:function(o,a){var r=a._events[o];a.elt.removeEventListener(o,r,!1),a._events[o]=null}}],(g=[{key:"parent",value:function(o){return o===void 0?this.elt.parentNode:(typeof o=="string"?(o[0]==="#"&&(o=o.substring(1)),o=document.getElementById(o)):o instanceof p.default.Element&&(o=o.elt),o.appendChild(this.elt),this)}},{key:"id",value:function(o){return o===void 0?this.elt.id:(this.elt.id=o,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)}},{key:"class",value:function(o){return o===void 0?this.elt.className:(this.elt.className=o,this)}},{key:"mousePressed",value:function(o){return p.default.Element._adjustListener("mousedown",function(a){return this._pInst._setProperty("mouseIsPressed",!0),this._pInst._setMouseButton(a),o.call(this,a)},this),this}},{key:"doubleClicked",value:function(o){return p.default.Element._adjustListener("dblclick",o,this),this}},{key:"mouseWheel",value:function(o){return p.default.Element._adjustListener("wheel",o,this),this}},{key:"mouseReleased",value:function(o){return p.default.Element._adjustListener("mouseup",o,this),this}},{key:"mouseClicked",value:function(o){return p.default.Element._adjustListener("click",o,this),this}},{key:"mouseMoved",value:function(o){return p.default.Element._adjustListener("mousemove",o,this),this}},{key:"mouseOver",value:function(o){return p.default.Element._adjustListener("mouseover",o,this),this}},{key:"mouseOut",value:function(o){return p.default.Element._adjustListener("mouseout",o,this),this}},{key:"touchStarted",value:function(o){return p.default.Element._adjustListener("touchstart",o,this),this}},{key:"touchMoved",value:function(o){return p.default.Element._adjustListener("touchmove",o,this),this}},{key:"touchEnded",value:function(o){return p.default.Element._adjustListener("touchend",o,this),this}},{key:"dragOver",value:function(o){return p.default.Element._adjustListener("dragover",o,this),this}},{key:"dragLeave",value:function(o){return p.default.Element._adjustListener("dragleave",o,this),this}},{key:"_setProperty",value:function(o,a){this[o]=a}}])&&m(f.prototype,g),y&&m(f,y),u})(),t=p.default.Element,C.default=t},{"./main":283}],285:[function(t,W,C){"use strict";function p(l){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(l)}function m(l){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(c){return p(c)}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":p(c)})(l)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-prototype-of"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(n=t("./main"))&&n.__esModule?n:{default:n},f=(function(l){if(l&&l.__esModule)return l;if(l===null||m(l)!=="object"&&typeof l!="function")return{default:l};var c=g();if(c&&c.has(l))return c.get(l);var d,v={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(d in l){var E;Object.prototype.hasOwnProperty.call(l,d)&&((E=S?Object.getOwnPropertyDescriptor(l,d):null)&&(E.get||E.set)?Object.defineProperty(v,d,E):v[d]=l[d])}return v.default=l,c&&c.set(l,v),v})(t("./constants"));function g(){var l;return typeof WeakMap!="function"?null:(l=new WeakMap,g=function(){return l},l)}function y(l,c){for(var d=0;d<c.length;d++){var v=c[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}function o(l,c){return(o=Object.setPrototypeOf||function(d,v){return d.__proto__=v,d})(l,c)}function a(l){return function(){var c,d=s(l);return r(this,(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(c=s(this).constructor,Reflect.construct(d,arguments,c)):d.apply(this,arguments))}}function r(l,c){return!c||m(c)!=="object"&&typeof c!="function"?i(l):c}function i(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function s(l){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)})(l)}u.default.Graphics=(function(l){var c=S;if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),l&&o(c,l);var d,v=a(S);function S(E,_,D,O,T){var P;if(!(this instanceof S))throw new TypeError("Cannot call a class as a function");F=T||document.createElement("canvas"),(P=v.call(this,F,O)).canvas=F;var M,F=D||f.P2D,D=O._userNode||document.body;for(M in T||D.appendChild(P.canvas),u.default.prototype)P[M]||(typeof u.default.prototype[M]=="function"?P[M]=u.default.prototype[M].bind(i(P)):P[M]=u.default.prototype[M]);return u.default.prototype._initializeInstanceVariables.apply(i(P)),P.width=E,P.height=_,P._pixelDensity=O._pixelDensity,F===f.WEBGL?(P._renderer=new u.default.RendererGL(P.canvas,i(P),!1),E=(T=P._renderer._adjustDimensions(E,_)).adjustedWidth,_=T.adjustedHeight):P._renderer=new u.default.Renderer2D(P.canvas,i(P),!1),O._elements.push(i(P)),Object.defineProperty(i(P),"deltaTime",{get:function(){return this._pInst.deltaTime}}),P._renderer.resize(E,_),P._renderer._applyDefaults(),r(P,i(P))}return c=S,(l=[{key:"reset",value:function(){this._renderer.resetMatrix(),this._renderer.isP3D&&this._renderer._update()}},{key:"remove",value:function(){this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt);var E,_=this._pInst._elements.indexOf(this);for(E in _!==-1&&this._pInst._elements.splice(_,1),this._events)this.elt.removeEventListener(E,this._events[E]);this._renderer=void 0,this.canvas=void 0,this.elt=void 0}},{key:"createFramebuffer",value:function(E){return new u.default.Framebuffer(this,E)}}])&&y(c.prototype,l),d&&y(c,d),S})(u.default.Element);var n=u.default.Graphics;C.default=n},{"./constants":272,"./main":283,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],286:[function(t,W,C){"use strict";function p(l){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(l)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var m=(s=t("./main"))&&s.__esModule?s:{default:s},u=(function(l){if(l&&l.__esModule)return l;if(l===null||g(l)!=="object"&&typeof l!="function")return{default:l};var c=f();if(c&&c.has(l))return c.get(l);var d,v={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(d in l){var E;Object.prototype.hasOwnProperty.call(l,d)&&((E=S?Object.getOwnPropertyDescriptor(l,d):null)&&(E.get||E.set)?Object.defineProperty(v,d,E):v[d]=l[d])}return v.default=l,c&&c.set(l,v),v})(t("../core/constants"));function f(){var l;return typeof WeakMap!="function"?null:(l=new WeakMap,f=function(){return l},l)}function g(l){return(g=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(c){return p(c)}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":p(c)})(l)}function y(l,c){for(var d=0;d<c.length;d++){var v=c[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}function o(l,c){return(o=Object.setPrototypeOf||function(d,v){return d.__proto__=v,d})(l,c)}function a(l){return function(){var c,d,v=i(l);return c=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(c=i(this).constructor,Reflect.construct(v,arguments,c)):v.apply(this,arguments),v=this,!(d=c)||g(d)!=="object"&&typeof d!="function"?r(v):d}}function r(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function i(l){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)})(l)}var s=(function(l){var c=S;if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),l&&o(c,l);var d,v=a(S);function S(E,_,x){var O;if(this instanceof S)return(O=v.call(this,E,_)).canvas=E,O._pixelsState=_,x?(O._isMainCanvas=!0,O._pInst._setProperty("_curElement",r(O)),O._pInst._setProperty("canvas",O.canvas),O._pInst._setProperty("width",O.width),O._pInst._setProperty("height",O.height)):(O.canvas.style.display="none",O._styles=[]),O._clipping=!1,O._clipInvert=!1,O._textSize=12,O._textLeading=15,O._textFont="sans-serif",O._textStyle=u.NORMAL,O._textAscent=null,O._textDescent=null,O._textAlign=u.LEFT,O._textBaseline=u.BASELINE,O._textWrap=u.WORD,O._rectMode=u.CORNER,O._ellipseMode=u.CENTER,O._curveTightness=0,O._imageMode=u.CORNER,O._tint=null,O._doStroke=!0,O._doFill=!0,O._strokeSet=!1,O._fillSet=!1,O._leadingSet=!1,O._pushPopDepth=0,O;throw new TypeError("Cannot call a class as a function")}return c=S,(l=[{key:"push",value:function(){return this._pushPopDepth++,{properties:{_doStroke:this._doStroke,_strokeSet:this._strokeSet,_doFill:this._doFill,_fillSet:this._fillSet,_tint:this._tint,_imageMode:this._imageMode,_rectMode:this._rectMode,_ellipseMode:this._ellipseMode,_textFont:this._textFont,_textLeading:this._textLeading,_leadingSet:this._leadingSet,_textSize:this._textSize,_textAlign:this._textAlign,_textBaseline:this._textBaseline,_textStyle:this._textStyle,_textWrap:this._textWrap}}}},{key:"pop",value:function(E){this._pushPopDepth--,E.properties&&Object.assign(this,E.properties)}},{key:"beginClip",value:function(){var E=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(this._clipping)throw new Error("It looks like you're trying to clip while already in the middle of clipping. Did you forget to endClip()?");this._clipping=!0,this._clipInvert=E.invert}},{key:"endClip",value:function(){if(!this._clipping)throw new Error("It looks like you've called endClip() without beginClip(). Did you forget to call beginClip() first?");this._clipping=!1}},{key:"resize",value:function(E,_){this.width=E,this.height=_,this.elt.width=E*this._pInst._pixelDensity,this.elt.height=_*this._pInst._pixelDensity,this.elt.style.width="".concat(E,"px"),this.elt.style.height="".concat(_,"px"),this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))}},{key:"get",value:function(E,_,x,O){var T=this._pixelsState,P=T._pixelDensity,M=this.canvas;if(E===void 0&&_===void 0)E=_=0,x=T.width,O=T.height;else if(E*=P,_*=P,x===void 0&&O===void 0)return E<0||_<0||E>=M.width||_>=M.height?[0,0,0,0]:this._getPixel(E,_);return T=new m.default.Image(x*P,O*P),T.pixelDensity(P),T.canvas.getContext("2d").drawImage(M,E,_,x*P,O*P,0,0,x*P,O*P),T}},{key:"textLeading",value:function(E){return typeof E=="number"?(this._setProperty("_leadingSet",!0),this._setProperty("_textLeading",E),this._pInst):this._textLeading}},{key:"textStyle",value:function(E){return E?(E!==u.NORMAL&&E!==u.ITALIC&&E!==u.BOLD&&E!==u.BOLDITALIC||this._setProperty("_textStyle",E),this._applyTextProperties()):this._textStyle}},{key:"textAscent",value:function(){return this._textAscent===null&&this._updateTextMetrics(),this._textAscent}},{key:"textDescent",value:function(){return this._textDescent===null&&this._updateTextMetrics(),this._textDescent}},{key:"textAlign",value:function(E,_){return E!==void 0?(this._setProperty("_textAlign",E),_!==void 0&&this._setProperty("_textBaseline",_),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}}},{key:"textWrap",value:function(E){return this._setProperty("_textWrap",E),this._textWrap}},{key:"text",value:function(E,_,x,O,T){var P,M,F,D,A=this._pInst,z=this._textWrap,G=Number.MAX_VALUE,U=x;if((this._doFill||this._doStroke)&&E!==void 0){if(P=(E=(E=typeof E!="string"?E.toString():E).replace(/(\t)/g,"  ")).split(`
`),O!==void 0){switch(this._rectMode===u.CENTER&&(_-=O/2),this._textAlign){case u.CENTER:_+=O/2;break;case u.RIGHT:_+=O}if(T!==void 0){this._rectMode===u.CENTER&&(x-=T/2,U-=T/2);var E=x,H=A.textAscent();switch(this._textBaseline){case u.BOTTOM:D=x+T,x=Math.max(D,x),U+=H;break;case u.CENTER:D=x+T/2,x=Math.max(D,x),U+=H/2}G=x+T-H,this._textBaseline===u.CENTER&&(G=E+T-H/2)}else this._textBaseline!==u.BOTTOM&&this._textBaseline!==u.CENTER||(U=x-(E=A.textSize()*this._textLeading)/2,G=x+E/2);if(z===u.WORD){for(var Y=[],oe=0;oe<P.length;oe++){for(var L="",j=P[oe].split(" "),R=0;R<j.length;R++)M="".concat(L+j[R])+" ",L=O<(F=this.textWidth(M))&&0<L.length?(Y.push(L),"".concat(j[R])+" "):M;Y.push(L)}var N=0;this._textBaseline===u.CENTER?N=(Y.length-1)*A.textLeading()/2:this._textBaseline===u.BOTTOM&&(N=(Y.length-1)*A.textLeading());for(var X=0;X<P.length;X++){L="",j=P[X].split(" ");for(var K=0;K<j.length;K++)M="".concat(L+j[K])+" ",O<(F=this.textWidth(M))&&0<L.length?(this._renderText(A,L.trim(),_,x-N,G,U),L="".concat(j[K])+" ",x+=A.textLeading()):L=M;this._renderText(A,L.trim(),_,x-N,G,U),x+=A.textLeading()}}else{for(var re=[],ie=0;ie<P.length;ie++)for(var ee=P[ie].split(L=""),ae=0;ae<ee.length;ae++)M="".concat(L+ee[ae]),(F=this.textWidth(M))<=O?L+=ee[ae]:O<F&&0<L.length&&(re.push(L),L="".concat(ee[ae]));re.push(L);var ue=0;this._textBaseline===u.CENTER?ue=(re.length-1)*A.textLeading()/2:this._textBaseline===u.BOTTOM&&(ue=(re.length-1)*A.textLeading());for(var Q=0;Q<P.length;Q++){ee=P[Q].split(L="");for(var le=0;le<ee.length;le++)M="".concat(L+ee[le]),(F=this.textWidth(M))<=O?L+=ee[le]:O<F&&0<L.length&&(this._renderText(A,L.trim(),_,x-ue,G,U),x+=A.textLeading(),L="".concat(ee[le]))}this._renderText(A,L.trim(),_,x-ue,G,U),x+=A.textLeading()}}else{var fe=0;this._textBaseline===u.CENTER?fe=(P.length-1)*A.textLeading()/2:this._textBaseline===u.BOTTOM&&(fe=(P.length-1)*A.textLeading());for(var ve=0;ve<P.length;ve++)this._renderText(A,P[ve],_,x-fe,G,U-fe),x+=A.textLeading()}return A}}},{key:"_applyDefaults",value:function(){return this}},{key:"_isOpenType",value:function(){var E=0<arguments.length&&arguments[0]!==void 0?arguments[0]:this._textFont;return g(E)==="object"&&E.font&&E.font.supported}},{key:"_updateTextMetrics",value:function(){var E,_,x,O,T,P;return this._isOpenType()?(this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent())):((E=document.createElement("span")).style.fontFamily=this._textFont,E.style.fontSize="".concat(this._textSize,"px"),E.innerHTML="ABCjgq|",(P=document.createElement("div")).style.display="inline-block",P.style.width="1px",P.style.height="0px",O=((_=document.createElement("div")).appendChild(E),_.appendChild(P),_.style.height="0px",_.style.overflow="hidden",document.body.appendChild(_),P.style.verticalAlign="baseline",n(P)),T=n(E),x=O[1]-T[1],O=(P.style.verticalAlign="bottom",n(P)),T=n(E),P=O[1]-T[1]-x,document.body.removeChild(_),this._setProperty("_textAscent",x),this._setProperty("_textDescent",P)),this}}])&&y(c.prototype,l),d&&y(c,d),S})(m.default.Element);function n(l){var c=0,d=0;if(l.offsetParent)for(;c+=l.offsetLeft,d+=l.offsetTop,l=l.offsetParent;);else c+=l.offsetLeft,d+=l.offsetTop;return[c,d]}s.prototype.textSize=function(l){return typeof l=="number"?(this._setProperty("_textSize",l),this._leadingSet||this._setProperty("_textLeading",l*u._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},m.default.Renderer=s,t=m.default.Renderer,C.default=t},{"../core/constants":272,"./main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],287:[function(l,W,C){"use strict";function p(c){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(c)}function m(c){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(d){return p(d)}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":p(d)})(c)}l("core-js/modules/es.symbol"),l("core-js/modules/es.symbol.description"),l("core-js/modules/es.symbol.iterator"),l("core-js/modules/es.array.concat"),l("core-js/modules/es.array.fill"),l("core-js/modules/es.array.iterator"),l("core-js/modules/es.array.join"),l("core-js/modules/es.array.slice"),l("core-js/modules/es.function.name"),l("core-js/modules/es.object.get-own-property-descriptor"),l("core-js/modules/es.object.get-prototype-of"),l("core-js/modules/es.object.to-string"),l("core-js/modules/es.reflect.construct"),l("core-js/modules/es.reflect.get"),l("core-js/modules/es.regexp.exec"),l("core-js/modules/es.regexp.to-string"),l("core-js/modules/es.string.iterator"),l("core-js/modules/es.weak-map"),l("core-js/modules/web.dom-collections.iterator"),l("core-js/modules/es.array.concat"),l("core-js/modules/es.array.fill"),l("core-js/modules/es.array.join"),l("core-js/modules/es.array.slice"),l("core-js/modules/es.function.name"),l("core-js/modules/es.object.get-prototype-of"),l("core-js/modules/es.object.to-string"),l("core-js/modules/es.regexp.exec"),l("core-js/modules/es.regexp.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(n=l("./main"))&&n.__esModule?n:{default:n},f=(function(c){if(c&&c.__esModule)return c;if(c===null||m(c)!=="object"&&typeof c!="function")return{default:c};var d=g();if(d&&d.has(c))return d.get(c);var v,S={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(v in c){var _;Object.prototype.hasOwnProperty.call(c,v)&&((_=E?Object.getOwnPropertyDescriptor(c,v):null)&&(_.get||_.set)?Object.defineProperty(S,v,_):S[v]=c[v])}return S.default=c,d&&d.set(c,S),S})(l("./constants"));function g(){var c;return typeof WeakMap!="function"?null:(c=new WeakMap,g=function(){return c},c)}function y(c,d){for(var v=0;v<d.length;v++){var S=d[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(c,S.key,S)}}function o(c,d,v){return(o=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(x,E,_){var x=(function(O,T){for(;!Object.prototype.hasOwnProperty.call(O,T)&&(O=i(O))!==null;);return O})(x,E);if(x)return(x=Object.getOwnPropertyDescriptor(x,E)).get?x.get.call(_):x.value})(c,d,v||c)}function a(c,d){return(a=Object.setPrototypeOf||function(v,S){return v.__proto__=S,v})(c,d)}function r(c){return function(){var d,v=i(c),v=(d=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(d=i(this).constructor,Reflect.construct(v,arguments,d)):v.apply(this,arguments),this);if(!d||m(d)!=="object"&&typeof d!="function"){if(v!==void 0)return v;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return d}}function i(c){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)})(c)}l("./p5.Renderer");var s="rgba(0,0,0,0)",n=(function(c){var d=E;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(c&&c.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),c&&a(d,c);var v,S=r(E);function E(_,x,O){if(this instanceof E)return(_=S.call(this,_,x,O)).drawingContext=_.canvas.getContext("2d"),_._pInst._setProperty("drawingContext",_.drawingContext),_;throw new TypeError("Cannot call a class as a function")}return d=E,(c=[{key:"getFilterGraphicsLayer",value:function(){var _;return this.filterGraphicsLayer||(_=(this._pInst instanceof u.default.Graphics?this._pInst:this)._pInst,this.filterGraphicsLayer=new u.default.Graphics(this.width,this.height,f.WEBGL,_)),this.filterGraphicsLayer.width===this.width&&this.filterGraphicsLayer.height===this.height||this.filterGraphicsLayer.resizeCanvas(this.width,this.height),this.filterGraphicsLayer.pixelDensity()!==this._pInst.pixelDensity()&&this.filterGraphicsLayer.pixelDensity(this._pInst.pixelDensity()),this.filterGraphicsLayer}},{key:"_applyDefaults",value:function(){this._cachedFillStyle=this._cachedStrokeStyle=void 0,this._cachedBlendMode=f.BLEND,this._setFill(f._DEFAULT_FILL),this._setStroke(f._DEFAULT_STROKE),this.drawingContext.lineCap=f.ROUND,this.drawingContext.font="normal 12px sans-serif"}},{key:"resize",value:function(_,x){o(i(E.prototype),"resize",this).call(this,_,x),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)}},{key:"background",value:function(){var _,x;this.drawingContext.save(),this.resetMatrix(),(arguments.length<=0?void 0:arguments[0])instanceof u.default.Image?0<=(arguments.length<=1?void 0:arguments[1])?(_=arguments.length<=0?void 0:arguments[0],this.drawingContext.globalAlpha=(arguments.length<=1?void 0:arguments[1])/255,this._pInst.image(_,0,0,this.width,this.height)):this._pInst.image(arguments.length<=0?void 0:arguments[0],0,0,this.width,this.height):(_=this._getFill(),x=(x=this._pInst).color.apply(x,arguments),this._pInst._addAccsOutput()&&this._pInst._accsBackground(x.levels),x=x.toString(),this._setFill(x),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.fillRect(0,0,this.width,this.height),this._setFill(_),this._isErasing&&this._pInst.erase()),this.drawingContext.restore()}},{key:"clear",value:function(){this.drawingContext.save(),this.resetMatrix(),this.drawingContext.clearRect(0,0,this.width,this.height),this.drawingContext.restore()}},{key:"fill",value:function(){var _=(_=this._pInst).color.apply(_,arguments);this._setFill(_.toString()),this._pInst._addAccsOutput()&&this._pInst._accsCanvasColors("fill",_.levels)}},{key:"stroke",value:function(){var _=(_=this._pInst).color.apply(_,arguments);this._setStroke(_.toString()),this._pInst._addAccsOutput()&&this._pInst._accsCanvasColors("stroke",_.levels)}},{key:"erase",value:function(_,x){this._isErasing||(this._cachedFillStyle=this.drawingContext.fillStyle,_=this._pInst.color(255,_).toString(),this.drawingContext.fillStyle=_,this._cachedStrokeStyle=this.drawingContext.strokeStyle,_=this._pInst.color(255,x).toString(),this.drawingContext.strokeStyle=_,x=this._cachedBlendMode,this.blendMode(f.REMOVE),this._cachedBlendMode=x,this._isErasing=!0)}},{key:"noErase",value:function(){this._isErasing&&(this.drawingContext.fillStyle=this._cachedFillStyle,this.drawingContext.strokeStyle=this._cachedStrokeStyle,this.blendMode(this._cachedBlendMode),this._isErasing=!1)}},{key:"beginClip",value:function(){var _=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},_=(o(i(E.prototype),"beginClip",this).call(this,_),this._cachedFillStyle=this.drawingContext.fillStyle,this._pInst.color(255,0).toString()),_=(this.drawingContext.fillStyle=_,this._cachedStrokeStyle=this.drawingContext.strokeStyle,this._pInst.color(255,0).toString()),_=(this.drawingContext.strokeStyle=_,this._cachedBlendMode);this.blendMode(f.BLEND),this._cachedBlendMode=_,this.drawingContext.beginPath(),this._clipInvert&&(this.drawingContext.moveTo(-2*this.width,-2*this.height),this.drawingContext.lineTo(-2*this.width,2*this.height),this.drawingContext.lineTo(2*this.width,2*this.height),this.drawingContext.lineTo(2*this.width,-2*this.height),this.drawingContext.closePath())}},{key:"endClip",value:function(){this._doFillStrokeClose(),this.drawingContext.clip(),o(i(E.prototype),"endClip",this).call(this),this.drawingContext.fillStyle=this._cachedFillStyle,this.drawingContext.strokeStyle=this._cachedStrokeStyle,this.blendMode(this._cachedBlendMode)}},{key:"image",value:function(_,x,O,T,P,M,F,D,A){_.gifProperties&&_._animateGif(this._pInst);try{u.default.MediaElement&&_ instanceof u.default.MediaElement&&_._ensureCanvas();var z=(z=this._tint&&_.canvas?this._getTintedImageCanvas(_):z)||_.canvas||_.elt,G=1;_.width&&0<_.width&&(G=z.width/_.width),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.drawImage(z,G*x,G*O,G*T,G*P,M,F,D,A),this._isErasing&&this._pInst.erase()}catch(U){if(U.name!=="NS_ERROR_NOT_AVAILABLE")throw U}}},{key:"_getTintedImageCanvas",value:function(_){if(!_.canvas)return _;_.tintCanvas||(_.tintCanvas=document.createElement("canvas")),_.tintCanvas.width!==_.canvas.width&&(_.tintCanvas.width=_.canvas.width),_.tintCanvas.height!==_.canvas.height&&(_.tintCanvas.height=_.canvas.height);var x=_.tintCanvas.getContext("2d");return x.save(),x.clearRect(0,0,_.canvas.width,_.canvas.height),(this._tint[0]<255||this._tint[1]<255||this._tint[2]<255)&&(x.drawImage(_.canvas,0,0),x.globalCompositeOperation="luminosity",x.drawImage(_.canvas,0,0),x.globalCompositeOperation="color",x.drawImage(_.canvas,0,0),x.globalCompositeOperation="multiply",x.fillStyle="rgb(".concat(this._tint.slice(0,3).join(", "),")"),x.fillRect(0,0,_.canvas.width,_.canvas.height),x.globalCompositeOperation="destination-in"),x.globalAlpha=this._tint[3]/255,x.drawImage(_.canvas,0,0),x.restore(),_.tintCanvas}},{key:"blendMode",value:function(_){if(_===f.SUBTRACT)console.warn("blendMode(SUBTRACT) only works in WEBGL mode.");else{if(_!==f.BLEND&&_!==f.REMOVE&&_!==f.DARKEST&&_!==f.LIGHTEST&&_!==f.DIFFERENCE&&_!==f.MULTIPLY&&_!==f.EXCLUSION&&_!==f.SCREEN&&_!==f.REPLACE&&_!==f.OVERLAY&&_!==f.HARD_LIGHT&&_!==f.SOFT_LIGHT&&_!==f.DODGE&&_!==f.BURN&&_!==f.ADD)throw new Error("Mode ".concat(_," not recognized."));this._cachedBlendMode=_,this.drawingContext.globalCompositeOperation=_}}},{key:"blend",value:function(){for(var _=this.drawingContext.globalCompositeOperation,x=arguments.length,O=new Array(x),T=0;T<x;T++)O[T]=arguments[T];var P=O[O.length-1],M=Array.prototype.slice.call(O,0,O.length-1);this.drawingContext.globalCompositeOperation=P,u.default.prototype.copy.apply(this,M),this.drawingContext.globalCompositeOperation=_}},{key:"_getPixel",value:function(_,x){return _=this.drawingContext.getImageData(_,x,1,1).data,[_[0],_[1],_[2],_[3]]}},{key:"loadPixels",value:function(){var _=this._pixelsState,x=_._pixelDensity,O=this.width*x,x=this.height*x,O=this.drawingContext.getImageData(0,0,O,x);_._setProperty("imageData",O),_._setProperty("pixels",O.data)}},{key:"set",value:function(_,x,O){_=Math.floor(_),x=Math.floor(x);var T=this._pixelsState;if(O instanceof u.default.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(T._pixelDensity,T._pixelDensity),this.drawingContext.clearRect(_,x,O.width,O.height),this.drawingContext.drawImage(O.canvas,_,x),this.drawingContext.restore();else{var P=0,M=0,F=0,D=0,A=4*(x*T._pixelDensity*(this.width*T._pixelDensity)+_*T._pixelDensity);if(T.imageData||T.loadPixels(),typeof O=="number")A<T.pixels.length&&(F=M=P=O,D=255);else if(Array.isArray(O)){if(O.length<4)throw new Error("pixel array must be of the form [R, G, B, A]");A<T.pixels.length&&(P=O[0],M=O[1],F=O[2],D=O[3])}else O instanceof u.default.Color&&A<T.pixels.length&&(P=O.levels[0],M=O.levels[1],F=O.levels[2],D=O.levels[3]);for(var z=0;z<T._pixelDensity;z++)for(var G=0;G<T._pixelDensity;G++)A=4*((x*T._pixelDensity+G)*this.width*T._pixelDensity+(_*T._pixelDensity+z)),T.pixels[A]=P,T.pixels[A+1]=M,T.pixels[A+2]=F,T.pixels[A+3]=D}}},{key:"updatePixels",value:function(_,x,O,T){var P=this._pixelsState,M=P._pixelDensity;_===void 0&&x===void 0&&O===void 0&&T===void 0&&(x=_=0,O=this.width,T=this.height),_*=M,x*=M,O*=M,T*=M,this.gifProperties&&(this.gifProperties.frames[this.gifProperties.displayIndex].image=P.imageData),this.drawingContext.putImageData(P.imageData,0,0,_,x,O,T)}},{key:"arc",value:function(A,z,G,U,P,M,F){var D=this.drawingContext,A=A+G/2,z=z+U/2,G=G/2,U=U/2,H=!(F===f.CHORD||F===f.OPEN||(M-P)%f.TWO_PI==0);return this._doFill&&(this._clipping||D.beginPath(),D.ellipse(A,z,G,U,0,P,M),H&&D.lineTo(A,z),D.closePath(),this._clipping||D.fill()),this._doStroke&&(this._clipping||D.beginPath(),D.ellipse(A,z,G,U,0,P,M),F===f.PIE&&H&&D.lineTo(A,z),F!==f.PIE&&F!==f.CHORD||D.closePath(),this._clipping||D.stroke()),this}},{key:"ellipse",value:function(D){var x=this.drawingContext,O=this._doFill,T=this._doStroke,P=parseFloat(D[0]),M=parseFloat(D[1]),F=parseFloat(D[2]),D=parseFloat(D[3]);if(O&&!T){if(this._getFill()===s)return this}else if(!O&&T&&this._getStroke()===s)return this;P+=F/2,M+=D/2,F/=2,D/=2,this._clipping||x.beginPath(),x.ellipse(P,M,F,D,0,0,2*Math.PI),x.closePath(),!this._clipping&&O&&x.fill(),!this._clipping&&T&&x.stroke()}},{key:"line",value:function(_,x,O,T){var P=this.drawingContext;return this._doStroke&&this._getStroke()!==s&&(this._clipping||P.beginPath(),P.moveTo(_,x),P.lineTo(O,T),P.stroke()),this}},{key:"point",value:function(_,x){var O,T,P=this.drawingContext;return!this._doStroke||this._getStroke()===s?this:(O=this._getStroke(),T=this._getFill(),this._clipping||this._setFill(O),this._clipping||P.beginPath(),P.arc(_,x,P.lineWidth/2,0,f.TWO_PI,!1),void(this._clipping||(P.fill(),this._setFill(T))))}},{key:"quad",value:function(_,x,O,T,P,M,F,D){var A=this.drawingContext,z=this._doFill,G=this._doStroke;if(z&&!G){if(this._getFill()===s)return this}else if(!z&&G&&this._getStroke()===s)return this;return this._clipping||A.beginPath(),A.moveTo(_,x),A.lineTo(O,T),A.lineTo(P,M),A.lineTo(F,D),A.closePath(),!this._clipping&&z&&A.fill(),!this._clipping&&G&&A.stroke(),this}},{key:"rect",value:function(G){var x,O,T=G[0],P=G[1],M=G[2],F=G[3],D=G[4],A=G[5],z=G[6],G=G[7],U=this.drawingContext,H=this._doFill,Y=this._doStroke;if(H&&!Y){if(this._getFill()===s)return this}else if(!H&&Y&&this._getStroke()===s)return this;return this._clipping||U.beginPath(),D===void 0?U.rect(T,P,M,F):(A===void 0&&(A=D),z===void 0&&(z=A),G===void 0&&(G=z),Y=(H=Math.abs(M))/2,O=(x=Math.abs(F))/2,U.roundRect(T,P,M,F,[D=x<2*(D=H<2*D?Y:D)?O:D,A=x<2*(A=H<2*A?Y:A)?O:A,z=x<2*(z=H<2*z?Y:z)?O:z,G=x<2*(G=H<2*G?Y:G)?O:G])),!this._clipping&&this._doFill&&U.fill(),!this._clipping&&this._doStroke&&U.stroke(),this}},{key:"triangle",value:function(z){var x=this.drawingContext,O=this._doFill,T=this._doStroke,P=z[0],M=z[1],F=z[2],D=z[3],A=z[4],z=z[5];if(O&&!T){if(this._getFill()===s)return this}else if(!O&&T&&this._getStroke()===s)return this;this._clipping||x.beginPath(),x.moveTo(P,M),x.lineTo(F,D),x.lineTo(A,z),x.closePath(),!this._clipping&&O&&x.fill(),!this._clipping&&T&&x.stroke()}},{key:"endShape",value:function(_,x,O,T,P,M,F){if(x.length!==0&&(this._doStroke||this._doFill)){var D,A,z,G=_===f.CLOSE,U=(G&&!M&&x.push(x[0]),x.length);if(O&&F===null){if(3<U){var H=[],Y=1-this._curveTightness;for(this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(x[1][0],x[1][1]),A=1;A+2<U;A++)D=x[A],H[0]=[D[0],D[1]],H[1]=[D[0]+(Y*x[A+1][0]-Y*x[A-1][0])/6,D[1]+(Y*x[A+1][1]-Y*x[A-1][1])/6],H[2]=[x[A+1][0]+(Y*x[A][0]-Y*x[A+2][0])/6,x[A+1][1]+(Y*x[A][1]-Y*x[A+2][1])/6],H[3]=[x[A+1][0],x[A+1][1]],this.drawingContext.bezierCurveTo(H[1][0],H[1][1],H[2][0],H[2][1],H[3][0],H[3][1]);G&&this.drawingContext.lineTo(x[A+1][0],x[A+1][1]),this._doFillStrokeClose(G)}}else if(T&&F===null){for(this._clipping||this.drawingContext.beginPath(),A=0;A<U;A++)x[A].isVert?x[A].moveTo?this.drawingContext.moveTo(x[A][0],x[A][1]):this.drawingContext.lineTo(x[A][0],x[A][1]):this.drawingContext.bezierCurveTo(x[A][0],x[A][1],x[A][2],x[A][3],x[A][4],x[A][5]);this._doFillStrokeClose(G)}else if(P&&F===null){for(this._clipping||this.drawingContext.beginPath(),A=0;A<U;A++)x[A].isVert?x[A].moveTo?this.drawingContext.moveTo(x[A][0],x[A][1]):this.drawingContext.lineTo(x[A][0],x[A][1]):this.drawingContext.quadraticCurveTo(x[A][0],x[A][1],x[A][2],x[A][3]);this._doFillStrokeClose(G)}else if(F===f.POINTS)for(A=0;A<U;A++)D=x[A],this._doStroke&&this._pInst.stroke(D[6]),this._pInst.point(D[0],D[1]);else if(F===f.LINES)for(A=0;A+1<U;A+=2)D=x[A],this._doStroke&&this._pInst.stroke(x[A+1][6]),this._pInst.line(D[0],D[1],x[A+1][0],x[A+1][1]);else if(F===f.TRIANGLES)for(A=0;A+2<U;A+=3)D=x[A],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(D[0],D[1]),this.drawingContext.lineTo(x[A+1][0],x[A+1][1]),this.drawingContext.lineTo(x[A+2][0],x[A+2][1]),this.drawingContext.closePath(),!this._clipping&&this._doFill&&(this._pInst.fill(x[A+2][5]),this.drawingContext.fill()),!this._clipping&&this._doStroke&&(this._pInst.stroke(x[A+2][6]),this.drawingContext.stroke());else if(F===f.TRIANGLE_STRIP)for(A=0;A+1<U;A++)D=x[A],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(x[A+1][0],x[A+1][1]),this.drawingContext.lineTo(D[0],D[1]),!this._clipping&&this._doStroke&&this._pInst.stroke(x[A+1][6]),!this._clipping&&this._doFill&&this._pInst.fill(x[A+1][5]),A+2<U&&(this.drawingContext.lineTo(x[A+2][0],x[A+2][1]),!this._clipping&&this._doStroke&&this._pInst.stroke(x[A+2][6]),!this._clipping&&this._doFill&&this._pInst.fill(x[A+2][5])),this._doFillStrokeClose(G);else if(F===f.TRIANGLE_FAN){if(2<U){for(this._clipping||this.drawingContext.beginPath(),A=2;A<U;A++)D=x[A],this.drawingContext.moveTo(x[0][0],x[0][1]),this.drawingContext.lineTo(x[A-1][0],x[A-1][1]),this.drawingContext.lineTo(D[0],D[1]),this.drawingContext.lineTo(x[0][0],x[0][1]),A<U-1&&(this._doFill&&D[5]!==x[A+1][5]||this._doStroke&&D[6]!==x[A+1][6])&&(!this._clipping&&this._doFill&&(this._pInst.fill(D[5]),this.drawingContext.fill(),this._pInst.fill(x[A+1][5])),!this._clipping&&this._doStroke&&(this._pInst.stroke(D[6]),this.drawingContext.stroke(),this._pInst.stroke(x[A+1][6])),this.drawingContext.closePath(),this._clipping||this.drawingContext.beginPath());this._doFillStrokeClose(G)}}else if(F===f.QUADS)for(A=0;A+3<U;A+=4){for(D=x[A],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(D[0],D[1]),z=1;z<4;z++)this.drawingContext.lineTo(x[A+z][0],x[A+z][1]);this.drawingContext.lineTo(D[0],D[1]),!this._clipping&&this._doFill&&this._pInst.fill(x[A+3][5]),!this._clipping&&this._doStroke&&this._pInst.stroke(x[A+3][6]),this._doFillStrokeClose(G)}else if(F===f.QUAD_STRIP){if(3<U)for(A=0;A+1<U;A+=2)D=x[A],this._clipping||this.drawingContext.beginPath(),A+3<U?(this.drawingContext.moveTo(x[A+2][0],x[A+2][1]),this.drawingContext.lineTo(D[0],D[1]),this.drawingContext.lineTo(x[A+1][0],x[A+1][1]),this.drawingContext.lineTo(x[A+3][0],x[A+3][1]),!this._clipping&&this._doFill&&this._pInst.fill(x[A+3][5]),!this._clipping&&this._doStroke&&this._pInst.stroke(x[A+3][6])):(this.drawingContext.moveTo(D[0],D[1]),this.drawingContext.lineTo(x[A+1][0],x[A+1][1])),this._doFillStrokeClose(G)}else{for(this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(x[0][0],x[0][1]),A=1;A<U;A++)(D=x[A]).isVert&&(D.moveTo?(G&&this.drawingContext.closePath(),this.drawingContext.moveTo(D[0],D[1])):this.drawingContext.lineTo(D[0],D[1]));this._doFillStrokeClose(G),this.drawingContext.closePath()}M=P=T=O=!1,G&&x.pop()}return this}},{key:"strokeCap",value:function(_){return _!==f.ROUND&&_!==f.SQUARE&&_!==f.PROJECT||(this.drawingContext.lineCap=_),this}},{key:"strokeJoin",value:function(_){return _!==f.ROUND&&_!==f.BEVEL&&_!==f.MITER||(this.drawingContext.lineJoin=_),this}},{key:"strokeWeight",value:function(_){return this.drawingContext.lineWidth=_===void 0||_===0?1e-4:_,this}},{key:"_getFill",value:function(){return this._cachedFillStyle||(this._cachedFillStyle=this.drawingContext.fillStyle),this._cachedFillStyle}},{key:"_setFill",value:function(_){_!==this._cachedFillStyle&&(this.drawingContext.fillStyle=_,this._cachedFillStyle=_)}},{key:"_getStroke",value:function(){return this._cachedStrokeStyle||(this._cachedStrokeStyle=this.drawingContext.strokeStyle),this._cachedStrokeStyle}},{key:"_setStroke",value:function(_){_!==this._cachedStrokeStyle&&(this.drawingContext.strokeStyle=_,this._cachedStrokeStyle=_)}},{key:"bezier",value:function(_,x,O,T,P,M,F,D){return this._pInst.beginShape(),this._pInst.vertex(_,x),this._pInst.bezierVertex(O,T,P,M,F,D),this._pInst.endShape(),this}},{key:"curve",value:function(_,x,O,T,P,M,F,D){return this._pInst.beginShape(),this._pInst.curveVertex(_,x),this._pInst.curveVertex(O,T),this._pInst.curveVertex(P,M),this._pInst.curveVertex(F,D),this._pInst.endShape(),this}},{key:"_doFillStrokeClose",value:function(_){_&&this.drawingContext.closePath(),!this._clipping&&this._doFill&&this.drawingContext.fill(),!this._clipping&&this._doStroke&&this.drawingContext.stroke()}},{key:"applyMatrix",value:function(_,x,O,T,P,M){this.drawingContext.transform(_,x,O,T,P,M)}},{key:"resetMatrix",value:function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this}},{key:"rotate",value:function(_){this.drawingContext.rotate(_)}},{key:"scale",value:function(_,x){return this.drawingContext.scale(_,x),this}},{key:"translate",value:function(_,x){return _ instanceof u.default.Vector&&(x=_.y,_=_.x),this.drawingContext.translate(_,x),this}},{key:"_renderText",value:function(_,x,O,T,P,M){if(!(T<M||P<=T))return _.push(),this._isOpenType()?this._textFont._renderPath(x,O,T,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(x,O,T),!this._clipping&&this._doFill&&(this._fillSet||this._setFill(f._DEFAULT_TEXT_FILL),this.drawingContext.fillText(x,O,T))),_.pop(),_}},{key:"textWidth",value:function(_){return this._isOpenType()?this._textFont._textWidth(_,this._textSize):this.drawingContext.measureText(_).width}},{key:"_applyTextProperties",value:function(){var _=this._pInst,x=(this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),x=this._textFont,this._isOpenType()&&(x=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),x||"sans-serif");return/\s/.exec(x)&&(x='"'.concat(x,'"')),this.drawingContext.font="".concat(this._textStyle||"normal"," ").concat(this._textSize||12,"px ").concat(x),this.drawingContext.textAlign=this._textAlign,this._textBaseline===f.CENTER?this.drawingContext.textBaseline=f._CTX_MIDDLE:this.drawingContext.textBaseline=this._textBaseline,_}},{key:"push",value:function(){return this.drawingContext.save(),o(i(E.prototype),"push",this).call(this)}},{key:"pop",value:function(_){this.drawingContext.restore(),this._cachedFillStyle=this.drawingContext.fillStyle,this._cachedStrokeStyle=this.drawingContext.strokeStyle,o(i(E.prototype),"pop",this).call(this,_)}}])&&y(d.prototype,c),v&&y(d,v),E})(u.default.Renderer),l=(n.prototype.text=function(c,d,v,x,E){x!==void 0&&this.drawingContext.textBaseline===f.BASELINE&&(_=!0,this.drawingContext.textBaseline=f.TOP);var _,x=u.default.Renderer.prototype.text.apply(this,arguments);return _&&(this.drawingContext.textBaseline=f.BASELINE),x},u.default.Renderer2D=n,u.default.Renderer2D);C.default=l},{"./constants":272,"./main":283,"./p5.Renderer":286,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.function.name":174,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.reflect.get":193,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],288:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator");var p=(t=t("./main"))&&t.__esModule?t:{default:t};p.default.prototype._promisePreloads=[];function m(){return{}}var u=!(p.default.prototype.registerPromisePreload=function(f){p.default.prototype._promisePreloads.push(f)});p.default.prototype._setupPromisePreloads=function(){var f=!0,g=!1,y=void 0;try{for(var o,a=this._promisePreloads[Symbol.iterator]();!(f=(o=a.next()).done);f=!0){var r=o.value,i=this,s=r.method,n=r.addCallbacks,l=r.legacyPreloadSetup,c=r.target||this,d=c[s].bind(c);if(c===p.default.prototype){if(u)continue;i=null,d=c[s]}c[s]=this._wrapPromisePreload(i,d,n),l&&(c[l.method]=this._legacyPreloadGenerator(i,l,c[s]))}}catch(v){g=!0,y=v}finally{try{f||a.return==null||a.return()}finally{if(g)throw y}}u=!0},p.default.prototype._wrapPromisePreload=function(f,g,y){var o=function(){for(var a=this,r=(this._incrementPreload(),null),i=null,s=arguments.length,n=new Array(s),l=0;l<s;l++)n[l]=arguments[l];if(y)for(var c=n.length-1;0<=c&&!i&&typeof n[c]=="function";c--)i=r,r=n.pop();var d=Promise.resolve(g.apply(this,n));return r&&d.then(r),i&&d.catch(i),d.then(function(){return a._decrementPreload()}),d};return o=f?o.bind(f):o},p.default.prototype._legacyPreloadGenerator=function(f,a,y){var o=a.createBaseObject||m,a=function(){var r=this;this._incrementPreload();for(var i=arguments.length,s=new Array(i),n=0;n<i;n++)s[n]=arguments[n];var l=o.apply(this,s);return y.apply(this,s).then(function(c){Object.assign(l,c),r._decrementPreload()}),l};return a=f?a.bind(f):a}},{"./main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],289:[function(t,W,C){"use strict";function p(a){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(a)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var m=(o=t("./main"))&&o.__esModule?o:{default:o},u=(function(a){if(a&&a.__esModule)return a;if(a===null||g(a)!=="object"&&typeof a!="function")return{default:a};var r=f();if(r&&r.has(a))return r.get(a);var i,s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in a){var l;Object.prototype.hasOwnProperty.call(a,i)&&((l=n?Object.getOwnPropertyDescriptor(a,i):null)&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=a[i])}return s.default=a,r&&r.set(a,s),s})(t("./constants"));function f(){var a;return typeof WeakMap!="function"?null:(a=new WeakMap,f=function(){return a},a)}function g(a){return(g=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(r){return p(r)}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":p(r)})(a)}t("./p5.Graphics"),t("./p5.Renderer2D"),t("../webgl/p5.RendererGL");var y="defaultCanvas0",o=(m.default.prototype.createCanvas=function(a,r,i,s){var n,l,c;if(m.default._validateParameters("createCanvas",arguments),arguments[2]instanceof HTMLCanvasElement?(i=u.P2D,s=arguments[2]):n=i||u.P2D,s)(c=document.getElementById(y))&&c.parentNode.removeChild(c),c=s,this._defaultGraphicsCreated=!1;else{if(n===u.WEBGL)(c=document.getElementById(y))&&(c.parentNode.removeChild(c),l=this._renderer,this._elements=this._elements.filter(function(v){return v!==l})),(c=document.createElement("canvas")).id=y,c.classList.add("p5Canvas");else if(this._defaultGraphicsCreated)c=this.canvas;else{c=s||document.createElement("canvas");for(var d=0;document.getElementById("defaultCanvas".concat(d));)d++;y="defaultCanvas".concat(d),c.id=y,c.classList.add("p5Canvas")}this._setupDone||(c.dataset.hidden=!0,c.style.visibility="hidden"),(this._userNode||(document.getElementsByTagName("main").length===0&&(i=document.createElement("main"),document.body.appendChild(i)),document.getElementsByTagName("main")[0])).appendChild(c)}return n===u.WEBGL?(this._setProperty("_renderer",new m.default.RendererGL(c,this,!0)),this._elements.push(this._renderer),a=(s=this._renderer._adjustDimensions(a,r)).adjustedWidth,r=s.adjustedHeight):this._defaultGraphicsCreated||(this._setProperty("_renderer",new m.default.Renderer2D(c,this,!0)),this._defaultGraphicsCreated=!0,this._elements.push(this._renderer)),this._renderer.resize(a,r),this._renderer._applyDefaults(),this._renderer},m.default.prototype.resizeCanvas=function(a,r,i){if(m.default._validateParameters("resizeCanvas",arguments),this._renderer){var s,n,l,c={};for(s in this.drawingContext){var d=this.drawingContext[s];g(d)!=="object"&&typeof d!="function"&&(c[s]=d)}for(l in this._renderer instanceof m.default.RendererGL&&(a=(n=this._renderer._adjustDimensions(a,r)).adjustedWidth,r=n.adjustedHeight),this.width=a,this.height=r,this._renderer.resize(a,r),c)try{this.drawingContext[l]=c[l]}catch{}i||this.redraw()}this._addAccsOutput()&&this._updateAccsOutput()},m.default.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},m.default.prototype.createGraphics=function(a,r){for(var i=arguments.length,s=new Array(2<i?i-2:0),n=2;n<i;n++)s[n-2]=arguments[n];return s[0]instanceof HTMLCanvasElement&&(s[1]=s[0],s[0]=u.P2D),m.default._validateParameters("createGraphics",arguments),new m.default.Graphics(a,r,s[0],this,s[1])},m.default.prototype.createFramebuffer=function(a){return new m.default.Framebuffer(this,a)},m.default.prototype.clearDepth=function(a){this._assert3d("clearDepth"),this._renderer.clearDepth(a)},m.default.prototype.blendMode=function(a){m.default._validateParameters("blendMode",arguments),a===u.NORMAL&&(console.warn("NORMAL has been deprecated for use in blendMode. defaulting to BLEND instead."),a=u.BLEND),this._renderer.blendMode(a)},m.default);C.default=o},{"../webgl/p5.RendererGL":341,"./constants":272,"./main":283,"./p5.Graphics":285,"./p5.Renderer2D":287,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],290:[function(t,W,C){"use strict";function p(r){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function m(r){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(i){return p(i)}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":p(i)})(r)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.slice"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=o(t("../main")),f=(function(r){if(r&&r.__esModule)return r;if(r===null||m(r)!=="object"&&typeof r!="function")return{default:r};var i=y();if(i&&i.has(r))return i.get(r);var s,n={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(s in r){var c;Object.prototype.hasOwnProperty.call(r,s)&&((c=l?Object.getOwnPropertyDescriptor(r,s):null)&&(c.get||c.set)?Object.defineProperty(n,s,c):n[s]=r[s])}return n.default=r,i&&i.set(r,n),n})(t("../constants")),g=o(t("../helpers"));function y(){var r;return typeof WeakMap!="function"?null:(r=new WeakMap,y=function(){return r},r)}function o(r){return r&&r.__esModule?r:{default:r}}function a(r){return(function(i){if(Array.isArray(i)){for(var s=0,n=new Array(i.length);s<i.length;s++)n[s]=i[s];return n}})(r)||(function(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)})(r)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}t("../friendly_errors/fes_core"),t("../friendly_errors/file_errors"),t("../friendly_errors/validate_params"),u.default.prototype._normalizeArcAngles=function(r,i,s,n,l){var c;return r-=f.TWO_PI*Math.floor(r/f.TWO_PI),i-=f.TWO_PI*Math.floor(i/f.TWO_PI),c=Math.min(Math.abs(r-i),f.TWO_PI-Math.abs(r-i)),l&&(r=r<=f.HALF_PI?Math.atan(s/n*Math.tan(r)):r>f.HALF_PI&&r<=3*f.HALF_PI?Math.atan(s/n*Math.tan(r))+f.PI:Math.atan(s/n*Math.tan(r))+f.TWO_PI,i=i<=f.HALF_PI?Math.atan(s/n*Math.tan(i)):i>f.HALF_PI&&i<=3*f.HALF_PI?Math.atan(s/n*Math.tan(i))+f.PI:Math.atan(s/n*Math.tan(i))+f.TWO_PI),i<r&&(i+=f.TWO_PI),{start:r,stop:i,correspondToSamePoint:c<1e-5}},u.default.prototype.arc=function(r,i,s,n,l,c,d,v){return u.default._validateParameters("arc",arguments),(this._renderer._doStroke||this._renderer._doFill)&&l!==c&&(l=this._toRadians(l),c=this._toRadians(c),r=g.default.modeAdjust(r,i,s,n,this._renderer._ellipseMode),(i=this._normalizeArcAngles(l,c,r.w,r.h,!0)).correspondToSamePoint?this._renderer.ellipse([r.x,r.y,r.w,r.h,v]):(this._renderer.arc(r.x,r.y,r.w,r.h,i.start,i.stop,d,v),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("arc",[r.x,r.y,r.w,r.h,i.start,i.stop,d]))),this},u.default.prototype.ellipse=function(r,i,s,n,l){return u.default._validateParameters("ellipse",arguments),this._renderEllipse.apply(this,arguments)},u.default.prototype.circle=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];u.default._validateParameters("circle",i);var n=i.slice(0,2);return n.push(i[2],i[2]),this._renderEllipse.apply(this,a(n))},u.default.prototype._renderEllipse=function(r,i,s,n,l){return(this._renderer._doStroke||this._renderer._doFill)&&(r=g.default.modeAdjust(r,i,s,n=n===void 0?s:n,this._renderer._ellipseMode),this._renderer.ellipse([r.x,r.y,r.w,r.h,l]),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("ellipse",[r.x,r.y,r.w,r.h])),this},u.default.prototype.line=function(){for(var r,i=arguments.length,s=new Array(i),n=0;n<i;n++)s[n]=arguments[n];return u.default._validateParameters("line",s),this._renderer._doStroke&&(r=this._renderer).line.apply(r,s),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("line",s),this},u.default.prototype.point=function(){for(var r,i=arguments.length,s=new Array(i),n=0;n<i;n++)s[n]=arguments[n];return u.default._validateParameters("point",s),this._renderer._doStroke&&(s.length===1&&s[0]instanceof u.default.Vector?this._renderer.point.call(this._renderer,s[0].x,s[0].y,s[0].z):((r=this._renderer).point.apply(r,s),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("point",s))),this},u.default.prototype.quad=function(){for(var r,i=arguments.length,s=new Array(i),n=0;n<i;n++)s[n]=arguments[n];return u.default._validateParameters("quad",s),(this._renderer._doStroke||this._renderer._doFill)&&(this._renderer.isP3D&&s.length<12?this._renderer.quad.call(this._renderer,s[0],s[1],0,s[2],s[3],0,s[4],s[5],0,s[6],s[7],0,s[8],s[9]):((r=this._renderer).quad.apply(r,s),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("quadrilateral",s))),this},u.default.prototype.rect=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return u.default._validateParameters("rect",i),this._renderRect.apply(this,i)},u.default.prototype.square=function(r,i,s,n,l,c,d){return u.default._validateParameters("square",arguments),this._renderRect.call(this,r,i,s,s,n,l,c,d)},u.default.prototype._renderRect=function(){if(this._renderer._doStroke||this._renderer._doFill){arguments.length===3&&(arguments[3]=arguments[2]);for(var r=g.default.modeAdjust(arguments[0],arguments[1],arguments[2],arguments[3],this._renderer._rectMode),i=(this._renderer._rectMode===f.CORNER&&(r.w=arguments[2],r.h=arguments[3]),[r.x,r.y,r.w,r.h]),s=4;s<arguments.length;s++)i[s]=arguments[s];this._renderer.rect(i),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("rectangle",[r.x,r.y,r.w,r.h])}return this},u.default.prototype.triangle=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return u.default._validateParameters("triangle",i),(this._renderer._doStroke||this._renderer._doFill)&&this._renderer.triangle(i),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("triangle",i),this},t=u.default,C.default=t},{"../constants":272,"../friendly_errors/fes_core":274,"../friendly_errors/file_errors":275,"../friendly_errors/validate_params":278,"../helpers":279,"../main":283,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],291:[function(t,W,C){"use strict";function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function m(o){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(a){return p(a)}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":p(a)})(o)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(y=t("../main"))&&y.__esModule?y:{default:y},f=(function(o){if(o&&o.__esModule)return o;if(o===null||m(o)!=="object"&&typeof o!="function")return{default:o};var a=g();if(a&&a.has(o))return a.get(o);var r,i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in o){var n;Object.prototype.hasOwnProperty.call(o,r)&&((n=s?Object.getOwnPropertyDescriptor(o,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=o[r])}return i.default=o,a&&a.set(o,i),i})(t("../constants"));function g(){var o;return typeof WeakMap!="function"?null:(o=new WeakMap,g=function(){return o},o)}u.default.prototype.ellipseMode=function(o){return u.default._validateParameters("ellipseMode",arguments),o!==f.CORNER&&o!==f.CORNERS&&o!==f.RADIUS&&o!==f.CENTER||(this._renderer._ellipseMode=o),this},u.default.prototype.noSmooth=function(){return this._renderer.isP3D?this.setAttributes("antialias",!1):"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!1),this},u.default.prototype.rectMode=function(o){return u.default._validateParameters("rectMode",arguments),o!==f.CORNER&&o!==f.CORNERS&&o!==f.RADIUS&&o!==f.CENTER||(this._renderer._rectMode=o),this},u.default.prototype.smooth=function(){return this._renderer.isP3D?this.setAttributes("antialias",!0):"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!0),this},u.default.prototype.strokeCap=function(o){return u.default._validateParameters("strokeCap",arguments),o!==f.ROUND&&o!==f.SQUARE&&o!==f.PROJECT||this._renderer.strokeCap(o),this},u.default.prototype.strokeJoin=function(o){return u.default._validateParameters("strokeJoin",arguments),o!==f.ROUND&&o!==f.BEVEL&&o!==f.MITER||this._renderer.strokeJoin(o),this},u.default.prototype.strokeWeight=function(o){return u.default._validateParameters("strokeWeight",arguments),this._renderer.strokeWeight(o),this};var y=u.default;C.default=y},{"../constants":272,"../main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],292:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(m=t("../main"))&&m.__esModule?m:{default:m};t("../friendly_errors/fes_core"),t("../friendly_errors/file_errors"),t("../friendly_errors/validate_params"),p.default.prototype.bezier=function(){for(var u,f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return p.default._validateParameters("bezier",g),(this._renderer._doStroke||this._renderer._doFill)&&(u=this._renderer).bezier.apply(u,g),this},p.default.prototype.bezierDetail=function(u){return p.default._validateParameters("bezierDetail",arguments),this._bezierDetail=u,this},p.default.prototype.bezierPoint=function(u,f,g,y,o){p.default._validateParameters("bezierPoint",arguments);var a=1-o;return Math.pow(a,3)*u+3*Math.pow(a,2)*o*f+3*a*Math.pow(o,2)*g+Math.pow(o,3)*y},p.default.prototype.bezierTangent=function(u,f,g,y,o){p.default._validateParameters("bezierTangent",arguments);var a=1-o;return 3*y*Math.pow(o,2)-3*g*Math.pow(o,2)+6*g*a*o-6*f*a*o+3*f*Math.pow(a,2)-3*u*Math.pow(a,2)},p.default.prototype.curve=function(){for(var u,f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return p.default._validateParameters("curve",g),this._renderer._doStroke&&(u=this._renderer).curve.apply(u,g),this},p.default.prototype.curveDetail=function(u){return p.default._validateParameters("curveDetail",arguments),this._curveDetail=u<3?3:u,this},p.default.prototype.curveTightness=function(u){return p.default._validateParameters("curveTightness",arguments),this._renderer._curveTightness=u,this},p.default.prototype.curvePoint=function(u,f,g,y,o){p.default._validateParameters("curvePoint",arguments);var a=this._renderer._curveTightness,r=o*o*o,i=o*o;return u*((a-1)/2*r+(1-a)*i+(a-1)/2*o)+f*((a+3)/2*r+(-5-a)/2*i+1)+g*((-3-a)/2*r+(a+2)*i+(1-a)/2*o)+y*((1-a)/2*r+(a-1)/2*i)},p.default.prototype.curveTangent=function(u,f,g,y,i){p.default._validateParameters("curveTangent",arguments);var a=this._renderer._curveTightness,r=i*i*3,i=2*i;return u*((a-1)/2*r+(1-a)*i+(a-1)/2)+f*((a+3)/2*r+(-5-a)/2*i)+g*((-3-a)/2*r+(a+2)*i+(1-a)/2)+y*((1-a)/2*r+(a-1)/2*i)};var m=p.default;C.default=m},{"../friendly_errors/fes_core":274,"../friendly_errors/file_errors":275,"../friendly_errors/validate_params":278,"../main":283}],293:[function(t,W,C){"use strict";function p(d){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(d)}function m(d){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(v){return p(v)}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":p(v)})(d)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.slice"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(c=t("../main"))&&c.__esModule?c:{default:c},f=(function(d){if(d&&d.__esModule)return d;if(d===null||m(d)!=="object"&&typeof d!="function")return{default:d};var v=g();if(v&&v.has(d))return v.get(d);var S,E={},_=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(S in d){var x;Object.prototype.hasOwnProperty.call(d,S)&&((x=_?Object.getOwnPropertyDescriptor(d,S):null)&&(x.get||x.set)?Object.defineProperty(E,S,x):E[S]=d[S])}return E.default=d,v&&v.set(d,E),E})(t("../constants"));function g(){var d;return typeof WeakMap!="function"?null:(d=new WeakMap,g=function(){return d},d)}var y=null,o=[],a=[],r=!1,i=!1,s=!1,n=!1,l=!0,c=(u.default.prototype.beginContour=function(){return this._renderer.isP3D?this._renderer.beginContour():(a=[],n=!0),this},u.default.prototype.beginShape=function(d){var v;return u.default._validateParameters("beginShape",arguments),this._renderer.isP3D?(v=this._renderer).beginShape.apply(v,arguments):(y=d===f.POINTS||d===f.LINES||d===f.TRIANGLES||d===f.TRIANGLE_FAN||d===f.TRIANGLE_STRIP||d===f.QUADS||d===f.QUAD_STRIP?d:null,o=[],a=[]),this},u.default.prototype.bezierVertex=function(){for(var d,v=arguments.length,S=new Array(v),E=0;E<v;E++)S[E]=arguments[E];if(u.default._validateParameters("bezierVertex",S),this._renderer.isP3D)(d=this._renderer).bezierVertex.apply(d,S);else if(o.length===0)u.default._friendlyError("vertex() must be used once before calling bezierVertex()","bezierVertex");else{r=!0;for(var _=[],x=0;x<S.length;x++)_[x]=S[x];_.isVert=!1,(n?a:o).push(_)}return this},u.default.prototype.curveVertex=function(){for(var d,v=arguments.length,S=new Array(v),E=0;E<v;E++)S[E]=arguments[E];return u.default._validateParameters("curveVertex",S),this._renderer.isP3D?(d=this._renderer).curveVertex.apply(d,S):(i=!0,this.vertex(S[0],S[1])),this},u.default.prototype.endContour=function(){if(!this._renderer.isP3D){var d=a[0].slice();d.isVert=a[0].isVert,d.moveTo=!1,a.push(d),l&&(o.push(o[0]),l=!1);for(var v=0;v<a.length;v++)o.push(a[v])}return this},u.default.prototype.endShape=function(d){var v=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1;if(u.default._validateParameters("endShape",arguments),v<1&&(console.log("\u{1F338} p5.js says: You can not have less than one instance"),v=1),this._renderer.isP3D)this._renderer.endShape(d,i,r,s,n,y,v);else{if(v!==1&&console.log("\u{1F338} p5.js says: Instancing is only supported in WebGL2 mode"),o.length===0)return this;if(!this._renderer._doStroke&&!this._renderer._doFill)return this;v=d===f.CLOSE,v&&!n&&o.push(o[0]),this._renderer.endShape(d,o,i,r,s,n,y),l=!(n=s=r=i=!1),v&&o.pop()}return this},u.default.prototype.quadraticVertex=function(){for(var d,v=arguments.length,S=new Array(v),E=0;E<v;E++)S[E]=arguments[E];if(u.default._validateParameters("quadraticVertex",S),this._renderer.isP3D)(d=this._renderer).quadraticVertex.apply(d,S);else{if(this._contourInited)return(d={}).x=S[0],d.y=S[1],d.x3=S[2],d.y3=S[3],d.type=f.QUADRATIC,this._contourVertices.push(d),this;if(0<o.length){s=!0;for(var _=[],x=0;x<S.length;x++)_[x]=S[x];_.isVert=!1,(n?a:o).push(_)}else u.default._friendlyError("vertex() must be used once before calling quadraticVertex()","quadraticVertex")}return this},u.default.prototype.vertex=function(d,v,S,E,_){var x;return this._renderer.isP3D?(x=this._renderer).vertex.apply(x,arguments):((x=[]).isVert=!0,x[0]=d,x[1]=v,x[2]=0,x[3]=0,x[4]=0,x[5]=this._renderer._getFill(),x[6]=this._renderer._getStroke(),S&&(x.moveTo=S),(n?(a.length===0&&(x.moveTo=!0),a):o).push(x)),this},u.default.prototype.normal=function(d,v,S){var E;return this._assert3d("normal"),u.default._validateParameters("normal",arguments),(E=this._renderer).normal.apply(E,arguments),this},u.default);C.default=c},{"../constants":272,"../main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],294:[function(t,W,C){},{}],295:[function(t,W,C){"use strict";t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.assign"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("./main"))&&t.__esModule?t:{default:t},t.default.prototype.noLoop=function(){this._loop=!1},t.default.prototype.loop=function(){this._loop||(this._loop=!0,this._setupDone&&this._draw())},t.default.prototype.isLooping=function(){return this._loop},t.default.prototype.push=function(){this._styles.push({props:{_colorMode:this._colorMode},renderer:this._renderer.push()})},t.default.prototype.pop=function(){var p=this._styles.pop();p?(this._renderer.pop(p.renderer),Object.assign(this,p.props)):console.warn("pop() was called without matching push()")},t.default.prototype.redraw=function(p){if(!this._inUserDraw&&this._setupDone){var m=parseInt(p),u=((isNaN(m)||m<1)&&(m=1),this._isGlobal?window:this);if(typeof u.draw=="function"){u.setup===void 0&&u.scale(u._pixelDensity,u._pixelDensity);for(var f=0;f<m;f++){u.resetMatrix(),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._updateAccsOutput(),u._renderer.isP3D&&u._renderer._update(),u._setProperty("frameCount",u.frameCount+1),this.callRegisteredHooksFor("pre"),this._inUserDraw=!0;try{u.draw()}finally{this._inUserDraw=!1}this.callRegisteredHooksFor("post")}}}},t=t.default,C.default=t},{"./main":283,"core-js/modules/es.object.assign":183}],296:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("./main"))&&t.__esModule?t:{default:t};function m(u){return(function(f){if(Array.isArray(f)){for(var g=0,y=new Array(f.length);g<f.length;g++)y[g]=f[g];return y}})(u)||(function(f){if(Symbol.iterator in Object(f)||Object.prototype.toString.call(f)==="[object Arguments]")return Array.from(f)})(u)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}p.default.prototype.applyMatrix=function(){var u=(arguments.length<=0?void 0:arguments[0])instanceof Object.getPrototypeOf(Uint8Array);return Array.isArray(arguments.length<=0?void 0:arguments[0])||u?(u=this._renderer).applyMatrix.apply(u,m(arguments.length<=0?void 0:arguments[0])):(u=this._renderer).applyMatrix.apply(u,arguments),this},p.default.prototype.resetMatrix=function(){return this._renderer.resetMatrix(),this},p.default.prototype.rotate=function(u,f){return p.default._validateParameters("rotate",arguments),this._renderer.rotate(this._toRadians(u),f),this},p.default.prototype.rotateX=function(u){return this._assert3d("rotateX"),p.default._validateParameters("rotateX",arguments),this._renderer.rotateX(this._toRadians(u)),this},p.default.prototype.rotateY=function(u){return this._assert3d("rotateY"),p.default._validateParameters("rotateY",arguments),this._renderer.rotateY(this._toRadians(u)),this},p.default.prototype.rotateZ=function(u){return this._assert3d("rotateZ"),p.default._validateParameters("rotateZ",arguments),this._renderer.rotateZ(this._toRadians(u)),this},p.default.prototype.scale=function(u,f,g){var y;return p.default._validateParameters("scale",arguments),u instanceof p.default.Vector?(u=(y=u).x,f=y.y,g=y.z):Array.isArray(u)&&(u=(y=u)[0],f=y[1],g=y[2]||1),isNaN(f)?f=g=u:isNaN(g)&&(g=1),this._renderer.scale(u,f,g),this},p.default.prototype.shearX=function(u){return p.default._validateParameters("shearX",arguments),u=this._toRadians(u),this._renderer.applyMatrix(1,0,Math.tan(u),1,0,0),this},p.default.prototype.shearY=function(u){return p.default._validateParameters("shearY",arguments),u=this._toRadians(u),this._renderer.applyMatrix(1,Math.tan(u),0,1,0,0),this},p.default.prototype.translate=function(u,f,g){return p.default._validateParameters("translate",arguments),this._renderer.isP3D?this._renderer.translate(u,f,g):this._renderer.translate(u,f),this},t=p.default,C.default=t},{"./main":283,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/web.dom-collections.iterator":246}],297:[function(t,W,C){"use strict";function p(g){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(g)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator");var m=(t=t("../core/main"))&&t.__esModule?t:{default:t};function u(g){return(function(y){if(Array.isArray(y)){for(var o=0,a=new Array(y.length);o<y.length;o++)a[o]=y[o];return a}})(g)||(function(y){if(Symbol.iterator in Object(y)||Object.prototype.toString.call(y)==="[object Arguments]")return Array.from(y)})(g)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}function f(g){return(f=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(y){return p(y)}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":p(y)})(g)}m.default.prototype.storeItem=function(g,y){typeof g!="string"&&console.log("The argument that you passed to storeItem() - ".concat(g," is not a string.")),g.endsWith("p5TypeID")&&console.log("The argument that you passed to storeItem() - ".concat(g," must not end with 'p5TypeID'.")),y===void 0&&console.log("You cannot store undefined variables using storeItem().");var o=f(y);switch(o){case"number":case"boolean":y=y.toString();break;case"object":y instanceof m.default.Color?o="p5.Color":y instanceof m.default.Vector&&(o="p5.Vector",y=[y.x,y.y,y.z]),y=JSON.stringify(y)}localStorage.setItem(g,y),g="".concat(g,"p5TypeID"),localStorage.setItem(g,o)},m.default.prototype.getItem=function(g){var y=localStorage.getItem(g),o=localStorage.getItem("".concat(g,"p5TypeID"));if(o===void 0)console.log("Unable to determine type of item stored under ".concat(g,"in local storage. Did you save the item with something other than setItem()?"));else if(y!==null)switch(o){case"number":y=parseFloat(y);break;case"boolean":y=y==="true";break;case"object":y=JSON.parse(y);break;case"p5.Color":y=JSON.parse(y),y=this.color.apply(this,u(y.levels));break;case"p5.Vector":y=JSON.parse(y),y=this.createVector.apply(this,u(y))}return y},m.default.prototype.clearStorage=function(){var g=this;Object.keys(localStorage).forEach(function(y){y.endsWith("p5TypeID")&&g.removeItem(y.replace("p5TypeID",""))})},m.default.prototype.removeItem=function(g){typeof g!="string"&&console.log("The argument that you passed to removeItem() - ".concat(g," is not a string.")),localStorage.removeItem(g),localStorage.removeItem("".concat(g,"p5TypeID"))}},{"../core/main":283,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.ends-with":198,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],298:[function(t,W,C){"use strict";function p(s){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function m(s){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(n){return p(n)}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":p(n)})(s)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.object.keys"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(t=t("../core/main"))&&t.__esModule?t:{default:t};function f(s,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(n&&n.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),n&&g(s,n)}function g(s,n){return(g=Object.setPrototypeOf||function(l,c){return l.__proto__=c,l})(s,n)}function y(s){return function(){var n,l=o(s),l=(n=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(n=o(this).constructor,Reflect.construct(l,arguments,n)):l.apply(this,arguments),this);if(!n||m(n)!=="object"&&typeof n!="function"){if(l!==void 0)return l;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return n}}function o(s){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}function a(s,n){if(!(s instanceof n))throw new TypeError("Cannot call a class as a function")}function r(s,n){for(var l=0;l<n.length;l++){var c=n[l];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,c.key,c)}}function i(s,n,l){n&&r(s.prototype,n),l&&r(s,l)}u.default.prototype.createStringDict=function(s,n){return u.default._validateParameters("createStringDict",arguments),new u.default.StringDict(s,n)},u.default.prototype.createNumberDict=function(s,n){return u.default._validateParameters("createNumberDict",arguments),new u.default.NumberDict(s,n)},u.default.TypedDict=(function(){function s(n,l){return a(this,s),n instanceof Object?this.data=n:(this.data={},this.data[n]=l),this}return i(s,[{key:"size",value:function(){return Object.keys(this.data).length}},{key:"hasKey",value:function(n){return this.data.hasOwnProperty(n)}},{key:"get",value:function(n){if(this.data.hasOwnProperty(n))return this.data[n];console.log("".concat(n," does not exist in this Dictionary"))}},{key:"set",value:function(n,l){this._validate(l)?this.data[n]=l:console.log("Those values dont work for this dictionary type.")}},{key:"_addObj",value:function(n){for(var l in n)this.set(l,n[l])}},{key:"create",value:function(n,l){n instanceof Object&&l===void 0?this._addObj(n):n!==void 0?this.set(n,l):console.log("In order to create a new Dictionary entry you must pass an object or a key, value pair")}},{key:"clear",value:function(){this.data={}}},{key:"remove",value:function(n){if(!this.data.hasOwnProperty(n))throw new Error("".concat(n," does not exist in this Dictionary"));delete this.data[n]}},{key:"print",value:function(){for(var n in this.data)console.log("key:".concat(n," value:").concat(this.data[n]))}},{key:"saveTable",value:function(n){var l,c="";for(l in this.data)c+="".concat(l,",").concat(this.data[l],`
`);var d=new Blob([c],{type:"text/csv"});u.default.prototype.downloadFile(d,n||"mycsv","csv")}},{key:"saveJSON",value:function(n,l){u.default.prototype.saveJSON(this.data,n,l)}},{key:"_validate",value:function(n){return!0}}]),s})(),u.default.StringDict=(function(){f(n,u.default.TypedDict);var s=y(n);function n(){a(this,n);for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return s.call.apply(s,[this].concat(c))}return i(n,[{key:"_validate",value:function(l){return typeof l=="string"}}]),n})(),u.default.NumberDict=(function(){f(n,u.default.TypedDict);var s=y(n);function n(){a(this,n);for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return s.call.apply(s,[this].concat(c))}return i(n,[{key:"_validate",value:function(l){return typeof l=="number"}},{key:"add",value:function(l,c){this.data.hasOwnProperty(l)?this.data[l]+=c:console.log("The key - ".concat(l," does not exist in this dictionary."))}},{key:"sub",value:function(l,c){this.add(l,-c)}},{key:"mult",value:function(l,c){this.data.hasOwnProperty(l)?this.data[l]*=c:console.log("The key - ".concat(l," does not exist in this dictionary."))}},{key:"div",value:function(l,c){this.data.hasOwnProperty(l)?this.data[l]/=c:console.log("The key - ".concat(l," does not exist in this dictionary."))}},{key:"_valueTest",value:function(l){if(Object.keys(this.data).length===0)throw new Error("Unable to search for a minimum or maximum value on an empty NumberDict");if(Object.keys(this.data).length===1)return this.data[Object.keys(this.data)[0]];var c,d=this.data[Object.keys(this.data)[0]];for(c in this.data)this.data[c]*l<d*l&&(d=this.data[c]);return d}},{key:"minValue",value:function(){return this._valueTest(1)}},{key:"maxValue",value:function(){return this._valueTest(-1)}},{key:"_keyTest",value:function(l){if(Object.keys(this.data).length===0)throw new Error("Unable to use minValue on an empty NumberDict");if(Object.keys(this.data).length===1)return Object.keys(this.data)[0];for(var c=Object.keys(this.data)[0],d=1;d<Object.keys(this.data).length;d++)Object.keys(this.data)[d]*l<c*l&&(c=Object.keys(this.data)[d]);return c}},{key:"minKey",value:function(){return this._keyTest(1)}},{key:"maxKey",value:function(){return this._keyTest(-1)}}]),n})(),t=u.default.TypedDict,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],299:[function(t,W,C){"use strict";function p(d){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(d)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var m=(t=t("../core/main"))&&t.__esModule?t:{default:t};function u(d,v){for(var S=0;S<v.length;S++){var E=v[S];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(d,E.key,E)}}function f(d,v,S){v&&u(d.prototype,v),S&&u(d,S)}function g(d,v){return(g=Object.setPrototypeOf||function(S,E){return S.__proto__=E,S})(d,v)}function y(d){return function(){var v,S,E=a(d);return v=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(v=a(this).constructor,Reflect.construct(E,arguments,v)):E.apply(this,arguments),E=this,!(S=v)||i(S)!=="object"&&typeof S!="function"?o(E):S}}function o(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function a(d){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(d)}function r(d,v){if(!(d instanceof v))throw new TypeError("Cannot call a class as a function")}function i(d){return(i=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(v){return p(v)}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":p(v)})(d)}function s(d,v,S){return(v._userNode||document.body).appendChild(d),S=new(S?m.default.MediaElement:m.default.Element)(d,v),v._elements.push(S),S}m.default.prototype.select=function(d,v){return m.default._validateParameters("select",arguments),v=this._getContainer(v).querySelector(d),v?this._wrapElement(v):null},m.default.prototype.selectAll=function(d,v){m.default._validateParameters("selectAll",arguments);var S=[],E=this._getContainer(v).querySelectorAll(d);if(E)for(var _=0;_<E.length;_++){var x=this._wrapElement(E[_]);S.push(x)}return S},m.default.prototype._getContainer=function(d){var v=document;return typeof d=="string"?v=document.querySelector(d)||document:d instanceof m.default.Element?v=d.elt:d instanceof HTMLElement&&(v=d),v},m.default.prototype._wrapElement=function(d){var v,S=Array.prototype.slice.call(d.children);return d.tagName==="INPUT"&&d.type==="checkbox"?((v=new m.default.Element(d,this)).checked=function(){return arguments.length===0?this.elt.checked:(this.elt.checked=!(arguments.length<=0||!arguments[0]),this)},v):d.tagName==="VIDEO"||d.tagName==="AUDIO"?new m.default.MediaElement(d,this):d.tagName==="SELECT"?this.createSelect(new m.default.Element(d,this)):0<S.length&&S.every(function(E){return E.tagName==="INPUT"||E.tagName==="LABEL"})&&(d.tagName==="DIV"||d.tagName==="SPAN")?this.createRadio(new m.default.Element(d,this)):new m.default.Element(d,this)},m.default.prototype.removeElements=function(d){m.default._validateParameters("removeElements",arguments),this._elements.filter(function(v){return!(v.elt instanceof HTMLCanvasElement)}).map(function(v){return v.remove()})},m.default.Element.prototype.changed=function(d){return m.default.Element._adjustListener("change",d,this),this},m.default.Element.prototype.input=function(d){return m.default.Element._adjustListener("input",d,this),this},m.default.prototype.createDiv=function(){var d=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",v=document.createElement("div");return v.innerHTML=d,s(v,this)},m.default.prototype.createP=function(){var d=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",v=document.createElement("p");return v.innerHTML=d,s(v,this)},m.default.prototype.createSpan=function(){var d=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",v=document.createElement("span");return v.innerHTML=d,s(v,this)},m.default.prototype.createImg=function(){m.default._validateParameters("createImg",arguments);var d,v=document.createElement("img"),S=arguments;return 1<S.length&&typeof S[1]=="string"&&(v.alt=S[1]),2<S.length&&typeof S[2]=="string"&&(v.crossOrigin=S[2]),v.src=S[0],d=s(v,this),v.addEventListener("load",function(){d.width=v.offsetWidth||v.width,d.height=v.offsetHeight||v.height;var E=S[S.length-1];typeof E=="function"&&E(d)}),d},m.default.prototype.createA=function(d,v,S){m.default._validateParameters("createA",arguments);var E=document.createElement("a");return E.href=d,E.innerHTML=v,S&&(E.target=S),s(E,this)},m.default.prototype.createSlider=function(d,v,S,E){m.default._validateParameters("createSlider",arguments);var _=document.createElement("input");return _.type="range",_.min=d,_.max=v,E===0?_.step=1e-18:E&&(_.step=E),typeof S=="number"&&(_.value=S),s(_,this)},m.default.prototype.createButton=function(d,v){m.default._validateParameters("createButton",arguments);var S=document.createElement("button");return S.innerHTML=d,v&&(S.value=v),s(S,this)},m.default.prototype.createCheckbox=function(){for(var d=arguments.length,v=new Array(d),S=0;S<d;S++)v[S]=arguments[S];m.default._validateParameters("createCheckbox",v);var E=document.createElement("div"),_=document.createElement("input"),x=(_.type="checkbox",document.createElement("label")),O=(x.appendChild(_),E.appendChild(x),s(E,this));return O.checked=function(){var T=O.elt.firstElementChild.getElementsByTagName("input")[0];if(T){if(arguments.length===0)return T.checked;T.checked=!(arguments.length<=0||!arguments[0])}return O},this.value=function(T){return O.value=T,this},v[0]&&(O.value(v[0]),(E=document.createElement("span")).innerHTML=v[0],x.appendChild(E)),v[1]&&(_.checked=!0),O},m.default.prototype.createSelect=function(){for(var d,v=arguments.length,S=new Array(v),E=0;E<v;E++)S[E]=arguments[E];m.default._validateParameters("createSelect",S);var _,x=S[0];return x instanceof m.default.Element&&x.elt instanceof HTMLSelectElement?this.elt=(d=x).elt:x instanceof HTMLSelectElement?(d=s(x,this),this.elt=x):(_=document.createElement("select"),x&&typeof x=="boolean"&&_.setAttribute("multiple","true"),d=s(_,this),this.elt=_),d.option=function(O,T){var P;if(O!==void 0){for(var M,F=0;F<this.elt.length;F+=1)if(this.elt[F].textContent===O){P=F;break}P!==void 0?T===!1?this.elt.remove(P):this.elt[P].value=T:((M=document.createElement("option")).textContent=O,M.value=T===void 0?O:T,this.elt.appendChild(M),this._pInst._elements.push(M))}},d.selected=function(O){if(O!==void 0){for(var T=0;T<this.elt.length;T+=1)this.elt[T].value.toString()===O.toString()&&(this.elt.selectedIndex=T);return this}if(this.elt.getAttribute("multiple")){var P=[],M=!0,F=!1,D=void 0;try{for(var A,z=this.elt.selectedOptions[Symbol.iterator]();!(M=(A=z.next()).done);M=!0){var G=A.value;P.push(G.value)}}catch(U){F=!0,D=U}finally{try{M||z.return==null||z.return()}finally{if(F)throw D}}return P}return this.elt.value},d.disable=function(O){if(typeof O=="string")for(var T=0;T<this.elt.length;T++)this.elt[T].value.toString()===O&&(this.elt[T].disabled=!0,this.elt[T].selected=!1);else this.elt.disabled=!0;return this},d.enable=function(O){if(typeof O=="string")for(var T=0;T<this.elt.length;T++)this.elt[T].value.toString()===O&&(this.elt[T].disabled=!1,this.elt[T].selected=!1);else{this.elt.disabled=!1;for(var P=0;P<this.elt.length;P++)this.elt[P].disabled=!1,this.elt[P].selected=!1}return this},d};var n=0;function l(d,O,S,E){var _=document.createElement(O),x=(typeof(S=S||"")=="string"&&(S=[S]),!0),O=!1,T=void 0;try{for(var P,M=S[Symbol.iterator]();!(x=(P=M.next()).done);x=!0){var F=P.value,D=document.createElement("source");D.setAttribute("src",F),_.appendChild(D)}}catch(z){O=!0,T=z}finally{try{x||M.return==null||M.return()}finally{if(O)throw T}}var A=s(_,d,!0);return A.loadedmetadata=!1,_.addEventListener("loadedmetadata",function(){A.width=_.videoWidth,A.height=_.videoHeight,A.elt.width===0&&(A.elt.width=_.videoWidth),A.elt.height===0&&(A.elt.height=_.videoHeight),A.presetPlaybackRate&&(A.elt.playbackRate=A.presetPlaybackRate,delete A.presetPlaybackRate),A.loadedmetadata=!0}),typeof E=="function"&&_.addEventListener("canplaythrough",function z(){E(A),_.removeEventListener("canplaythrough",z)}),A}m.default.prototype.createRadio=function(){function d(O){return O instanceof HTMLInputElement&&O.type==="radio"}function v(O){return O instanceof HTMLLabelElement}var S,E,_,x=arguments.length<=0?void 0:arguments[0];return x instanceof m.default.Element&&(x.elt instanceof HTMLDivElement||x.elt instanceof HTMLSpanElement)?(S=x,this.elt=x.elt):x instanceof HTMLDivElement||x instanceof HTMLSpanElement?(S=s(x,this),E=this.elt=x,typeof(arguments.length<=1?void 0:arguments[1])=="string"&&(_=arguments.length<=1?void 0:arguments[1])):(typeof x=="string"&&(_=x),E=document.createElement("div"),S=s(E,this),this.elt=E),S._name=_||"radioOption_".concat(n++),S._getOptionsArray=function(){return Array.from(this.elt.children).filter(function(O){return d(O)||v(O)&&d(O.firstElementChild)}).map(function(O){return d(O)?O:O.firstElementChild})},S.option=function(O,T){var P,M,F,D=!0,A=!1,z=void 0;try{for(var G,U=S._getOptionsArray()[Symbol.iterator]();!(D=(G=U.next()).done);D=!0){var H=G.value;if(H.value===O){P=H;break}}}catch(Y){A=!0,z=Y}finally{try{D||U.return==null||U.return()}finally{if(A)throw z}}return P===void 0&&((P=document.createElement("input")).setAttribute("type","radio"),P.setAttribute("value",O)),P.setAttribute("name",S._name),v(P.parentElement)?M=P.parentElement:(M=document.createElement("label")).insertAdjacentElement("afterbegin",P),M.lastElementChild instanceof HTMLSpanElement?F=M.lastElementChild:(F=document.createElement("span"),P.insertAdjacentElement("afterend",F)),F.innerHTML=T===void 0?O:T,this.elt.appendChild(M),P},S.remove=function(O){var T=!0,P=!1,M=void 0;try{for(var F,D=S._getOptionsArray()[Symbol.iterator]();!(T=(F=D.next()).done);T=!0){var A=F.value;if(A.value===O)return void(v(A.parentElement)?A.parentElement:A).remove()}}catch(z){P=!0,M=z}finally{try{T||D.return==null||D.return()}finally{if(P)throw M}}},S.value=function(){var O="",T=!0,P=!1,M=void 0;try{for(var F,D=S._getOptionsArray()[Symbol.iterator]();!(T=(F=D.next()).done);T=!0){var A=F.value;if(A.checked){O=A.value;break}}}catch(z){P=!0,M=z}finally{try{T||D.return==null||D.return()}finally{if(P)throw M}}return O},S.selected=function(O){var T=null;if(O===void 0){var P=!0,M=!1,F=void 0;try{for(var D,A=S._getOptionsArray()[Symbol.iterator]();!(P=(D=A.next()).done);P=!0){var z=D.value;if(z.checked){T=z;break}}}catch(oe){M=!0,F=oe}finally{try{P||A.return==null||A.return()}finally{if(M)throw F}}}else{S._getOptionsArray().forEach(function(j){j.checked=!1,j.removeAttribute("checked")});var G=!0,M=!1,F=void 0;try{for(var U,H=S._getOptionsArray()[Symbol.iterator]();!(G=(U=H.next()).done);G=!0){var Y=U.value;Y.value===O&&(Y.setAttribute("checked",!0),Y.checked=!0,T=Y)}}catch(j){M=!0,F=j}finally{try{G||H.return==null||H.return()}finally{if(M)throw F}}}return T},S.disable=function(){var O=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0],T=!0,P=!1,M=void 0;try{for(var F,D=S._getOptionsArray()[Symbol.iterator]();!(T=(F=D.next()).done);T=!0)F.value.setAttribute("disabled",O)}catch(A){P=!0,M=A}finally{try{T||D.return==null||D.return()}finally{if(P)throw M}}},S},m.default.prototype.createColorPicker=function(d){m.default._validateParameters("createColorPicker",arguments);var v=document.createElement("input");return v.type="color",d?d instanceof m.default.Color?v.value=d.toString("#rrggbb"):(m.default.prototype._colorMode="rgb",m.default.prototype._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},v.value=m.default.prototype.color(d).toString("#rrggbb")):v.value="#000000",(v=s(v,this)).color=function(){return d&&(d.mode&&(m.default.prototype._colorMode=d.mode),d.maxes&&(m.default.prototype._colorMaxes=d.maxes)),m.default.prototype.color(this.elt.value)},v},m.default.prototype.createInput=function(){var d=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",v=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"text",S=(m.default._validateParameters("createInput",arguments),document.createElement("input"));return S.setAttribute("value",d),S.setAttribute("type",v),s(S,this)},m.default.prototype.createFileInput=function(d){var v,S=1<arguments.length&&arguments[1]!==void 0&&arguments[1];if(m.default._validateParameters("createFileInput",arguments),window.File&&window.FileReader&&window.FileList&&window.Blob)return(v=document.createElement("input")).setAttribute("type","file"),S&&v.setAttribute("multiple",!0),v.addEventListener("change",function(E){var _=!0,x=!1,O=void 0;try{for(var T,P=E.target.files[Symbol.iterator]();!(_=(T=P.next()).done);_=!0){var M=T.value;m.default.File._load(M,d)}}catch(F){x=!0,O=F}finally{try{_||P.return==null||P.return()}finally{if(x)throw O}}},!1),s(v,this);console.log("The File APIs are not fully supported in this browser. Cannot create element.")},m.default.prototype.createVideo=function(d,v){return m.default._validateParameters("createVideo",arguments),l(this,"video",d,v)},m.default.prototype.createAudio=function(d,v){return m.default._validateParameters("createAudio",arguments),l(this,"audio",d,v)},m.default.prototype.VIDEO="video",m.default.prototype.AUDIO="audio",navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(d){var v=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return v?new Promise(function(S,E){v.call(navigator,d,S,E)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),m.default.prototype.createCapture=function(){for(var d=arguments.length,v=new Array(d),S=0;S<d;S++)v[S]=arguments[S];if(m.default._validateParameters("createCapture",v),!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)throw new DOMException("getUserMedia not supported in this browser");for(var E,_=!0,x=!0,O=!1,T=0,P=v;T<P.length;T++){var M=P[T];M===m.default.prototype.VIDEO?x=!1:M===m.default.prototype.AUDIO?_=!1:i(M)==="object"?(M.flipped!==void 0&&(O=M.flipped,delete M.flipped),F=Object.assign({},F,M)):typeof M=="function"&&(E=M)}var F=Object.assign({},{video:_,audio:x},F),D=document.createElement("video"),A=(D.setAttribute("playsinline",""),navigator.mediaDevices.getUserMedia(F).then(function(z){try{"srcObject"in D?D.srcObject=z:D.src=window.URL.createObjectURL(z)}catch{D.src=z}}).catch(function(z){z.name==="NotFoundError"&&m.default._friendlyError("No webcam found on this device","createCapture"),z.name==="NotAllowedError"&&m.default._friendlyError("Access to the camera was denied","createCapture"),console.error(z)}),s(D,this,!0));return A.loadedmetadata=!1,D.addEventListener("loadedmetadata",function(){D.play(),D.width?(A.width=D.width,A.height=D.height,O&&(A.elt.style.transform="scaleX(-1)")):(A.width=A.elt.width=D.videoWidth,A.height=A.elt.height=D.videoHeight),A.loadedmetadata=!0,E&&E(D.srcObject)}),A.flipped=O,A},m.default.prototype.createElement=function(d,v){return m.default._validateParameters("createElement",arguments),d=document.createElement(d),v!==void 0&&(d.innerHTML=v),s(d,this)},m.default.Element.prototype.addClass=function(d){return this.elt.className?this.hasClass(d)||(this.elt.className=this.elt.className+" "+d):this.elt.className=d,this},m.default.Element.prototype.removeClass=function(d){return this.elt.classList.remove(d),this},m.default.Element.prototype.hasClass=function(d){return this.elt.classList.contains(d)},m.default.Element.prototype.toggleClass=function(d){return this.elt.classList.contains(d)?this.elt.classList.remove(d):this.elt.classList.add(d),this},m.default.Element.prototype.child=function(d){return d===void 0?this.elt.childNodes:(typeof d=="string"?(d[0]==="#"&&(d=d.substring(1)),d=document.getElementById(d)):d instanceof m.default.Element&&(d=d.elt),d instanceof HTMLElement&&this.elt.appendChild(d),this)},m.default.Element.prototype.center=function(d){var v=this.elt.style.display,S=this.elt.style.display==="none",E=this.parent().style.display==="none",_={x:this.elt.offsetLeft,y:this.elt.offsetTop},x=(S&&this.show(),E&&this.parent().show(),this.elt.style.display="block",this.position(0,0),Math.abs(this.parent().offsetWidth-this.elt.offsetWidth)),O=Math.abs(this.parent().offsetHeight-this.elt.offsetHeight);return d==="both"||d===void 0?this.position(x/2+this.parent().offsetLeft,O/2+this.parent().offsetTop):d==="horizontal"?this.position(x/2+this.parent().offsetLeft,_.y):d==="vertical"&&this.position(_.x,O/2+this.parent().offsetTop),this.style("display",v),S&&this.hide(),E&&this.parent().hide(),this},m.default.Element.prototype.html=function(){return arguments.length===0?this.elt.innerHTML:(arguments.length<=1||!arguments[1]?this.elt.innerHTML=arguments.length<=0?void 0:arguments[0]:this.elt.insertAdjacentHTML("beforeend",arguments.length<=0?void 0:arguments[0]),this)},m.default.Element.prototype.position=function(){return arguments.length===0?{x:this.elt.offsetLeft,y:this.elt.offsetTop}:(this.elt.style.position=(arguments.length<=2?void 0:arguments[2])!=="static"&&(arguments.length<=2?void 0:arguments[2])!=="fixed"&&(arguments.length<=2?void 0:arguments[2])!=="relative"&&(arguments.length<=2?void 0:arguments[2])!=="sticky"&&(arguments.length<=2?void 0:arguments[2])!=="initial"&&(arguments.length<=2?void 0:arguments[2])!=="inherit"?"absolute":arguments.length<=2?void 0:arguments[2],this.elt.style.left=(arguments.length<=0?void 0:arguments[0])+"px",this.elt.style.top=(arguments.length<=1?void 0:arguments[1])+"px",this.x=arguments.length<=0?void 0:arguments[0],this.y=arguments.length<=1?void 0:arguments[1],this)},m.default.Element.prototype._translate=function(){this.elt.style.position="absolute";var d="";return this.elt.style.transform&&(d=(d=this.elt.style.transform.replace(/translate3d\(.*\)/g,"")).replace(/translate[X-Z]?\(.*\)/g,"")),arguments.length===2?this.elt.style.transform="translate("+(arguments.length<=0?void 0:arguments[0])+"px, "+(arguments.length<=1?void 0:arguments[1])+"px)":2<arguments.length&&(this.elt.style.transform="translate3d("+(arguments.length<=0?void 0:arguments[0])+"px,"+(arguments.length<=1?void 0:arguments[1])+"px,"+(arguments.length<=2?void 0:arguments[2])+"px)",this.elt.parentElement.style.perspective=arguments.length===3?"1000px":(arguments.length<=3?void 0:arguments[3])+"px"),this.elt.style.transform+=d,this},m.default.Element.prototype._rotate=function(){var d="";return this.elt.style.transform&&(d=(d=this.elt.style.transform.replace(/rotate3d\(.*\)/g,"")).replace(/rotate[X-Z]?\(.*\)/g,"")),arguments.length===1?this.elt.style.transform="rotate("+(arguments.length<=0?void 0:arguments[0])+"deg)":arguments.length===2?this.elt.style.transform="rotate("+(arguments.length<=0?void 0:arguments[0])+"deg, "+(arguments.length<=1?void 0:arguments[1])+"deg)":arguments.length===3&&(this.elt.style.transform="rotateX("+(arguments.length<=0?void 0:arguments[0])+"deg)",this.elt.style.transform+="rotateY("+(arguments.length<=1?void 0:arguments[1])+"deg)",this.elt.style.transform+="rotateZ("+(arguments.length<=2?void 0:arguments[2])+"deg)"),this.elt.style.transform+=d,this},m.default.Element.prototype.style=function(d,v){if((v=v instanceof m.default.Color?"rgba("+v.levels[0]+","+v.levels[1]+","+v.levels[2]+","+v.levels[3]/255+")":v)===void 0){if(d.indexOf(":")===-1)return window.getComputedStyle(this.elt).getPropertyValue(d);for(var S=d.split(";"),E=0;E<S.length;E++){var _=S[E].split(":");_[0]&&_[1]&&(this.elt.style[_[0].trim()]=_[1].trim())}}else this.elt.style[d]=v,d!=="width"&&d!=="height"&&d!=="left"&&d!=="top"||(v=window.getComputedStyle(this.elt).getPropertyValue(d).replace(/[^\d.]/g,""),this[d]=Math.round(parseFloat(v,10)));return this},m.default.Element.prototype.attribute=function(d,v){if(this.elt.firstChild==null||this.elt.firstChild.type!=="checkbox"&&this.elt.firstChild.type!=="radio")return v===void 0?this.elt.getAttribute(d):(this.elt.setAttribute(d,v),this);if(v===void 0)return this.elt.firstChild.getAttribute(d);for(var S=0;S<this.elt.childNodes.length;S++)this.elt.childNodes[S].setAttribute(d,v)},m.default.Element.prototype.removeAttribute=function(d){if(this.elt.firstChild!=null&&(this.elt.firstChild.type==="checkbox"||this.elt.firstChild.type==="radio"))for(var v=0;v<this.elt.childNodes.length;v++)this.elt.childNodes[v].removeAttribute(d);return this.elt.removeAttribute(d),this},m.default.Element.prototype.value=function(){return 0<arguments.length?(this.elt.value=arguments.length<=0?void 0:arguments[0],this):this.elt.type==="range"?parseFloat(this.elt.value):this.elt.value},m.default.Element.prototype.show=function(){return this.elt.style.display="block",this},m.default.Element.prototype.hide=function(){return this.elt.style.display="none",this},m.default.Element.prototype.size=function(d,v){if(arguments.length===0)return{width:this.elt.offsetWidth,height:this.elt.offsetHeight};var S=d,E=v,_=m.default.prototype.AUTO;if(S!==_||E!==_){if(S===_?S=v*this.width/this.height:E===_&&(E=d*this.height/this.width),this.elt instanceof HTMLCanvasElement){var x,O={},T=this.elt.getContext("2d");for(x in T)O[x]=T[x];for(x in this.elt.setAttribute("width",S*this._pInst._pixelDensity),this.elt.setAttribute("height",E*this._pInst._pixelDensity),this.elt.style.width=S+"px",this.elt.style.height=E+"px",this._pInst.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),O)this.elt.getContext("2d")[x]=O[x]}else this.elt.style.width=S+"px",this.elt.style.height=E+"px",this.elt.width=S,this.elt.height=E;this.width=S,this.height=E,this._pInst&&this._pInst._curElement&&this._pInst._curElement.elt===this.elt&&(this._pInst._setProperty("width",S),this._pInst._setProperty("height",E))}return this},m.default.Element.prototype.remove=function(){this instanceof m.default.MediaElement&&(this.stop(),(v=this.elt.srcObject)!==null&&v.getTracks().forEach(function(S){S.stop()}));var d,v=this._pInst._elements.indexOf(this);for(d in v!==-1&&this._pInst._elements.splice(v,1),this._events)this.elt.removeEventListener(d,this._events[d]);this.elt&&this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt)},m.default.Element.prototype.drop=function(d,v){var S;return window.File&&window.FileReader&&window.FileList&&window.Blob?(this._dragDisabled||(this._dragDisabled=!0,this.elt.addEventListener("dragover",S=function(E){E.preventDefault()}),this.elt.addEventListener("dragleave",S)),m.default.Element._attachListener("drop",function(_){_.preventDefault(),typeof v=="function"&&v.call(this,_);var _=_.dataTransfer.files,x=!0,O=!1,T=void 0;try{for(var P,M=_[Symbol.iterator]();!(x=(P=M.next()).done);x=!0){var F=P.value;m.default.File._load(F,d)}}catch(D){O=!0,T=D}finally{try{x||M.return==null||M.return()}finally{if(O)throw T}}},this)):console.log("The File APIs are not fully supported in this browser."),this},m.default.Element.prototype.draggable=function(d){var v,S="ontouchstart"in window,E=0,_=0,x=0,O=0,T=S?"touchend":"mouseup",P=S?"touchmove":"mousemove";function M(D){var A;D=D||window.event,O=S?(A=D.changedTouches,E=x-parseInt(A[0].clientX),_=O-parseInt(A[0].clientY),x=parseInt(A[0].clientX),parseInt(A[0].clientY)):(E=x-parseInt(D.clientX),_=O-parseInt(D.clientY),x=parseInt(D.clientX),parseInt(D.clientY)),d.style.left=d.offsetLeft-E+"px",d.style.top=d.offsetTop-_+"px"}function F(){document.removeEventListener(T,F,!1),document.removeEventListener(P,M,!1)}return d===void 0?v=d=this.elt:d!==this.elt&&d.elt!==this.elt&&(d=d.elt,v=this.elt),v.addEventListener(S?"touchstart":"mousedown",function(D){{var A;D=D||window.event,O=S?(A=D.changedTouches,x=parseInt(A[0].clientX),parseInt(A[0].clientY)):(x=parseInt(D.clientX),parseInt(D.clientY))}return document.addEventListener(T,F,!1),document.addEventListener(P,M,!1),!1},!1),v.style.cursor="move",this};function c(d,v,S,E){r(this,c),this.callback=d,this.time=v,this.id=S,this.val=E}t=(function(d){var v=E;if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(d&&d.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),d&&g(v,d);var S=y(E);function E(_,x){r(this,E);var O=o(x=S.call(this,_,x));return x.elt.crossOrigin="anonymous",x._prevTime=0,x._cueIDCounter=0,x._cues=[],x.pixels=[],x._pixelsState=o(x),x._pixelDensity=1,x._modified=!1,x._frameOnCanvas=-1,Object.defineProperty(O,"src",{get:function(){var T=O.elt.children[0].src,P=O.elt.src===window.location.href?"":O.elt.src;return T===window.location.href?P:T},set:function(T){for(var P=0;P<O.elt.children.length;P++)O.elt.removeChild(O.elt.children[P]);var M=document.createElement("source");M.src=T,_.appendChild(M),O.elt.src=T,O.modified=!0}}),O._onended=function(){},O.elt.onended=function(){O._onended(O)},x}return f(E,[{key:"play",value:function(){var _;return this.elt.currentTime===this.elt.duration&&(this.elt.currentTime=0),1<this.elt.readyState||this.elt.load(),(_=this.elt.play())&&_.catch&&_.catch(function(x){x.name==="NotAllowedError"?console.error(x):console.error("Media play method encountered an unexpected error",x)}),this}},{key:"stop",value:function(){return this.elt.pause(),this.elt.currentTime=0,this}},{key:"pause",value:function(){return this.elt.pause(),this}},{key:"loop",value:function(){return this.elt.setAttribute("loop",!0),this.play(),this}},{key:"noLoop",value:function(){return this.elt.removeAttribute("loop"),this}},{key:"_setupAutoplayFailDetection",value:function(){var _=setTimeout(function(){console.error(e)},500);this.elt.addEventListener("play",function(){return clearTimeout(_)},{passive:!0,once:!0})}},{key:"autoplay",value:function(_){var x=this,O=this.elt.getAttribute("autoplay");return this.elt.setAttribute("autoplay",_),_&&!O&&(_=function(){return x._setupAutoplayFailDetection()},this.elt.readyState===4?_():this.elt.addEventListener("canplay",_,{passive:!0,once:!0})),this}},{key:"volume",value:function(_){if(_===void 0)return this.elt.volume;this.elt.volume=_}},{key:"speed",value:function(_){if(_===void 0)return this.presetPlaybackRate||this.elt.playbackRate;this.loadedmetadata?this.elt.playbackRate=_:this.presetPlaybackRate=_}},{key:"time",value:function(_){return _===void 0?this.elt.currentTime:(this.elt.currentTime=_,this)}},{key:"duration",value:function(){return this.elt.duration}},{key:"_ensureCanvas",value:function(){this.canvas||(this.canvas=document.createElement("canvas"),this.drawingContext=this.canvas.getContext("2d"),this.setModified(!0));var _=this._frameOnCanvas!==this._pInst.frameCount;this.loadedmetadata&&_&&(this.canvas.width!==this.elt.width&&(this.canvas.width=this.elt.width,this.canvas.height=this.elt.height,this.width=this.canvas.width,this.height=this.canvas.height),this.drawingContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.flipped===!0&&(this.drawingContext.save(),this.drawingContext.scale(-1,1),this.drawingContext.translate(-this.canvas.width,0)),this.drawingContext.drawImage(this.elt,0,0,this.canvas.width,this.canvas.height),this.flipped===!0&&this.drawingContext.restore(),this.setModified(!0),this._frameOnCanvas=this._pInst.frameCount)}},{key:"loadPixels",value:function(){this._ensureCanvas();for(var _=arguments.length,x=new Array(_),O=0;O<_;O++)x[O]=arguments[O];return m.default.Renderer2D.prototype.loadPixels.apply(this,x)}},{key:"updatePixels",value:function(_,x,O,T){return this.loadedmetadata&&(this._ensureCanvas(),m.default.Renderer2D.prototype.updatePixels.call(this,_,x,O,T)),this.setModified(!0),this}},{key:"get",value:function(){this._ensureCanvas();for(var _=arguments.length,x=new Array(_),O=0;O<_;O++)x[O]=arguments[O];return m.default.Renderer2D.prototype.get.apply(this,x)}},{key:"_getPixel",value:function(){this.loadPixels();for(var _=arguments.length,x=new Array(_),O=0;O<_;O++)x[O]=arguments[O];return m.default.Renderer2D.prototype._getPixel.apply(this,x)}},{key:"set",value:function(_,x,O){this.loadedmetadata&&(this._ensureCanvas(),m.default.Renderer2D.prototype.set.call(this,_,x,O),this.setModified(!0))}},{key:"copy",value:function(){this._ensureCanvas();for(var _=arguments.length,x=new Array(_),O=0;O<_;O++)x[O]=arguments[O];m.default.prototype.copy.apply(this,x)}},{key:"mask",value:function(){this.loadPixels(),this.setModified(!0);for(var _=arguments.length,x=new Array(_),O=0;O<_;O++)x[O]=arguments[O];m.default.Image.prototype.mask.apply(this,x)}},{key:"isModified",value:function(){return this._modified}},{key:"setModified",value:function(_){this._modified=_}},{key:"onended",value:function(_){return this._onended=_,this}},{key:"connect",value:function(_){var x,O;if(typeof m.default.prototype.getAudioContext=="function")x=m.default.prototype.getAudioContext(),O=m.default.soundOut.input;else try{O=(x=_.context).destination}catch{throw"connect() is meant to be used with Web Audio API or p5.sound.js"}this.audioSourceNode||(this.audioSourceNode=x.createMediaElementSource(this.elt),this.audioSourceNode.connect(O)),_?_.input?this.audioSourceNode.connect(_.input):this.audioSourceNode.connect(_):this.audioSourceNode.connect(O)}},{key:"disconnect",value:function(){if(!this.audioSourceNode)throw"nothing to disconnect";this.audioSourceNode.disconnect()}},{key:"showControls",value:function(){this.elt.style["text-align"]="inherit",this.elt.controls=!0}},{key:"hideControls",value:function(){this.elt.controls=!1}},{key:"addCue",value:function(_,P,O){var T=this._cueIDCounter++,P=new c(P,_,T,O);return this._cues.push(P),this.elt.ontimeupdate||(this.elt.ontimeupdate=this._onTimeUpdate.bind(this)),T}},{key:"removeCue",value:function(_){for(var x=0;x<this._cues.length;x++)this._cues[x].id===_&&(console.log(_),this._cues.splice(x,1));this._cues.length===0&&(this.elt.ontimeupdate=null)}},{key:"clearCues",value:function(){this._cues=[],this.elt.ontimeupdate=null}},{key:"_onTimeUpdate",value:function(){for(var _=this.time(),x=0;x<this._cues.length;x++){var O=this._cues[x].time,T=this._cues[x].val;this._prevTime<O&&O<=_&&this._cues[x].callback(T)}this._prevTime=_}}]),E})(m.default.Element),m.default.MediaElement=t,t=(function(){function d(v,S){r(this,d),this.file=v,this._pInst=S,S=v.type.split("/"),this.type=S[0],this.subtype=S[1],this.name=v.name,this.size=v.size,this.data=void 0}return f(d,null,[{key:"_createLoader",value:function(v,S){var E=new FileReader;return E.onload=function(_){var x,O=new m.default.File(v);O.file.type==="application/json"?O.data=JSON.parse(_.target.result):O.file.type==="text/xml"?(x=new DOMParser().parseFromString(_.target.result,"text/xml"),O.data=new m.default.XML(x.documentElement)):O.data=_.target.result,S(O)},E}},{key:"_load",value:function(v,S){var E;/^text\//.test(v.type)||v.type==="application/json"?m.default.File._createLoader(v,S).readAsText(v):/^(video|audio)\//.test(v.type)?((E=new m.default.File(v)).data=URL.createObjectURL(v),S(E)):m.default.File._createLoader(v,S).readAsDataURL(v)}}]),d})(),m.default.File=t,t=m.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.every":155,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.function.name":174,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246,"core-js/modules/web.url":248}],300:[function(i,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(i=i("../core/main"))&&i.__esModule?i:{default:i};p.default.prototype.deviceOrientation=1<window.innerWidth/window.innerHeight?"landscape":"portrait",p.default.prototype.accelerationX=0,p.default.prototype.accelerationY=0,p.default.prototype.accelerationZ=0,p.default.prototype.pAccelerationX=0,p.default.prototype.pAccelerationY=0,p.default.prototype.pAccelerationZ=0,p.default.prototype._updatePAccelerations=function(){this._setProperty("pAccelerationX",this.accelerationX),this._setProperty("pAccelerationY",this.accelerationY),this._setProperty("pAccelerationZ",this.accelerationZ)},p.default.prototype.rotationX=0,p.default.prototype.rotationY=0,p.default.prototype.rotationZ=0,p.default.prototype.pRotationX=0,p.default.prototype.pRotationY=0;var m=p.default.prototype.pRotationZ=0,u=0,f=0,g="clockwise",y="clockwise",o="clockwise",a=(p.default.prototype.pRotateDirectionX=void 0,p.default.prototype.pRotateDirectionY=void 0,p.default.prototype.pRotateDirectionZ=void 0,p.default.prototype._updatePRotations=function(){this._setProperty("pRotationX",this.rotationX),this._setProperty("pRotationY",this.rotationY),this._setProperty("pRotationZ",this.rotationZ)},p.default.prototype.turnAxis=void 0,.5),r=30,i=(p.default.prototype.setMoveThreshold=function(s){p.default._validateParameters("setMoveThreshold",arguments),a=s},p.default.prototype.setShakeThreshold=function(s){p.default._validateParameters("setShakeThreshold",arguments),r=s},p.default.prototype._ondeviceorientation=function(s){this._updatePRotations(),this._setProperty("rotationX",this._fromDegrees(s.beta)),this._setProperty("rotationY",this._fromDegrees(s.gamma)),this._setProperty("rotationZ",this._fromDegrees(s.alpha)),this._handleMotion()},p.default.prototype._ondevicemotion=function(s){this._updatePAccelerations(),this._setProperty("accelerationX",2*s.acceleration.x),this._setProperty("accelerationY",2*s.acceleration.y),this._setProperty("accelerationZ",2*s.acceleration.z),this._handleMotion()},p.default.prototype._handleMotion=function(){window.orientation===90||window.orientation===-90?this._setProperty("deviceOrientation","landscape"):window.orientation===0?this._setProperty("deviceOrientation","portrait"):window.orientation===void 0&&this._setProperty("deviceOrientation","undefined");var s,n,l,c,d,v=this._isGlobal?window:this;typeof v.deviceMoved=="function"&&(Math.abs(this.accelerationX-this.pAccelerationX)>a||Math.abs(this.accelerationY-this.pAccelerationY)>a||Math.abs(this.accelerationZ-this.pAccelerationZ)>a)&&v.deviceMoved(),typeof v.deviceTurned=="function"&&(n=this._toDegrees(this.rotationX)+180,l=this._toDegrees(this.pRotationX)+180,s=m+180,0<n-l&&n-l<270||n-l<-270?g="clockwise":(n-l<0||270<n-l)&&(g="counter-clockwise"),g!==this.pRotateDirectionX&&(s=n),90<Math.abs(n-s)&&Math.abs(n-s)<270&&(s=n,this._setProperty("turnAxis","X"),v.deviceTurned()),this.pRotateDirectionX=g,m=s-180,l=this._toDegrees(this.rotationY)+180,n=this._toDegrees(this.pRotationY)+180,s=u+180,0<l-n&&l-n<270||l-n<-270?y="clockwise":(l-n<0||270<l-this.pRotationY)&&(y="counter-clockwise"),y!==this.pRotateDirectionY&&(s=l),90<Math.abs(l-s)&&Math.abs(l-s)<270&&(s=l,this._setProperty("turnAxis","Y"),v.deviceTurned()),this.pRotateDirectionY=y,u=s-180,0<(n=this._toDegrees(this.rotationZ))-(l=this._toDegrees(this.pRotationZ))&&n-l<270||n-l<-270?o="clockwise":(n-l<0||270<n-l)&&(o="counter-clockwise"),o!==this.pRotateDirectionZ&&(f=n),90<Math.abs(n-f)&&Math.abs(n-f)<270&&(f=n,this._setProperty("turnAxis","Z"),v.deviceTurned()),this.pRotateDirectionZ=o,this._setProperty("turnAxis",void 0)),typeof v.deviceShaken=="function"&&(this.pAccelerationX!==null&&(c=Math.abs(this.accelerationX-this.pAccelerationX),d=Math.abs(this.accelerationY-this.pAccelerationY)),r<c+d&&v.deviceShaken())},p.default);C.default=i},{"../core/main":283}],301:[function(t,W,C){"use strict";t("core-js/modules/es.array.for-each"),t("core-js/modules/es.string.repeat"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.string.repeat"),t("core-js/modules/web.dom-collections.for-each"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};p.default.prototype.isKeyPressed=!1,p.default.prototype.keyIsPressed=!1,p.default.prototype.key="",p.default.prototype.keyCode=0,p.default.prototype._onkeydown=function(m){var u;m.repeat?this._setProperty("isKeyRepeated",!0):(this._setProperty("isKeyRepeated",!1),this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",m.which),this._downKeys[m.which]=!0,this._setProperty("key",m.key||String.fromCharCode(m.which)||m.which),m.metaKey&&(this._metaKeys||(this._metaKeys=[]),this._metaKeys.push(m.which)),typeof(u=this._isGlobal?window:this).keyPressed!="function"||m.charCode||u.keyPressed(m)===!1&&m.preventDefault())},p.default.prototype._onkeyup=function(m){var u=this,f=(this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1),this._setProperty("_lastKeyCodePressed",this._keyCode),this._downKeys[m.which]=!1,m.key==="Meta"&&this._metaKeys&&(this._metaKeys.forEach(function(g){u._downKeys[g]=!1}),this._metaKeys=[]),this._isGlobal?window:this);typeof f.keyReleased=="function"&&f.keyReleased(m)===!1&&m.preventDefault()},p.default.prototype._onkeypress=function(m){var u;m.which===this._lastKeyCodeTyped&&this.isKeyRepeated||(this._setProperty("_lastKeyCodeTyped",m.which),this._setProperty("key",m.key||String.fromCharCode(m.which)||m.which),typeof(u=this._isGlobal?window:this).keyTyped=="function"&&u.keyTyped(m)===!1&&m.preventDefault())},p.default.prototype._onblur=function(m){this._downKeys={}},p.default.prototype.keyIsDown=function(m){return p.default._validateParameters("keyIsDown",arguments),this._downKeys[m]||!1},p.default.prototype._areDownKeys=function(){for(var m in this._downKeys)if(this._downKeys.hasOwnProperty(m)&&this._downKeys[m]===!0)return!0;return!1},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.for-each":161,"core-js/modules/es.string.repeat":203,"core-js/modules/web.dom-collections.for-each":245}],302:[function(t,W,C){"use strict";function p(y){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(y)}function m(y){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(o){return p(o)}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":p(o)})(y)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(u=t("../core/main"))&&u.__esModule?u:{default:u},f=(function(y){if(y&&y.__esModule)return y;if(y===null||m(y)!=="object"&&typeof y!="function")return{default:y};var o=g();if(o&&o.has(y))return o.get(y);var a,r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(a in y){var s;Object.prototype.hasOwnProperty.call(y,a)&&((s=i?Object.getOwnPropertyDescriptor(y,a):null)&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=y[a])}return r.default=y,o&&o.set(y,r),r})(t("../core/constants"));function g(){var y;return typeof WeakMap!="function"?null:(y=new WeakMap,g=function(){return y},y)}u.default.prototype.movedX=0,u.default.prototype.movedY=0,u.default.prototype._hasMouseInteracted=!1,u.default.prototype.mouseX=0,u.default.prototype.mouseY=0,u.default.prototype.pmouseX=0,u.default.prototype.pmouseY=0,u.default.prototype.winMouseX=0,u.default.prototype.winMouseY=0,u.default.prototype.pwinMouseX=0,u.default.prototype.pwinMouseY=0,u.default.prototype.mouseButton=0,u.default.prototype.mouseIsPressed=!1,u.default.prototype._updateNextMouseCoords=function(y){var o,a,r,i,s;this._curElement!==null&&(!y.touches||0<y.touches.length)&&(o=this._curElement.elt,a=this.width,r=this.height,(i=y)&&!i.clientX&&(i.touches?i=i.touches[0]:i.changedTouches&&(i=i.changedTouches[0])),s=o.getBoundingClientRect(),a=o.scrollWidth/a||1,o=o.scrollHeight/r||1,r={x:(i.clientX-s.left)/a,y:(i.clientY-s.top)/o,winX:i.clientX,winY:i.clientY,id:i.identifier},this._setProperty("mouseX",r.x),this._setProperty("mouseY",r.y),this._setProperty("winMouseX",r.winX),this._setProperty("winMouseY",r.winY),document.pointerLockElement===null?(a=this.mouseX-this.pmouseX,s=this.mouseY-this.pmouseY,this._setProperty("movedX",a),this._setProperty("movedY",s)):(this._setProperty("movedX",y.movementX),this._setProperty("movedY",y.movementY))),this._hasMouseInteracted||(this._updateMouseCoords(),this._setProperty("_hasMouseInteracted",!0))},u.default.prototype._updateMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY),this._setProperty("_pmouseWheelDeltaY",this._mouseWheelDeltaY)},u.default.prototype._setMouseButton=function(y){y.button===1?this._setProperty("mouseButton",f.CENTER):y.button===2?this._setProperty("mouseButton",f.RIGHT):this._setProperty("mouseButton",f.LEFT)},u.default.prototype._onmousemove=function(y){var o=this._isGlobal?window:this;this._updateNextMouseCoords(y),this.mouseIsPressed?typeof o.mouseDragged=="function"?o.mouseDragged(y)===!1&&y.preventDefault():typeof o.touchMoved=="function"&&o.touchMoved(y)===!1&&y.preventDefault():typeof o.mouseMoved=="function"&&o.mouseMoved(y)===!1&&y.preventDefault()},u.default.prototype._onmousedown=function(y){var o=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._setMouseButton(y),this._updateNextMouseCoords(y),this.touchstart||(typeof o.mousePressed=="function"?o.mousePressed(y)===!1&&y.preventDefault():typeof o.touchStarted=="function"&&o.touchStarted(y)===!1&&y.preventDefault(),this.touchstart=!1)},u.default.prototype._onmouseup=function(y){var o=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!1),this.touchend||(typeof o.mouseReleased=="function"?o.mouseReleased(y)===!1&&y.preventDefault():typeof o.touchEnded=="function"&&o.touchEnded(y)===!1&&y.preventDefault(),this.touchend=!1)},u.default.prototype._ondragend=u.default.prototype._onmouseup,u.default.prototype._ondragover=u.default.prototype._onmousemove,u.default.prototype._onclick=function(y){var o=this._isGlobal?window:this;typeof o.mouseClicked=="function"&&o.mouseClicked(y)===!1&&y.preventDefault()},u.default.prototype._ondblclick=function(y){var o=this._isGlobal?window:this;typeof o.doubleClicked=="function"&&o.doubleClicked(y)===!1&&y.preventDefault()},u.default.prototype._mouseWheelDeltaY=0,u.default.prototype._pmouseWheelDeltaY=0,u.default.prototype._onwheel=function(y){var o=this._isGlobal?window:this;this._setProperty("_mouseWheelDeltaY",y.deltaY),typeof o.mouseWheel=="function"&&(y.delta=y.deltaY,o.mouseWheel(y)===!1&&y.preventDefault())},u.default.prototype.requestPointerLock=function(){var y=this._curElement.elt;return y.requestPointerLock=y.requestPointerLock||y.mozRequestPointerLock,y.requestPointerLock?(y.requestPointerLock(),!0):(console.log("requestPointerLock is not implemented in this browser"),!1)},u.default.prototype.exitPointerLock=function(){document.exitPointerLock()},t=u.default,C.default=t},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],303:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.prototype.touches=[],t.default.prototype._updateTouchCoords=function(p){if(this._curElement!==null){for(var m=[],u=0;u<p.touches.length;u++)m[u]=(function(s,i,n,o){var a=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,r=s.getBoundingClientRect(),i=s.scrollWidth/i||1,s=s.scrollHeight/n||1,n=o.touches[a]||o.changedTouches[a];return{x:(n.clientX-r.left)/i,y:(n.clientY-r.top)/s,winX:n.clientX,winY:n.clientY,id:n.identifier}})(this._curElement.elt,this.width,this.height,p,u);this._setProperty("touches",m)}},t.default.prototype._ontouchstart=function(p){var m=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._updateTouchCoords(p),this._updateNextMouseCoords(p),this._updateMouseCoords(),typeof m.touchStarted=="function"&&(m.touchStarted(p)===!1&&p.preventDefault(),this.touchstart=!0)},t.default.prototype._ontouchmove=function(p){var m=this._isGlobal?window:this;this._updateTouchCoords(p),this._updateNextMouseCoords(p),typeof m.touchMoved=="function"?m.touchMoved(p)===!1&&p.preventDefault():typeof m.mouseDragged=="function"&&m.mouseDragged(p)===!1&&p.preventDefault()},t.default.prototype._ontouchend=function(p){this._setProperty("mouseIsPressed",!1),this._updateTouchCoords(p),this._updateNextMouseCoords(p);var m=this._isGlobal?window:this;typeof m.touchEnded=="function"&&(m.touchEnded(p)===!1&&p.preventDefault(),this.touchend=!0)},t=t.default,C.default=t},{"../core/main":283}],304:[function(t,W,C){"use strict";t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.int32-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.int32-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p,m,u,f,g={_toPixels:function(y){var o,a;return y instanceof ImageData?y.data:y.getContext("2d")?y.getContext("2d").getImageData(0,0,y.width,y.height).data:y.getContext("webgl")?(a=(o=y.getContext("webgl")).drawingBufferWidth*o.drawingBufferHeight*4,a=new Uint8Array(a),o.readPixels(0,0,y.width,y.height,o.RGBA,o.UNSIGNED_BYTE,a),a):void 0},_getARGB:function(y,o){return o*=4,y[3+o]<<24&4278190080|y[o]<<16&16711680|y[1+o]<<8&65280|255&y[2+o]},_setPixels:function(y,o){for(var a,r=0,i=y.length;r<i;r++)y[0+(a=4*r)]=(16711680&o[r])>>>16,y[1+a]=(65280&o[r])>>>8,y[2+a]=255&o[r],y[3+a]=(4278190080&o[r])>>>24},_toImageData:function(y){return y instanceof ImageData?y:y.getContext("2d").getImageData(0,0,y.width,y.height)},_createImageData:function(y,o){return g._tmpCanvas=document.createElement("canvas"),g._tmpCtx=g._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(y,o)},apply:function(y,s,a){var r=y.getContext("2d"),i=r.getImageData(0,0,y.width,y.height),s=s(i,a);s instanceof ImageData?r.putImageData(s,0,0,0,0,y.width,y.height):r.putImageData(i,0,0,0,0,y.width,y.height)},threshold:function(y){for(var o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:.5,a=g._toPixels(y),r=Math.floor(255*o),i=0;i<a.length;i+=4){var s=void 0,s=r<=.2126*a[i]+.7152*a[i+1]+.0722*a[i+2]?255:0;a[i]=a[i+1]=a[i+2]=s}},gray:function(y){for(var o=g._toPixels(y),a=0;a<o.length;a+=4){var r=o[a],i=o[a+1],s=o[a+2];o[a]=o[a+1]=o[a+2]=.2126*r+.7152*i+.0722*s}},opaque:function(y){for(var o=g._toPixels(y),a=0;a<o.length;a+=4)o[a+3]=255;return o},invert:function(y){for(var o=g._toPixels(y),a=0;a<o.length;a+=4)o[a]=255-o[a],o[a+1]=255-o[a+1],o[a+2]=255-o[a+2]},posterize:function(y){var o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:4,a=g._toPixels(y);if(o<2||255<o)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var r=o-1,i=0;i<a.length;i+=4){var s=a[i],n=a[i+1],l=a[i+2];a[i]=255*(s*o>>8)/r,a[i+1]=255*(n*o>>8)/r,a[i+2]=255*(l*o>>8)/r}},dilate:function(y){for(var o,a,r,i,s,n,l,c,d,v=g._toPixels(y),S=0,E=v.length?v.length/4:0,_=new Int32Array(E);S<E;)for(a=(o=S)+y.width;S<a;)i=r=g._getARGB(v,S),(d=S-1)<o&&(d=S),a<=(c=S+1)&&(c=S),(s=S-y.width)<0&&(s=0),E<=(n=S+y.width)&&(n=S),s=g._getARGB(v,s),d=g._getARGB(v,d),n=g._getARGB(v,n),(i=77*(i>>16&255)+151*(i>>8&255)+28*(255&i))<(l=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))&&(r=d,i=l),i<(l=77*((d=g._getARGB(v,c))>>16&255)+151*(d>>8&255)+28*(255&d))&&(r=d,i=l),i<(c=77*(s>>16&255)+151*(s>>8&255)+28*(255&s))&&(r=s,i=c),i<(d=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))&&(r=n,i=d),_[S++]=r;g._setPixels(v,_)},erode:function(y){for(var o,a,r,i,s,n,l,c,d,v=g._toPixels(y),S=0,E=v.length?v.length/4:0,_=new Int32Array(E);S<E;)for(a=(o=S)+y.width;S<a;)i=r=g._getARGB(v,S),(d=S-1)<o&&(d=S),a<=(c=S+1)&&(c=S),(s=S-y.width)<0&&(s=0),E<=(n=S+y.width)&&(n=S),s=g._getARGB(v,s),d=g._getARGB(v,d),n=g._getARGB(v,n),(l=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))<(i=77*(i>>16&255)+151*(i>>8&255)+28*(255&i))&&(r=d,i=l),(l=77*((d=g._getARGB(v,c))>>16&255)+151*(d>>8&255)+28*(255&d))<i&&(r=d,i=l),(c=77*(s>>16&255)+151*(s>>8&255)+28*(255&s))<i&&(r=s,i=c),(d=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))<i&&(r=n,i=d),_[S++]=r;g._setPixels(v,_)},blur:function(y,o){for(var a,r,i,s,n,l,c,d,v,S,E=g._toPixels(y),_=y.width,x=y.height,O=_*x,T=new Int32Array(O),P=0;P<O;P++)T[P]=g._getARGB(E,P);var M,F,D,A,z,G,U,H,Y=new Int32Array(O),oe=new Int32Array(O),L=new Int32Array(O),j=new Int32Array(O),R=0,N=3.5*o|0;if(p!==(N=N<1?1:N<248?N:248)){m=1+(p=N)<<1,u=new Int32Array(m),f=new Array(m);for(var X=0;X<m;X++)f[X]=new Int32Array(256);for(var K=1,re=N-1;K<N;K++){u[N+K]=u[re]=G=re*re,U=f[N+K],H=f[re--];for(var ie=0;ie<256;ie++)U[ie]=H[ie]=G*ie}z=u[N]=N*N,U=f[N];for(var ee=0;ee<256;ee++)U[ee]=z*ee}for(F=0;F<x;F++){for(M=0;M<_;M++){if(s=i=r=n=a=0,(l=M-p)<0)S=-l,l=0;else{if(_<=l)break;S=0}for(D=S;D<m&&!(_<=l);D++){var ae=T[l+R];A=f[D],n+=A[(-16777216&ae)>>>24],r+=A[(16711680&ae)>>16],i+=A[(65280&ae)>>8],s+=A[255&ae],a+=u[D],l++}Y[c=R+M]=n/a,oe[c]=r/a,L[c]=i/a,j[c]=s/a}R+=_}for(v=(d=-p)*_,F=R=0;F<x;F++){for(M=0;M<_;M++){if(s=i=r=n=a=0,d<0)S=c=-d,l=M;else{if(x<=d)break;S=0,c=d,l=M+v}for(D=S;D<m&&!(x<=c);D++)A=f[D],n+=A[Y[l]],r+=A[oe[l]],i+=A[L[l]],s+=A[j[l]],a+=u[D],c++,l+=_;T[M+R]=n/a<<24|r/a<<16|i/a<<8|s/a}R+=_,v+=_,d++}g._setPixels(E,T)}};C.default=g},{"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.int32-array":225,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242}],305:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=u(t("../core/main")),m=u(t("omggif"));function u(g){return g&&g.__esModule?g:{default:g}}function f(g){return(function(y){if(Array.isArray(y)){for(var o=0,a=new Array(y.length);o<y.length;o++)a[o]=y[o];return a}})(g)||(function(y){if(Symbol.iterator in Object(y)||Object.prototype.toString.call(y)==="[object Arguments]")return Array.from(y)})(g)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}p.default.prototype.createImage=function(g,y){return p.default._validateParameters("createImage",arguments),new p.default.Image(g,y)},p.default.prototype.saveCanvas=function(){for(var g,y,o,a,r,i,s=arguments.length,n=new Array(s),l=0;l<s;l++)n[l]=arguments[l];switch(p.default._validateParameters("saveCanvas",n),n[0]instanceof HTMLCanvasElement?(g=n[0],n.shift()):n[0]instanceof p.default.Element?(g=n[0].elt,n.shift()):n[0]instanceof p.default.Framebuffer?(a=n[0],(r=this.createGraphics(a.width,a.height)).pixelDensity(pixelDensity()),a.loadPixels(),r.loadPixels(),r.pixels.set(a.pixels),r.updatePixels(),g=r.elt,n.shift()):g=this._curElement&&this._curElement.elt,1<=n.length&&(y=n[0]),o=(o=2<=n.length?n[1]:o)||p.default.prototype._checkFileExtension(y,o)[1]||"png"){default:i="image/png";break;case"webp":i="image/webp";break;case"jpeg":case"jpg":i="image/jpeg"}g.toBlob(function(c){p.default.prototype.downloadFile(c,y,o),r&&r.remove()},i)},p.default.prototype.encodeAndDownloadGif=function(g,y){for(var o=g.gifProperties,a=o.loopLimit,r=(a===1?a=null:a===null&&(a=0),new Uint8Array(g.width*g.height*o.numFrames)),i=[],s={},n=0;n<o.numFrames;n++){for(var l=new Set,c=o.frames[n].image.data,d=c.length,v=new Uint32Array(g.width*g.height),S=0,E=0;S<d;S+=4,E++){var _=c[S+0]<<16|c[S+1]<<8|c[S+2]<<0;l.add(_),v[E]=_}var x=f(l).sort().toString();s[x]===void 0?s[x]={freq:1,frames:[n]}:(s[x].freq+=1,s[x].frames.push(n)),i.push(v)}for(var P=[],O=Object.keys(s).sort(function(L,j){return s[j].freq-s[L].freq}),T=O[0].split(",").map(function(L){return parseInt(L)}),P=P.concat(s[T].frames),M=new Set(T),F=1;F<O.length;F++){var D=O[F].split(",").map(function(L){return parseInt(L)}).filter(function(L){return!M.has(L)});if(T.length+D.length<=256){for(var A=0;A<D.length;A++)T.push(D[A]),M.add(D[A]);P=P.concat(s[O[F]].frames)}}P=new Set(P);for(var z={},G=0;G<T.length;G++)z[T[G]]||(z[T[G]]=G);for(var U=1;U<T.length;)U<<=1;T.length=U;for(var a={loop:a,palette:new Uint32Array(T)},H=new m.default.GifWriter(r,g.width,g.height,a),Y={},oe=0;oe<o.numFrames;oe++)(function(j){var R=!P.has(j),N=R?[]:T,X=new Uint8Array(g.width*g.height),K={},re=new Set,ie=(i[j].forEach(function(le,fe){R?(K[le]===void 0&&(K[le]=N.length,N.push(le)),X[fe]=K[le]):X[fe]=z[le],0<j&&i[j-1][fe]!==le&&re.add(le)}),{}),ee=N.filter(function(le){return!re.has(le)});if(0<ee.length){var ee=ee[0],ae=(R?K:z)[ee];if(0<j){for(var ue=0;ue<i[j].length;ue++)i[j-1][ue]===i[j][ue]&&(X[ue]=ae);ie.transparent=ae,Y.frameOpts.disposal=1}}if(ie.delay=o.frames[j].delay/10,R){for(var Q=1;Q<N.length;)Q<<=1;N.length=Q,ie.palette=new Uint32Array(N)}0<j&&H.addFrame(0,0,g.width,g.height,Y.pixelPaletteIndex,Y.frameOpts),Y={pixelPaletteIndex:X,frameOpts:ie}})(oe);Y.frameOpts.disposal=1,H.addFrame(0,0,g.width,g.height,Y.pixelPaletteIndex,Y.frameOpts),a=new Blob([r.slice(0,H.end())],{type:"image/gif"}),p.default.prototype.downloadFile(a,y,"gif")},p.default.prototype.saveFrames=function(g,y,o,i,r){p.default._validateParameters("saveFrames",arguments),o=p.default.prototype.constrain(o=o||3,0,15),o*=1e3;var i=p.default.prototype.constrain(i||15,0,22),s=0,n=p.default.prototype._makeFrame,l=this._curElement.elt,c=[],d=setInterval(function(){c.push(n(g+s,y,l)),s++},1e3/i);setTimeout(function(){if(clearInterval(d),r)r(c);else for(var v=0,S=c;v<S.length;v++){var E=S[v];p.default.prototype.downloadFile(E.imageData,E.filename,E.ext)}c=[]},.01+o)},p.default.prototype._makeFrame=function(g,y,r){var a,r=this?this._curElement.elt:r;if(y)switch(y.toLowerCase()){case"png":a="image/png";break;case"jpeg":case"jpg":a="image/jpeg";break;default:a="image/png"}else y="png",a="image/png";var r=(r=r.toDataURL(a)).replace(a,"image/octet-stream"),i={};return i.imageData=r,i.filename=g,i.ext=y,i},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint32-array":241,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246,omggif:256}],306:[function(t,W,C){"use strict";function p(l){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(l)}function m(l){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(c){return p(c)}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":p(c)})(l)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.copy-within"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint8-clamped-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.copy-within"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint8-clamped-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t("regenerator-runtime/runtime");var u=r(t("../core/main")),f=r(t("../core/helpers")),g=(function(l){if(l&&l.__esModule)return l;if(l===null||m(l)!=="object"&&typeof l!="function")return{default:l};var c=a();if(c&&c.has(l))return c.get(l);var d,v={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(d in l){var E;Object.prototype.hasOwnProperty.call(l,d)&&((E=S?Object.getOwnPropertyDescriptor(l,d):null)&&(E.get||E.set)?Object.defineProperty(v,d,E):v[d]=l[d])}return v.default=l,c&&c.set(l,v),v})(t("../core/constants")),y=r(t("omggif")),o=t("gifenc");function a(){var l;return typeof WeakMap!="function"?null:(l=new WeakMap,a=function(){return l},l)}function r(l){return l&&l.__esModule?l:{default:l}}function i(l,c,d,v,S,E,_){try{var x=l[E](_),O=x.value}catch(T){return void d(T)}x.done?c(O):Promise.resolve(O).then(v,S)}function s(l,c,d,v,S,E,_,x,O,T,P){var M,F,D,A,z,G,U,H,Y;return l===g.COVER&&(M=c,D=d,U=E,H=_,G=x,Y=O,F=T,A=P,z=Math.max(U/F,H/A),U/=z,H/=z,z=G,G=Y,M===g.CENTER?z+=(F-U)/2:M===g.RIGHT&&(z+=F-U),D===g.CENTER?G+=(A-H)/2:D===g.BOTTOM&&(G+=A-H),x=(Y={x:z,y:G,w:U,h:H}).x,O=Y.y,T=Y.w,P=Y.h),l===g.CONTAIN&&(M=c,F=d,D=v,A=S,z=E,G=_,U=T,H=P,Y=Math.max(U/z,H/G),U/=Y,H/=Y,Y=D,D=A,M===g.CENTER?Y+=(z-U)/2:M===g.RIGHT&&(Y+=z-U),F===g.CENTER?D+=(G-H)/2:F===g.BOTTOM&&(D+=G-H),v=(l={x:Y,y:D,w:U,h:H}).x,S=l.y,E=l.w,_=l.h),{sx:x,sy:O,sw:T,sh:P,dx:v,dy:S,dw:E,dh:_}}function n(l,c){return 0<l&&l<c?l:c}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),u.default.prototype.loadImage=function(l,c,d){u.default._validateParameters("loadImage",arguments);var v=new u.default.Image(1,1,this),S=this,E=new Request(l,{method:"GET",mode:"cors"});return fetch(l,E).then(function(_){var x,O=_.headers.get("content-type");O===null&&console.warn("The image you loaded does not have a Content-Type header. If you are using the online editor consider reuploading the asset."),O&&O.includes("image/gif")?_.arrayBuffer().then(function(T){if(T){for(var T=new Uint8Array(T),P=v,M=c,F=d,D=(function(R){S._decrementPreload()}).bind(S),A=new y.default.GifReader(T),z=(P.width=P.canvas.width=A.width,P.height=P.canvas.height=A.height,[]),G=A.numFrames(),U=new Uint8ClampedArray(P.width*P.height*4),H=0;H<G;H++){var Y=A.frameInfo(H),oe=P.drawingContext.getImageData(0,0,P.width,P.height),L=(U=oe.data.slice(),(function(R,N){try{N.decodeAndBlitFrameRGBA(R,U)}catch(X){u.default._friendlyFileLoadError(8,P.src),typeof F=="function"?F(X):console.error(X)}})(H,A),new ImageData(U,P.width,P.height)),L=(P.drawingContext.putImageData(L,0,0),Y.delay);L===0&&(L=10),z.push({image:P.drawingContext.getImageData(0,0,P.width,P.height),delay:10*L}),Y.disposal===2?P.drawingContext.clearRect(Y.x,Y.y,Y.width,Y.height):Y.disposal===3&&P.drawingContext.putImageData(oe,0,0,Y.x,Y.y,Y.width,Y.height)}(T=A.loopCount())===null?T=1:T===0&&(T=null),P.drawingContext.putImageData(z[0].image,0,0),1<z.length&&(P.gifProperties={displayIndex:0,loopLimit:T,loopCount:0,frames:z,numFrames:G,playing:!0,timeDisplayed:0,lastChangeTime:0}),typeof M=="function"&&M(P),D()}},function(T){typeof d=="function"?(d(T),S._decrementPreload()):console.error(T)}):((x=new Image).onload=function(){v.width=v.canvas.width=x.width,v.height=v.canvas.height=x.height,v.drawingContext.drawImage(x,0,0),v.modified=!0,typeof c=="function"&&c(v),S._decrementPreload()},x.onerror=function(T){u.default._friendlyFileLoadError(0,x.src),typeof d=="function"?(d(T),S._decrementPreload()):console.error(T)},l.indexOf("data:image/")!==0&&(x.crossOrigin="Anonymous"),x.src=l),v.modified=!0}).catch(function(_){u.default._friendlyFileLoadError(0,l),typeof d=="function"?(d(_),S._decrementPreload()):console.error(_)}),v},u.default.prototype.saveGif=(function(){l=regeneratorRuntime.mark(function d(v,S){var E,_,x,O,T,P,M,F,D,A,z,G,U,H,Y,oe,L,j,R,N,X,K,re,ie,ee,ae,ue=arguments;return regeneratorRuntime.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(E=2<ue.length&&ue[2]!==void 0?ue[2]:{delay:0,units:"seconds",silent:!1,notificationDuration:0,notificationID:"progressBar"},typeof v!="string")throw TypeError("fileName parameter must be a string");Q.next=3;break;case 3:if(typeof S!="number")throw TypeError("Duration parameter must be a number");Q.next=5;break;case 5:if(_=E&&E.delay||0,x=E&&E.units||"seconds",O=E&&E.silent||!1,T=E&&E.notificationDuration||0,P=E&&E.notificationID||"progressBar",typeof _!="number")throw TypeError("Delay parameter must be a number");Q.next=12;break;case 12:if(x!=="seconds"&&x!=="frames")throw TypeError('Units parameter must be either "frames" or "seconds"');Q.next=14;break;case 14:if(typeof O!="boolean")throw TypeError("Silent parameter must be a boolean");Q.next=16;break;case 16:if(typeof T!="number")throw TypeError("Notification duration parameter must be a number");Q.next=18;break;case 18:if(typeof P!="string")throw TypeError("Notification ID parameter must be a string");Q.next=20;break;case 20:return this._recording=!0,A=this._targetFrameRate,M=(M=1/(A=A!==1/0&&A!==void 0&&A!==0?A:60)*1e3)<20?20:M,D=(F=x==="seconds"?S*A:S)+(A=x==="seconds"?_*A:_),A=A,this.frameCount=A,z=this._pixelDensity,this.pixelDensity(1),G=[],document.getElementById(P)!==null&&document.getElementById(P).remove(),O||((U=this.createP("")).id(P),U.style("font-size","16px"),U.style("font-family","Montserrat"),U.style("background-color","#ffffffa0"),U.style("padding","8px"),U.style("border-radius","10px"),U.position(0,0)),this._renderer instanceof u.default.RendererGL&&(Y=this.drawingContext,H=new Uint8Array(Y.drawingBufferWidth*Y.drawingBufferHeight*4)),this.noLoop(),Q.next=39,Promise.resolve();case 39:if(A<D)return this.redraw(),ie=void 0,ie=this._renderer instanceof u.default.RendererGL?(H=new Uint8Array(Y.drawingBufferWidth*Y.drawingBufferHeight*4),Y.readPixels(0,0,Y.drawingBufferWidth,Y.drawingBufferHeight,Y.RGBA,Y.UNSIGNED_BYTE,H),(function(le,fe,ve){for(var he=parseInt(ve/2),me=4*fe,_e=new Uint8Array(4*fe),Ae=0;Ae<he;++Ae){var Se=Ae*me,Ge=(ve-Ae-1)*me;_e.set(le.subarray(Se,Se+me)),le.copyWithin(Se,Ge,Ge+me),le.set(_e,Ge)}return le})(H,this.width,this.height)):this.drawingContext.getImageData(0,0,this.width,this.height).data,G.push(ie),A++,O||U.html("Saved frame <b>"+G.length.toString()+"</b> out of "+F.toString()),Q.next=48,new Promise(function(le){return setTimeout(le,0)});Q.next=50;break;case 48:Q.next=39;break;case 50:O||U.html("Frames processed, generating color palette..."),this.loop(),this.pixelDensity(z),oe=(0,o.GIFEncoder)(),L=(function(le){for(var fe=new Uint8Array(le.length*le[0].length),ve=0;ve<le.length;ve++)fe.set(le[ve],ve*le[0].length);var he=(0,o.quantize)(fe,256,{format:"rgba4444",oneBitAlpha:!0});return he.length===256?he[he.length-1]=[255*Math.random(),255*Math.random(),255*Math.random(),0]:he.push([255*Math.random(),255*Math.random(),255*Math.random(),0]),he})(G),j={},R=function(le){for(var fe=le.length/4,ve=new Uint8Array(fe),he=0;he<fe;he++){var me=le[4*he]<<24|le[4*he+1]<<16|le[4*he+2]<<8|le[4*he+3];j[me]===void 0&&(j[me]=(0,o.nearestColorIndex)(L,le.slice(4*he,4*(he+1)))),ve[he]=j[me]}return ve},N=L.length-1,X=[],K=0;case 60:if(!(K<G.length)){Q.next=71;break}if(re=R(G[K]),ie=re.slice(),K===0)oe.writeFrame(re,this.width,this.height,{palette:L,delay:M,dispose:1});else{for(ee=0;ee<re.length;ee++)re[ee]===X[ee]&&(re[ee]=N);oe.writeFrame(re,this.width,this.height,{delay:M,transparent:!0,transparentIndex:N,dispose:1})}return X=ie,O||U.html("Rendered frame <b>"+K.toString()+"</b> out of "+F.toString()),Q.next=68,new Promise(function(le){return setTimeout(le,0)});case 68:K++,Q.next=60;break;case 71:oe.finish(),ae=oe.bytesView(),ae=new Blob([ae],{type:"image/gif"}),G=[],this._recording=!1,this.loop(),O||(U.html("Done. Downloading your gif!\u{1F338}"),0<T&&setTimeout(function(){return U.remove()},1e3*T)),u.default.prototype.downloadFile(ae,v,"gif");case 80:case"end":return Q.stop()}},d,this)});var l,c=function(){var d=this,v=arguments;return new Promise(function(S,E){var _=l.apply(d,v);function x(T){i(_,S,E,x,O,"next",T)}function O(T){i(_,S,E,x,O,"throw",T)}x(void 0)})};return function(d,v){return c.apply(this,arguments)}})(),u.default.prototype.image=function(l,c,d,v,A,z,G,U,Y,T,P,M){u.default._validateParameters("image",arguments);var H=l.width,F=l.height,D=(M=M||g.CENTER,P=P||g.CENTER,l.elt&&(H=H!==void 0?H:l.elt.width,F=F!==void 0?F:l.elt.height),l.elt&&l.elt.videoWidth&&!l.canvas&&(H=H!==void 0?H:l.elt.videoWidth,F=F!==void 0?F:l.elt.videoHeight),v||H),A=A||F,z=z||0,G=G||0,U=n(U!==void 0?U:H,H),H=n(Y!==void 0?Y:F,F),Y=1;l.elt&&!l.canvas&&l.elt.style.width&&(Y=l.elt.videoWidth&&!v?l.elt.videoWidth:l.elt.width,Y/=parseInt(l.elt.style.width,10)),z*=Y,G*=Y,H*=Y,U*=Y,F=s(T,P,M,(F=f.default.modeAdjust(c,d,D,A,this._renderer._imageMode)).x,F.y,F.w,F.h,z,G,U,H),this._renderer.image(l,F.sx,F.sy,F.sw,F.sh,F.dx,F.dy,F.dw,F.dh)},u.default.prototype.tint=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];u.default._validateParameters("tint",c);var v=this.color.apply(this,c);this._renderer._tint=v.levels},u.default.prototype.noTint=function(){this._renderer._tint=null},u.default.prototype._getTintedImageCanvas=u.default.Renderer2D.prototype._getTintedImageCanvas,u.default.prototype.imageMode=function(l){u.default._validateParameters("imageMode",arguments),l!==g.CORNER&&l!==g.CORNERS&&l!==g.CENTER||(this._renderer._imageMode=l)},t=u.default,C.default=t},{"../core/constants":272,"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/helpers":279,"../core/main":283,"core-js/modules/es.array.copy-within":154,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.typed-array.uint8-clamped-array":243,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246,gifenc:253,omggif:256,"regenerator-runtime/runtime":260}],307:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=u(t("../core/main")),m=u(t("./filters"));function u(g){return g&&g.__esModule?g:{default:g}}function f(g,y){for(var o=0;o<y.length;o++){var a=y[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(g,a.key,a)}}p.default.Image=(function(){function g(r,i){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function");this.width=r,this.height=i,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),(this._pixelsState=this)._pixelDensity=1,this.gifProperties=null,this._modified=!1,this.pixels=[]}var y,o,a;return y=g,(o=[{key:"pixelDensity",value:function(r){return r!==void 0?(r<=0&&(p.default._friendlyParamError({type:"INVALID_VALUE",format:{types:["Number"]},position:1},"pixelDensity"),r=1),this._pixelDensity=r,this.width/=r,this.height/=r,this):this._pixelDensity}},{key:"_animateGif",value:function(n){var i,s=this.gifProperties,n=n._lastRealFrameTime||window.performance.now();s.lastChangeTime===0&&(s.lastChangeTime=n),s.playing&&(s.timeDisplayed=n-s.lastChangeTime,i=s.frames[s.displayIndex].delay,s.timeDisplayed>=i&&(i=Math.floor(s.timeDisplayed/i),s.timeDisplayed=0,s.lastChangeTime=n,s.displayIndex+=i,s.loopCount=Math.floor(s.displayIndex/s.numFrames),s.loopLimit!==null&&s.loopCount>=s.loopLimit?s.playing=!1:(n=s.displayIndex%s.numFrames,this.drawingContext.putImageData(s.frames[n].image,0,0),s.displayIndex=n,this.setModified(!0))))}},{key:"_setProperty",value:function(r,i){this[r]=i,this.setModified(!0)}},{key:"loadPixels",value:function(){p.default.Renderer2D.prototype.loadPixels.call(this),this.setModified(!0)}},{key:"updatePixels",value:function(r,i,s,n){p.default.Renderer2D.prototype.updatePixels.call(this,r,i,s,n),this.setModified(!0)}},{key:"get",value:function(r,i,s,n){return p.default._validateParameters("p5.Image.get",arguments),p.default.Renderer2D.prototype.get.apply(this,arguments)}},{key:"_getPixel",value:function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return p.default.Renderer2D.prototype._getPixel.apply(this,i)}},{key:"set",value:function(r,i,s){p.default.Renderer2D.prototype.set.call(this,r,i,s),this.setModified(!0)}},{key:"resize",value:function(r,i){r===0&&i===0?(r=this.canvas.width,i=this.canvas.height):r===0?r=this.canvas.width*i/this.canvas.height:i===0&&(i=this.canvas.height*r/this.canvas.width),r=Math.floor(r),i=Math.floor(i);var s=document.createElement("canvas");if(s.width=r,s.height=i,this.gifProperties)for(var n=this.gifProperties,l=0;l<n.numFrames;l++){for(var c=this.drawingContext.createImageData(r,i),d=(x=x=_=E=S=void 0,n.frames[l].image),v=c,S=0,E=0;E<v.height;E++)for(var _=0;_<v.width;_++){var x=Math.floor(_*d.width/v.width),x=4*(Math.floor(E*d.height/v.height)*d.width+x);v.data[S++]=d.data[x++],v.data[S++]=d.data[x++],v.data[S++]=d.data[x++],v.data[S++]=d.data[+x]}n.frames[l].image=c}s.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,s.width,s.height),this.canvas.width=this.width=r,this.canvas.height=this.height=i,this.drawingContext.drawImage(s,0,0,r,i,0,0,r,i),0<this.pixels.length&&this.loadPixels(),this.setModified(!0)}},{key:"copy",value:function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];p.default.prototype.copy.apply(this,i)}},{key:"mask",value:function(r){var i=this.drawingContext.globalCompositeOperation,s=this._pixelDensity,n=1,l=[r=r===void 0?this:r,0,0,(n=r instanceof p.default.Renderer?r._pInst._pixelDensity:n)*r.width,n*r.height,0,0,s*this.width,s*this.height];if(this.drawingContext.globalCompositeOperation="destination-in",this.gifProperties){for(var c=0;c<this.gifProperties.frames.length;c++)this.drawingContext.putImageData(this.gifProperties.frames[c].image,0,0),this.copy.apply(this,l),this.gifProperties.frames[c].image=this.drawingContext.getImageData(0,0,s*this.width,s*this.height);this.drawingContext.putImageData(this.gifProperties.frames[this.gifProperties.displayIndex].image,0,0)}else this.copy.apply(this,l);this.drawingContext.globalCompositeOperation=i,this.setModified(!0)}},{key:"filter",value:function(r,i){m.default.apply(this.canvas,m.default[r],i),this.setModified(!0)}},{key:"blend",value:function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];p.default._validateParameters("p5.Image.blend",arguments),p.default.prototype.blend.apply(this,i),this.setModified(!0)}},{key:"setModified",value:function(r){this._modified=r}},{key:"isModified",value:function(){return this._modified}},{key:"save",value:function(r,i){this.gifProperties?p.default.prototype.encodeAndDownloadGif(this,r):p.default.prototype.saveCanvas(this.canvas,r,i)}},{key:"reset",value:function(){var r;this.gifProperties&&((r=this.gifProperties).playing=!0,r.timeSinceStart=0,r.timeDisplayed=0,r.lastChangeTime=0,r.loopCount=0,r.displayIndex=0,this.drawingContext.putImageData(r.frames[0].image,0,0))}},{key:"getCurrentFrame",value:function(){var r;if(this.gifProperties)return(r=this.gifProperties).displayIndex%r.numFrames}},{key:"setFrame",value:function(r){var i;this.gifProperties&&(r<(i=this.gifProperties).numFrames&&0<=r?(i.timeDisplayed=0,i.lastChangeTime=0,i.displayIndex=r,this.drawingContext.putImageData(i.frames[r].image,0,0)):console.log("Cannot set GIF to a frame number that is higher than total number of frames or below zero."))}},{key:"numFrames",value:function(){if(this.gifProperties)return this.gifProperties.numFrames}},{key:"play",value:function(){this.gifProperties&&(this.gifProperties.playing=!0)}},{key:"pause",value:function(){this.gifProperties&&(this.gifProperties.playing=!1)}},{key:"delay",value:function(r,i){if(this.gifProperties){var s=this.gifProperties;if(i<s.numFrames&&0<=i)s.frames[i].delay=r;else{var n=!0,i=!1,l=void 0;try{for(var c,d=s.frames[Symbol.iterator]();!(n=(c=d.next()).done);n=!0)c.value.delay=r}catch(S){i=!0,l=S}finally{try{n||d.return==null||d.return()}finally{if(i)throw l}}}}}}])&&f(y.prototype,o),a&&f(y,a),g})(),t=p.default.Image,C.default=t},{"../core/main":283,"./filters":304,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],308:[function(t,W,C){"use strict";t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.filter"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=u(t("../core/main")),m=u(t("./filters"));function u(f){return f&&f.__esModule?f:{default:f}}t("../color/p5.Color"),p.default.prototype.pixels=[],p.default.prototype.blend=function(){for(var f,g=arguments.length,y=new Array(g),o=0;o<g;o++)y[o]=arguments[o];p.default._validateParameters("blend",y),this._renderer?(f=this._renderer).blend.apply(f,y):p.default.Renderer2D.prototype.blend.apply(this,y)},p.default.prototype.copy=function(){for(var f,g,y,o,a,r,i,s,n,l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];if(p.default._validateParameters("copy",c),c.length===9)f=c[0],g=c[1],y=c[2],o=c[3],a=c[4],r=c[5],i=c[6],s=c[7],n=c[8];else{if(c.length!==8)throw new Error("Signature not supported");f=this,g=c[0],y=c[1],o=c[2],a=c[3],r=c[4],i=c[5],s=c[6],n=c[7]}p.default.prototype._copyHelper(this,f,g,y,o,a,r,i,s,n)},p.default.prototype._copyHelper=function(f,g,y,o,a,r,i,s,n,l){var c=g.canvas.width/g.width,d=0,v=0;g._renderer&&g._renderer.isP3D&&(d=g.width/2,v=g.height/2),f._renderer&&f._renderer.isP3D?(f.push(),f.resetMatrix(),f.noLights(),f.blendMode(f.BLEND),f.imageMode(f.CORNER),p.default.RendererGL.prototype.image.call(f._renderer,g,y+d,o+v,a,r,i,s,n,l),f.pop()):f.drawingContext.drawImage(g.canvas,c*(y+d),c*(o+v),c*a,c*r,i,s,n,l)},p.default.prototype.getFilterGraphicsLayer=function(){return this._renderer.getFilterGraphicsLayer()},p.default.prototype.filter=function(){for(var f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];p.default._validateParameters("filter",g);var i=(function(){var s,n={shader:void 0,operation:void 0,value:void 0,useWebGL:!0};return(arguments.length<=0?void 0:arguments[0])instanceof p.default.Shader?n.shader=arguments.length<=0?void 0:arguments[0]:(n.operation=arguments.length<=0?void 0:arguments[0],1<arguments.length&&typeof(arguments.length<=1?void 0:arguments[1])=="number"&&(n.value=arguments.length<=1?void 0:arguments[1]),((s=arguments.length-1)<0||arguments.length<=s?void 0:arguments[s])===!1&&(n.useWebGL=!1)),n}).apply(void 0,g),o=i.shader,a=i.operation,r=i.value,i=i.useWebGL;this._renderer.isP3D&&o?p.default.RendererGL.prototype.filter.call(this._renderer,o):i||this._renderer.isP3D?(!i&&this._renderer.isP3D&&console.warn("filter() with useWebGL=false is not supported in WEBGL"),this._renderer.isP3D?p.default.RendererGL.prototype.filter.call(this._renderer,a,r):((o=this.getFilterGraphicsLayer()).copy(this._renderer,0,0,this.width,this.height,-this.width/2,-this.height/2,this.width,this.height),this._renderer.clear(),this._renderer.resetMatrix(),o.filter.apply(o,g),this.copy(o._renderer,0,0,this.width,this.height,0,0,this.width,this.height),o.clear())):this.canvas!==void 0?m.default.apply(this.canvas,m.default[a],r):m.default.apply(this.elt,m.default[a],r)},p.default.prototype.get=function(f,g,y,o){var a;return p.default._validateParameters("get",arguments),(a=this._renderer).get.apply(a,arguments)},p.default.prototype.loadPixels=function(){for(var f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];p.default._validateParameters("loadPixels",g),this._renderer.loadPixels()},p.default.prototype.set=function(f,g,y){this._renderer.set(f,g,y)},p.default.prototype.updatePixels=function(f,g,y,o){p.default._validateParameters("updatePixels",arguments),this.pixels.length!==0&&this._renderer.updatePixels(f,g,y,o)},t=p.default,C.default=t},{"../color/p5.Color":270,"../core/main":283,"./filters":304,"core-js/modules/es.array.filter":157}],309:[function(t,W,C){"use strict";function p(r){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var m=g(t("../core/main")),u=(t("whatwg-fetch"),t("es6-promise/auto"),g(t("fetch-jsonp"))),f=g(t("file-saver"));function g(r){return r&&r.__esModule?r:{default:r}}function y(r){return(y=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(i){return p(i)}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":p(i)})(r)}function o(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function a(r,i){i&&i!==!0&&i!=="true"||(i="");var s="";return(r=r||"untitled")&&r.includes(".")&&(s=r.split(".").pop()),i&&s!==i&&(s=i,r="".concat(r,".").concat(s)),[r,s]}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),m.default.prototype.loadJSON=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];m.default._validateParameters("loadJSON",i);for(var n,l,c,d=i[0],v={},S="json",E=1;E<i.length;E++){var _=i[E];typeof _=="string"?_!=="jsonp"&&_!=="json"||(S=_):typeof _=="function"?n?l=_:n=_:y(_)==="object"&&(_.hasOwnProperty("jsonpCallback")||_.hasOwnProperty("jsonpCallbackFunction"))&&(S="jsonp",c=_)}var x=this;return this.httpDo(d,"GET",c,S,function(O){for(var T in O)v[T]=O[T];n!==void 0&&n(O),x._decrementPreload()},function(O){if(m.default._friendlyFileLoadError(5,d),!l)throw O;l(O)}),v},m.default.prototype.loadStrings=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];m.default._validateParameters("loadStrings",i);for(var n,l,c=[],d=1;d<i.length;d++){var v=i[d];typeof v=="function"&&(n===void 0?n=v:l===void 0&&(l=v))}var S=this;return m.default.prototype.httpDo.call(this,i[0],"GET","text",function(E){for(var _=E.replace(/\r\n/g,"\r").replace(/\n/g,"\r").split(/\r/),x=0,O=_.length;x<O;x+=32768)Array.prototype.push.apply(c,_.slice(x,Math.min(x+32768,O)));n!==void 0&&n(c),S._decrementPreload()},function(E){if(m.default._friendlyFileLoadError(3,E),!l)throw E;l(E)}),c},m.default.prototype.loadTable=function(r){var i,s,n,l=[],c=!1,d=r.substring(r.lastIndexOf(".")+1,r.length);d==="csv"?n=",":d==="ssv"?n=";":d==="tsv"&&(n="	");for(var v=1;v<arguments.length;v++)typeof arguments[v]=="function"?i===void 0?i=arguments[v]:s===void 0&&(s=arguments[v]):typeof arguments[v]=="string"&&(l.push(arguments[v]),arguments[v]==="header"&&(c=!0),arguments[v]==="csv"?n=",":arguments[v]==="ssv"?n=";":arguments[v]==="tsv"&&(n="	"));var S=new m.default.Table,E=this;return this.httpDo(r,"GET","table",function(_){for(var x,O,T={},P=0,M=[],F=0,D=null,A=function(){T.currentState=P,T.token=""},z=function(){D.push(T.token),A()},G=function(){T.currentState=4,M.push(D),D=null};;){if((x=_[F++])==null){if(T.escaped)throw new Error("Unclosed quote in file.");if(D){z(),G();break}}if(D===null&&(T.escaped=!1,D=[],A()),T.currentState===P){if(x==='"'){T.escaped=!0,T.currentState=1;continue}T.currentState=1}if(T.currentState===1&&T.escaped)if(x==='"')_[F]==='"'?(T.token+='"',F++):(T.escaped=!1,T.currentState=2);else{if(x==="\r")continue;T.token+=x}else x==="\r"?(_[F]===`
`&&F++,z(),G()):x===`
`?(z(),G()):x===n?z():T.currentState===1&&(T.token+=x)}if(c)S.columns=M.shift();else for(var U=0;U<M[0].length;U++)S.columns[U]="null";for(var H=0;H<M.length;H++)(M[H].length!==1||M[H][0]!=="undefined"&&M[H][0]!=="")&&((O=new m.default.TableRow).arr=M[H],O.obj=(function(Y,oe){if((oe=oe||[])===void 0)for(var L=0;L<Y.length;L++)oe[L.toString()]=L;return Object.fromEntries(oe.map(function(j,R){return[j,Y[R]]}))})(M[H],S.columns),S.addRow(O));typeof i=="function"&&i(S),E._decrementPreload()},function(_){m.default._friendlyFileLoadError(2,r),s?s(_):console.error(_)}),S},m.default.prototype.loadXML=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];for(var n,l,c=new m.default.XML,d=1;d<i.length;d++){var v=i[d];typeof v=="function"&&(n===void 0?n=v:l===void 0&&(l=v))}var S=this;return this.httpDo(i[0],"GET","xml",function(E){for(var _ in E)c[_]=E[_];n!==void 0&&n(c),S._decrementPreload()},function(E){if(m.default._friendlyFileLoadError(1,E),!l)throw E;l(E)}),c},m.default.prototype.loadBytes=function(r,i,s){var n={},l=this;return this.httpDo(r,"GET","arrayBuffer",function(c){n.bytes=new Uint8Array(c),typeof i=="function"&&i(n),l._decrementPreload()},function(c){if(m.default._friendlyFileLoadError(6,r),!s)throw c;s(c)}),n},m.default.prototype.httpGet=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return m.default._validateParameters("httpGet",i),i.splice(1,0,"GET"),m.default.prototype.httpDo.apply(this,i)},m.default.prototype.httpPost=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return m.default._validateParameters("httpPost",i),i.splice(1,0,"POST"),m.default.prototype.httpDo.apply(this,i)},m.default.prototype.httpDo=function(){for(var r,i,s,n={},l=0,c="text/plain",d=arguments.length-1;0<d&&typeof(d<0||arguments.length<=d?void 0:arguments[d])=="function";d--)l++;var v=arguments.length-l,S=arguments.length<=0?void 0:arguments[0];if(v==2&&typeof S=="string"&&y(arguments.length<=1?void 0:arguments[1])==="object")P=new Request(S,arguments.length<=1?void 0:arguments[1]),i=arguments.length<=2?void 0:arguments[2],s=arguments.length<=3?void 0:arguments[3];else{for(var E,_="GET",x=1;x<arguments.length;x++){var O=x<0||arguments.length<=x?void 0:arguments[x];if(typeof O=="string")O==="GET"||O==="POST"||O==="PUT"||O==="DELETE"?_=O:O==="json"||O==="jsonp"||O==="binary"||O==="arrayBuffer"||O==="xml"||O==="text"||O==="table"?r=O:E=O;else if(typeof O=="number")E=O.toString();else if(y(O)==="object")if(O.hasOwnProperty("jsonpCallback")||O.hasOwnProperty("jsonpCallbackFunction"))for(var T in O)n[T]=O[T];else c=O instanceof m.default.XML?(E=O.serialize(),"application/xml"):(E=JSON.stringify(O),"application/json");else typeof O=="function"&&(i?s=O:i=O)}var v=_==="GET"?new Headers:new Headers({"Content-Type":c}),P=new Request(S,{method:_,mode:"cors",body:E,headers:v})}return(v=(v=(r=r||(S.includes("json")?"json":S.includes("xml")?"xml":"text"))==="jsonp"?(0,u.default)(S,n):fetch(P)).then(function(M){if(!M.ok)throw(F=new Error(M.body)).status=M.status,F.ok=!1,F;var F=0;switch((F=r!=="jsonp"?M.headers.get("content-length"):F)&&64e6<F&&m.default._friendlyFileLoadError(7,S),r){case"json":case"jsonp":return M.json();case"binary":return M.blob();case"arrayBuffer":return M.arrayBuffer();case"xml":return M.text().then(function(D){return D=new DOMParser().parseFromString(D,"text/xml"),new m.default.XML(D.documentElement)});default:return M.text()}})).then(i||function(){}),v.catch(s||console.error),v},window.URL=window.URL||window.webkitURL,m.default.prototype._pWriters=[],m.default.prototype.createWriter=function(r,i){var s,n;for(n in m.default.prototype._pWriters)if(m.default.prototype._pWriters[n].name===r)return s=new m.default.PrintWriter(r+this.millis(),i),m.default.prototype._pWriters.push(s),s;return s=new m.default.PrintWriter(r,i),m.default.prototype._pWriters.push(s),s},m.default.PrintWriter=function(r,i){var s=this;this.name=r,this.content="",this.write=function(n){this.content+=n},this.print=function(n){this.content+="".concat(n,`
`)},this.clear=function(){this.content=""},this.close=function(){var n,l=[];for(n in l.push(this.content),m.default.prototype.writeFile(l,r,i),m.default.prototype._pWriters)m.default.prototype._pWriters[n].name===this.name&&m.default.prototype._pWriters.splice(n,1);s.clear(),s={}}},m.default.prototype.save=function(r,i,s){var n=arguments,l=(this._curElement||this).elt;if(n.length===0)m.default.prototype.saveCanvas(l);else if(n[0]instanceof m.default.Renderer||n[0]instanceof m.default.Graphics)m.default.prototype.saveCanvas(n[0].elt,n[1],n[2]);else if(n.length===1&&typeof n[0]=="string")m.default.prototype.saveCanvas(l,n[0]);else switch(a(n[1],n[2])[1]){case"json":return void m.default.prototype.saveJSON(n[0],n[1],n[2]);case"txt":return void m.default.prototype.saveStrings(n[0],n[1],n[2]);default:n[0]instanceof Array?m.default.prototype.saveStrings(n[0],n[1],n[2]):n[0]instanceof m.default.Table?m.default.prototype.saveTable(n[0],n[1],n[2]):n[0]instanceof m.default.Image?m.default.prototype.saveCanvas(n[0].canvas,n[1]):n[0]instanceof m.default.SoundFile&&m.default.prototype.saveSound(n[0],n[1],n[2],n[3])}},m.default.prototype.saveJSON=function(r,i,s){m.default._validateParameters("saveJSON",arguments),s=s?JSON.stringify(r):JSON.stringify(r,void 0,2),this.saveStrings(s.split(`
`),i,"json")},m.default.prototype.saveJSONObject=m.default.prototype.saveJSON,m.default.prototype.saveJSONArray=m.default.prototype.saveJSON,m.default.prototype.saveStrings=function(r,i,s,n){m.default._validateParameters("saveStrings",arguments);for(var l=this.createWriter(i,s||"txt"),c=0;c<r.length;c++)n?l.write(r[c]+`\r
`):l.write(r[c]+`
`);l.close(),l.clear()},m.default.prototype.saveTable=function(r,i,s){m.default._validateParameters("saveTable",arguments),n=s===void 0?i.substring(i.lastIndexOf(".")+1,i.length):s;var n,l=this.createWriter(i,n),c=r.columns,d=n==="tsv"?"	":",";if(n!=="html"){if(c[0]!=="0"){for(var v=0;v<c.length;v++)v<c.length-1?l.write(c[v]+d):l.write(c[v]);l.write(`
`)}for(var S=0;S<r.rows.length;S++){for(var E=void 0,E=0;E<r.rows[S].arr.length;E++)E<r.rows[S].arr.length-1?n==="csv"&&String(r.rows[S].arr[E]).includes(",")?l.write('"'+r.rows[S].arr[E]+'"'+d):l.write(r.rows[S].arr[E]+d):n==="csv"&&String(r.rows[S].arr[E]).includes(",")?l.write('"'+r.rows[S].arr[E]+'"'):l.write(r.rows[S].arr[E]);l.write(`
`)}}else{if(l.print("<html>"),l.print("<head>"),l.print('  <meta http-equiv="content-type" content="text/html;charset=utf-8" />'),l.print("</head>"),l.print("<body>"),l.print("  <table>"),c[0]!=="0"){l.print("    <tr>");for(var _=0;_<c.length;_++){var x=o(c[_]);l.print("      <td>".concat(x)),l.print("      </td>")}l.print("    </tr>")}for(var O=0;O<r.rows.length;O++){l.print("    <tr>");for(var T=0;T<r.columns.length;T++){var P=o(r.rows[O].getString(T));l.print("      <td>".concat(P)),l.print("      </td>")}l.print("    </tr>")}l.print("  </table>"),l.print("</body>"),l.print("</html>")}l.close(),l.clear()},m.default.prototype.writeFile=function(l,i,s){var n="application/octet-stream",l=(m.default.prototype._isSafari()&&(n="text/plain"),new Blob(l,{type:n}));m.default.prototype.downloadFile(l,i,s)},m.default.prototype.downloadFile=function(r,l,c){var n,l=a(l,c),c=l[0];r instanceof Blob?f.default.saveAs(r,c):((n=document.createElement("a")).href=r,n.download=c,n.onclick=function(d){document.body.removeChild(d.target),d.stopPropagation()},n.style.display="none",document.body.appendChild(n),m.default.prototype._isSafari()&&(r=(r=`Hello, Safari user! To download this file...
1. Go to File --> Save As.
2. Choose "Page Source" as the Format.
`)+'3. Name it with this extension: ."'.concat(l[1],'"'),alert(r)),n.click())},m.default.prototype._checkFileExtension=a,m.default.prototype._isSafari=function(){return window.HTMLElement.toString().includes("Constructor")},t=m.default,C.default=t},{"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.function.name":174,"core-js/modules/es.object.from-entries":185,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/web.dom-collections.iterator":246,"core-js/modules/web.url":248,"es6-promise/auto":249,"fetch-jsonp":251,"file-saver":252,"whatwg-fetch":261}],310:[function(t,W,C){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(u,f){for(var g=0;g<f.length;g++){var y=f[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(u,y.key,y)}}p.default.Table=(function(){function u(){var o=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],a=this,r=u;if(!(a instanceof r))throw new TypeError("Cannot call a class as a function");this.columns=[],this.rows=o}var f,g,y;return f=u,(g=[{key:"addRow",value:function(o){if(o=o||new p.default.TableRow,o.arr===void 0||o.obj===void 0)throw new Error("invalid TableRow: ".concat(o));return(o.table=this).rows.push(o),o}},{key:"removeRow",value:function(o){this.rows[o].table=null,o=this.rows.splice(o+1,this.rows.length),this.rows.pop(),this.rows=this.rows.concat(o)}},{key:"getRow",value:function(o){return this.rows[o]}},{key:"getRows",value:function(){return this.rows}},{key:"findRow",value:function(o,a){if(typeof a=="string"){for(var r=0;r<this.rows.length;r++)if(this.rows[r].obj[a]===o)return this.rows[r]}else for(var i=0;i<this.rows.length;i++)if(this.rows[i].arr[a]===o)return this.rows[i];return null}},{key:"findRows",value:function(o,a){var r=[];if(typeof a=="string")for(var i=0;i<this.rows.length;i++)this.rows[i].obj[a]===o&&r.push(this.rows[i]);else for(var s=0;s<this.rows.length;s++)this.rows[s].arr[a]===o&&r.push(this.rows[s]);return r}},{key:"matchRow",value:function(o,a){if(typeof a=="number"){for(var r=0;r<this.rows.length;r++)if(this.rows[r].arr[a].match(o))return this.rows[r]}else for(var i=0;i<this.rows.length;i++)if(this.rows[i].obj[a].match(o))return this.rows[i];return null}},{key:"matchRows",value:function(o,a){var r=[];if(typeof a=="number")for(var i=0;i<this.rows.length;i++)this.rows[i].arr[a].match(o)&&r.push(this.rows[i]);else for(var s=0;s<this.rows.length;s++)this.rows[s].obj[a].match(o)&&r.push(this.rows[s]);return r}},{key:"getColumn",value:function(o){var a=[];if(typeof o=="string")for(var r=0;r<this.rows.length;r++)a.push(this.rows[r].obj[o]);else for(var i=0;i<this.rows.length;i++)a.push(this.rows[i].arr[o]);return a}},{key:"clearRows",value:function(){delete this.rows,this.rows=[]}},{key:"addColumn",value:function(o){this.columns.push(o||null)}},{key:"getColumnCount",value:function(){return this.columns.length}},{key:"getRowCount",value:function(){return this.rows.length}},{key:"removeTokens",value:function(o,a){for(var r=[],i=0;i<o.length;i++)r.push(o.charAt(i).replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));var s=new RegExp(r.join("|"),"g");if(a===void 0)for(var n=0;n<this.columns.length;n++)for(var l=0;l<this.rows.length;l++){var c=(c=this.rows[l].arr[n]).replace(s,"");this.rows[l].arr[n]=c,this.rows[l].obj[this.columns[n]]=c}else if(typeof a=="string")for(var d=0;d<this.rows.length;d++){var v=(v=this.rows[d].obj[a]).replace(s,""),S=(this.rows[d].obj[a]=v,this.columns.indexOf(a));this.rows[d].arr[S]=v}else for(var E=0;E<this.rows.length;E++){var _=(_=this.rows[E].arr[a]).replace(s,"");this.rows[E].arr[a]=_,this.rows[E].obj[this.columns[a]]=_}}},{key:"trim",value:function(o){var a=new RegExp(" ","g");if(o===void 0)for(var r=0;r<this.columns.length;r++)for(var i=0;i<this.rows.length;i++){var s=(s=this.rows[i].arr[r]).replace(a,"");this.rows[i].arr[r]=s,this.rows[i].obj[this.columns[r]]=s}else if(typeof o=="string")for(var n=0;n<this.rows.length;n++){var l=(l=this.rows[n].obj[o]).replace(a,""),c=(this.rows[n].obj[o]=l,this.columns.indexOf(o));this.rows[n].arr[c]=l}else for(var d=0;d<this.rows.length;d++){var v=(v=this.rows[d].arr[o]).replace(a,"");this.rows[d].arr[o]=v,this.rows[d].obj[this.columns[o]]=v}}},{key:"removeColumn",value:function(i){typeof i=="string"?r=this.columns.indexOf(a=i):a=this.columns[r=i];var a,r,i=this.columns.splice(r+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(i);for(var s=0;s<this.rows.length;s++){var n=this.rows[s].arr,l=n.splice(r+1,n.length);n.pop(),this.rows[s].arr=n.concat(l),delete this.rows[s].obj[a]}}},{key:"set",value:function(o,a,r){this.rows[o].set(a,r)}},{key:"setNum",value:function(o,a,r){this.rows[o].setNum(a,r)}},{key:"setString",value:function(o,a,r){this.rows[o].setString(a,r)}},{key:"get",value:function(o,a){return this.rows[o].get(a)}},{key:"getNum",value:function(o,a){return this.rows[o].getNum(a)}},{key:"getString",value:function(o,a){return this.rows[o].getString(a)}},{key:"getObject",value:function(o){for(var a,r={},i=0;i<this.rows.length;i++)if(a=this.rows[i].obj,typeof o=="string"){if(!(0<=this.columns.indexOf(o)))throw new Error('This table has no column named "'.concat(o,'"'));r[a[o]]=a}else r[i]=this.rows[i].obj;return r}},{key:"getArray",value:function(){for(var o=[],a=0;a<this.rows.length;a++)o.push(this.rows[a].arr);return o}}])&&m(f.prototype,g),y&&m(f,y),u})(),t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.join":166,"core-js/modules/es.array.splice":171,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.match":201,"core-js/modules/es.string.replace":204}],311:[function(t,W,C){"use strict";t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t};function p(m,u){for(var f=0;f<u.length;f++){var g=u[f];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}t.default.TableRow=(function(){function m(y,o){if(!(this instanceof m))throw new TypeError("Cannot call a class as a function");var a=[];y&&(a=y.split(o=o||",")),this.arr=a,this.obj=Object.fromEntries(a.entries()),this.table=null}var u,f,g;return u=m,(f=[{key:"set",value:function(y,o){if(typeof y=="string"){var a=this.table.columns.indexOf(y);if(!(0<=a))throw new Error('This table has no column named "'.concat(y,'"'));this.obj[y]=o,this.arr[a]=o}else{if(!(y<this.table.columns.length))throw new Error("Column #".concat(y," is out of the range of this table"));this.arr[y]=o,a=this.table.columns[y],this.obj[a]=o}}},{key:"setNum",value:function(y,o){o=parseFloat(o),this.set(y,o)}},{key:"setString",value:function(y,o){o=o.toString(),this.set(y,o)}},{key:"get",value:function(y){return(typeof y=="string"?this.obj:this.arr)[y]}},{key:"getNum",value:function(y){var o=parseFloat(typeof y=="string"?this.obj[y]:this.arr[y]);if(o.toString()==="NaN")throw"Error: ".concat(this.obj[y]," is NaN (Not a Number)");return o}},{key:"getString",value:function(y){return(typeof y=="string"?this.obj:this.arr)[y].toString()}}])&&p(u.prototype,f),g&&p(u,g),m})(),t=t.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.from-entries":185,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.split":206,"core-js/modules/web.dom-collections.iterator":246}],312:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(f,g){for(var y=0;y<g.length;y++){var o=g[y];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(f,o.key,o)}}function u(f){for(var g=[],y=0;y<f.length;y++)g.push(new p.default.XML(f[y]));return g}p.default.XML=(function(){function f(a){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");a?this.DOM=a:(a=document.implementation.createDocument(null,"doc"),this.DOM=a.createElement("root"))}var g,y,o;return g=f,(y=[{key:"getParent",value:function(){return new p.default.XML(this.DOM.parentElement)}},{key:"getName",value:function(){return this.DOM.tagName}},{key:"setName",value:function(a){var r=this.DOM.innerHTML,i=this.DOM.attributes,s=document.implementation.createDocument(null,"default").createElement(a);s.innerHTML=r;for(var n=0;n<i.length;n++)s.setAttribute(i[n].nodeName,i[n].nodeValue);this.DOM=s}},{key:"hasChildren",value:function(){return 0<this.DOM.children.length}},{key:"listChildren",value:function(){for(var a=[],r=0;r<this.DOM.childNodes.length;r++)a.push(this.DOM.childNodes[r].nodeName);return a}},{key:"getChildren",value:function(a){return u(a?this.DOM.getElementsByTagName(a):this.DOM.children)}},{key:"getChild",value:function(a){if(typeof a!="string")return new p.default.XML(this.DOM.children[a]);var r=!0,i=!1,s=void 0;try{for(var n,l=this.DOM.children[Symbol.iterator]();!(r=(n=l.next()).done);r=!0){var c=n.value;if(c.tagName===a)return new p.default.XML(c)}}catch(d){i=!0,s=d}finally{try{r||l.return==null||l.return()}finally{if(i)throw s}}}},{key:"addChild",value:function(a){a instanceof p.default.XML&&this.DOM.appendChild(a.DOM)}},{key:"removeChild",value:function(a){var r=-1;if(typeof a=="string"){for(var i=0;i<this.DOM.children.length;i++)if(this.DOM.children[i].tagName===a){r=i;break}}else r=a;r!==-1&&this.DOM.removeChild(this.DOM.children[r])}},{key:"getAttributeCount",value:function(){return this.DOM.attributes.length}},{key:"listAttributes",value:function(){var a=[],r=!0,i=!1,s=void 0;try{for(var n,l=this.DOM.attributes[Symbol.iterator]();!(r=(n=l.next()).done);r=!0){var c=n.value;a.push(c.nodeName)}}catch(d){i=!0,s=d}finally{try{r||l.return==null||l.return()}finally{if(i)throw s}}return a}},{key:"hasAttribute",value:function(a){var r={},i=!0,s=!1,n=void 0;try{for(var l,c=this.DOM.attributes[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var d=l.value;r[d.nodeName]=d.nodeValue}}catch(v){s=!0,n=v}finally{try{i||c.return==null||c.return()}finally{if(s)throw n}}return!!r[a]}},{key:"getNum",value:function(a,r){var i={},s=!0,n=!1,l=void 0;try{for(var c,d=this.DOM.attributes[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var v=c.value;i[v.nodeName]=v.nodeValue}}catch(S){n=!0,l=S}finally{try{s||d.return==null||d.return()}finally{if(n)throw l}}return Number(i[a])||r||0}},{key:"getString",value:function(a,r){var i={},s=!0,n=!1,l=void 0;try{for(var c,d=this.DOM.attributes[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var v=c.value;i[v.nodeName]=v.nodeValue}}catch(S){n=!0,l=S}finally{try{s||d.return==null||d.return()}finally{if(n)throw l}}return i[a]?String(i[a]):r||null}},{key:"setAttribute",value:function(a,r){this.DOM.setAttribute(a,r)}},{key:"getContent",value:function(a){var r=this.DOM.textContent;return(r=r.replace(/\s\s+/g,","))||a||null}},{key:"setContent",value:function(a){this.DOM.children.length||(this.DOM.textContent=a)}},{key:"serialize",value:function(){return new XMLSerializer().serializeToString(this.DOM)}}])&&m(g.prototype,y),o&&m(g,o),f})(),t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],313:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.string.includes"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(u){return(function(f){if(Array.isArray(f)){for(var g=0,y=new Array(f.length);g<f.length;g++)y[g]=f[g];return y}})(u)||(function(f){if(Symbol.iterator in Object(f)||Object.prototype.toString.call(f)==="[object Arguments]")return Array.from(f)})(u)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}p.default.prototype.abs=Math.abs,p.default.prototype.ceil=Math.ceil,p.default.prototype.constrain=function(u,f,g){return p.default._validateParameters("constrain",arguments),Math.max(Math.min(u,g),f)},p.default.prototype.dist=function(){for(var u=arguments.length,f=new Array(u),g=0;g<u;g++)f[g]=arguments[g];return p.default._validateParameters("dist",f),f.length===4?Math.hypot(f[2]-f[0],f[3]-f[1]):f.length===6?Math.hypot(f[3]-f[0],f[4]-f[1],f[5]-f[2]):void 0},p.default.prototype.exp=Math.exp,p.default.prototype.floor=Math.floor,p.default.prototype.lerp=function(u,f,g){return p.default._validateParameters("lerp",arguments),g*(f-u)+u},p.default.prototype.log=Math.log,p.default.prototype.mag=function(u,f){return p.default._validateParameters("mag",arguments),Math.hypot(u,f)},p.default.prototype.map=function(u,f,g,y,o,a){return p.default._validateParameters("map",arguments),u=(u-f)/(g-f)*(o-y)+y,a?y<o?this.constrain(u,y,o):this.constrain(u,o,y):u},p.default.prototype.max=function(){for(var u=function(o){return Math.max.apply(Math,m(o))},f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return Array.isArray(g[0])?u(g[0]):u(g)},p.default.prototype.min=function(){for(var u=function(o){return Math.min.apply(Math,m(o))},f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return Array.isArray(g[0])?u(g[0]):u(g)},p.default.prototype.norm=function(u,f,g){return p.default._validateParameters("norm",arguments),this.map(u,f,g,0,1)},p.default.prototype.pow=Math.pow,p.default.prototype.round=function(u,f){return f?(f=Math.pow(10,f),Math.round(u*f)/f):Math.round(u)},p.default.prototype.sq=function(u){return u*u},p.default.prototype.sqrt=Math.sqrt,p.default.prototype.fract=function(y){p.default._validateParameters("fract",arguments);var f,g=0,y=Number(y);return isNaN(y)||Math.abs(y)===1/0?y:(y<0&&(y=-y,g=1),String(y).includes(".")&&!String(y).includes("e")?(f=String(y),f=+("0"+f.slice(f.indexOf("."))),Math.abs(g-f)):y<1?Math.abs(g-y):0)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.from":162,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.hypot":176,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],314:[function(t,W,C){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(f,g,y){return(m=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?Reflect.construct:function(o,a,r){var i=[null];return i.push.apply(i,a),a=new(Function.bind.apply(o,i)),r&&u(a,r.prototype),a}).apply(null,arguments)}function u(f,g){return(u=Object.setPrototypeOf||function(y,o){return y.__proto__=o,y})(f,g)}p.default.prototype.createVector=function(f,g,y){return this instanceof p.default?m(p.default.Vector,[this._fromRadians.bind(this),this._toRadians.bind(this)].concat(Array.prototype.slice.call(arguments))):new p.default.Vector(f,g,y)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196}],315:[function(y,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,y=(y=y("../core/main"))&&y.__esModule?y:{default:y};function p(o){return .5*(1-Math.cos(o*Math.PI))}var m,u=4095,f=4,g=.5,y=(y.default.prototype.noise=function(o){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(m==null){m=new Array(4096);for(var i=0;i<4096;i++)m[i]=Math.random()}o<0&&(o=-o),a<0&&(a=-a),r<0&&(r=-r);for(var s,n,l=Math.floor(o),c=Math.floor(a),d=Math.floor(r),v=o-l,S=a-c,E=r-d,_=0,x=.5,O=0;O<f;O++){var T=l+(c<<4)+(d<<8),P=p(v),M=p(S),F=m[T&u];F+=P*(m[T+1&u]-F),s=m[T+16&u],F+=M*((s+=P*(m[T+16+1&u]-s))-F),s=m[(T+=256)&u],s+=P*(m[T+1&u]-s),n=m[T+16&u],s+=M*((n+=P*(m[T+16+1&u]-n))-s),_+=(F+=p(E)*(s-F))*x,x*=g,l<<=1,c<<=1,d<<=1,1<=(v*=2)&&(l++,v--),1<=(S*=2)&&(c++,S--),1<=(E*=2)&&(d++,E--)}return _},y.default.prototype.noiseDetail=function(o,a){0<o&&(f=o),0<a&&(g=a)},y.default.prototype.noiseSeed=function(o){i=4294967296;var a,r,i,s={setSeed:function(l){r=a=(l??Math.random()*i)>>>0},getSeed:function(){return a},rand:function(){return(r=(1664525*r+1013904223)%i)/i}};s.setSeed(o),m=new Array(4096);for(var n=0;n<4096;n++)m[n]=s.rand()},y.default);C.default=y},{"../core/main":283}],316:[function(t,W,C){"use strict";function p(a){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(a)}function m(a){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(r){return p(r)}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":p(r)})(a)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.some"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.number.epsilon"),t("core-js/modules/es.number.is-finite"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.some"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.number.epsilon"),t("core-js/modules/es.number.is-finite"),t("core-js/modules/es.string.sub"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(o=t("../core/main"))&&o.__esModule?o:{default:o},f=(function(a){if(a&&a.__esModule)return a;if(a===null||m(a)!=="object"&&typeof a!="function")return{default:a};var r=g();if(r&&r.has(a))return r.get(a);var i,s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in a){var l;Object.prototype.hasOwnProperty.call(a,i)&&((l=n?Object.getOwnPropertyDescriptor(a,i):null)&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=a[i])}return s.default=a,r&&r.set(a,s),s})(t("../core/constants"));function g(){var a;return typeof WeakMap!="function"?null:(a=new WeakMap,g=function(){return a},a)}function y(a,r){for(var i=0;i<r.length;i++){var s=r[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}u.default.Vector=(function(){function a(){var d=this,n=a;if(!(d instanceof n))throw new TypeError("Cannot call a class as a function");var l,c,d=typeof(arguments.length<=0?void 0:arguments[0])=="function"?(this.isPInst=!0,this._fromRadians=arguments.length<=0?void 0:arguments[0],this._toRadians=arguments.length<=1?void 0:arguments[1],l=(arguments.length<=2?void 0:arguments[2])||0,c=(arguments.length<=3?void 0:arguments[3])||0,(arguments.length<=4?void 0:arguments[4])||0):(l=(arguments.length<=0?void 0:arguments[0])||0,c=(arguments.length<=1?void 0:arguments[1])||0,(arguments.length<=2?void 0:arguments[2])||0);this.x=l,this.y=c,this.z=d}var r,i,s;return r=a,s=[{key:"fromAngle",value:function(n){var l=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1;return new u.default.Vector(l*Math.cos(n),l*Math.sin(n),0)}},{key:"fromAngles",value:function(E,v){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:1,d=Math.cos(v),v=Math.sin(v),S=Math.cos(E),E=Math.sin(E);return new u.default.Vector(c*E*v,-c*S,c*E*d)}},{key:"random2D",value:function(){return this.fromAngle(Math.random()*f.TWO_PI)}},{key:"random3D",value:function(){var n=Math.random()*f.TWO_PI,l=2*Math.random()-1,d=Math.sqrt(1-l*l),c=d*Math.cos(n),d=d*Math.sin(n);return new u.default.Vector(c,d,l)}},{key:"copy",value:function(n){return n.copy(n)}},{key:"add",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return S?S.set(d):(S=d.copy(),l.length===3&&u.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.add")),S.add(v),S}},{key:"rem",value:function(n,l){if(n instanceof u.default.Vector&&l instanceof u.default.Vector)return(n=n.copy()).rem(l),n}},{key:"sub",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return S?S.set(d):(S=d.copy(),l.length===3&&u.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.sub")),S.sub(v),S}},{key:"mult",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return S?S.set(d):(S=d.copy(),l.length===3&&u.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.mult")),S.mult(v),S}},{key:"rotate",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return l.length===2?S=d.copy():(S instanceof u.default.Vector||u.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.rotate"),S.set(d)),S.rotate(v),S}},{key:"div",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return S?S.set(d):(S=d.copy(),l.length===3&&u.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.div")),S.div(v),S}},{key:"dot",value:function(n,l){return n.dot(l)}},{key:"cross",value:function(n,l){return n.cross(l)}},{key:"dist",value:function(n,l){return n.dist(l)}},{key:"lerp",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2],E=l[3];return E?E.set(d):(E=d.copy(),l.length===4&&u.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.lerp")),E.lerp(v,S),E}},{key:"slerp",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2],E=l[3];return E?E.set(d):(E=d.copy(),l.length===4&&u.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.slerp")),E.slerp(v,S),E}},{key:"mag",value:function(n){return n.mag()}},{key:"magSq",value:function(n){return n.magSq()}},{key:"normalize",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1];return l.length<2?v=d.copy():(v instanceof u.default.Vector||u.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.normalize"),v.set(d)),v.normalize()}},{key:"limit",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return l.length<3?S=d.copy():(S instanceof u.default.Vector||u.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.limit"),S.set(d)),S.limit(v)}},{key:"setMag",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return l.length<3?S=d.copy():(S instanceof u.default.Vector||u.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.setMag"),S.set(d)),S.setMag(v)}},{key:"heading",value:function(n){return n.heading()}},{key:"angleBetween",value:function(n,l){return n.angleBetween(l)}},{key:"reflect",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];return l.length<3?S=d.copy():(S instanceof u.default.Vector||u.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.reflect"),S.set(d)),S.reflect(v)}},{key:"array",value:function(n){return n.array()}},{key:"equals",value:function(n,l){var c;return n instanceof u.default.Vector?c=n:Array.isArray(n)?c=new u.default.Vector().set(n):u.default._friendlyError("The v1 parameter should be of type Array or p5.Vector","p5.Vector.equals"),c.equals(l)}}],(i=[{key:"toString",value:function(){return"p5.Vector Object : [".concat(this.x,", ").concat(this.y,", ").concat(this.z,"]")}},{key:"set",value:function(n,l,c){return n instanceof u.default.Vector?(this.x=n.x||0,this.y=n.y||0,this.z=n.z||0):Array.isArray(n)?(this.x=n[0]||0,this.y=n[1]||0,this.z=n[2]||0):(this.x=n||0,this.y=l||0,this.z=c||0),this}},{key:"copy",value:function(){return this.isPInst?new u.default.Vector(this._fromRadians,this._toRadians,this.x,this.y,this.z):new u.default.Vector(this.x,this.y,this.z)}},{key:"add",value:function(n,l,c){return n instanceof u.default.Vector?(this.x+=n.x||0,this.y+=n.y||0,this.z+=n.z||0):Array.isArray(n)?(this.x+=n[0]||0,this.y+=n[1]||0,this.z+=n[2]||0):(this.x+=n||0,this.y+=l||0,this.z+=c||0),this}},{key:"calculateRemainder2D",value:function(n,l){return n!==0&&(this.x=this.x%n),l!==0&&(this.y=this.y%l),this}},{key:"calculateRemainder3D",value:function(n,l,c){return n!==0&&(this.x=this.x%n),l!==0&&(this.y=this.y%l),c!==0&&(this.z=this.z%c),this}},{key:"rem",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d,v,S,E=l[0],_=l[1],x=l[2];if(E instanceof u.default.Vector){if([E.x,E.y,E.z].every(Number.isFinite))return d=parseFloat(E.x),v=parseFloat(E.y),S=parseFloat(E.z),this.calculateRemainder3D(d,v,S)}else if(Array.isArray(E)){if(E.every(Number.isFinite))return E.length===2?this.calculateRemainder2D(E[0],E[1]):E.length===3?this.calculateRemainder3D(E[0],E[1],E[2]):void 0}else if(l.length===1){if(Number.isFinite(E)&&E!==0)return this.x=this.x%E,this.y=this.y%E,this.z=this.z%E,this}else if(l.length===2){if(l.every(Number.isFinite))return this.calculateRemainder2D(E,_)}else if(l.length===3&&l.every(Number.isFinite))return this.calculateRemainder3D(E,_,x)}},{key:"sub",value:function(n,l,c){return n instanceof u.default.Vector?(this.x-=n.x||0,this.y-=n.y||0,this.z-=n.z||0):Array.isArray(n)?(this.x-=n[0]||0,this.y-=n[1]||0,this.z-=n[2]||0):(this.x-=n||0,this.y-=l||0,this.z-=c||0),this}},{key:"mult",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d,v=l[0],S=l[1],E=l[2];return v instanceof u.default.Vector?Number.isFinite(v.x)&&Number.isFinite(v.y)&&Number.isFinite(v.z)&&typeof v.x=="number"&&typeof v.y=="number"&&typeof v.z=="number"?(this.x*=v.x,this.y*=v.y,this.z*=v.z):console.warn("p5.Vector.prototype.mult:","x contains components that are either undefined or not finite numbers"):Array.isArray(v)?v.every(function(_){return Number.isFinite(_)})&&v.every(function(_){return typeof _=="number"})?v.length===1?(this.x*=v[0],this.y*=v[0],this.z*=v[0]):v.length===2?(this.x*=v[0],this.y*=v[1]):v.length===3&&(this.x*=v[0],this.y*=v[1],this.z*=v[2]):console.warn("p5.Vector.prototype.mult:","x contains elements that are either undefined or not finite numbers"):(d=l).every(function(_){return Number.isFinite(_)})&&d.every(function(_){return typeof _=="number"})?(l.length===1&&(this.x*=v,this.y*=v,this.z*=v),l.length===2&&(this.x*=v,this.y*=S),l.length===3&&(this.x*=v,this.y*=S,this.z*=E)):console.warn("p5.Vector.prototype.mult:","x, y, or z arguments are either undefined or not a finite number"),this}},{key:"div",value:function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];var d=l[0],v=l[1],S=l[2];if(d instanceof u.default.Vector)if(Number.isFinite(d.x)&&Number.isFinite(d.y)&&Number.isFinite(d.z)&&typeof d.x=="number"&&typeof d.y=="number"&&typeof d.z=="number"){var E=d.z===0&&this.z===0;if(d.x===0||d.y===0||!E&&d.z===0)return console.warn("p5.Vector.prototype.div:","divide by 0"),this;this.x/=d.x,this.y/=d.y,E||(this.z/=d.z)}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers");else if(Array.isArray(d))if(d.every(Number.isFinite)&&d.every(function(_){return typeof _=="number"})){if(d.some(function(_){return _===0}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;d.length===1?(this.x/=d[0],this.y/=d[0],this.z/=d[0]):d.length===2?(this.x/=d[0],this.y/=d[1]):d.length===3&&(this.x/=d[0],this.y/=d[1],this.z/=d[2])}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers");else if(l.every(Number.isFinite)&&l.every(function(_){return typeof _=="number"})){if(l.some(function(_){return _===0}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;l.length===1&&(this.x/=d,this.y/=d,this.z/=d),l.length===2&&(this.x/=d,this.y/=v),l.length===3&&(this.x/=d,this.y/=v,this.z/=S)}else console.warn("p5.Vector.prototype.div:","x, y, or z arguments are either undefined or not a finite number");return this}},{key:"mag",value:function(){return Math.sqrt(this.magSq())}},{key:"magSq",value:function(){var n=this.x,l=this.y,c=this.z;return n*n+l*l+c*c}},{key:"dot",value:function(n,l,c){return n instanceof u.default.Vector?this.dot(n.x,n.y,n.z):this.x*(n||0)+this.y*(l||0)+this.z*(c||0)}},{key:"cross",value:function(d){var l=this.y*d.z-this.z*d.y,c=this.z*d.x-this.x*d.z,d=this.x*d.y-this.y*d.x;return this.isPInst?new u.default.Vector(this._fromRadians,this._toRadians,l,c,d):new u.default.Vector(l,c,d)}},{key:"dist",value:function(n){return n.copy().sub(this).mag()}},{key:"normalize",value:function(){var n=this.mag();return n!==0&&this.mult(1/n),this}},{key:"limit",value:function(n){var l=this.magSq();return n*n<l&&this.div(Math.sqrt(l)).mult(n),this}},{key:"setMag",value:function(n){return this.normalize().mult(n)}},{key:"heading",value:function(){var n=Math.atan2(this.y,this.x);return this.isPInst?this._fromRadians(n):n}},{key:"setHeading",value:function(n){this.isPInst&&(n=this._toRadians(n));var l=this.mag();return this.x=l*Math.cos(n),this.y=l*Math.sin(n),this}},{key:"rotate",value:function(l){var l=this.heading()+l,c=(this.isPInst&&(l=this._toRadians(l)),this.mag());return this.x=Math.cos(l)*c,this.y=Math.sin(l)*c,this}},{key:"angleBetween",value:function(n){var l;return this.magSq()*n.magSq()==0?NaN:(l=this.cross(n),n=Math.atan2(l.mag(),this.dot(n))*Math.sign(l.z||1),this.isPInst?this._fromRadians(n):n)}},{key:"lerp",value:function(n,l,c,d){return n instanceof u.default.Vector?this.lerp(n.x,n.y,n.z,l):(this.x+=(n-this.x)*d||0,this.y+=(l-this.y)*d||0,this.z+=(c-this.z)*d||0,this)}},{key:"slerp",value:function(n,l){if(l!==0){if(l===1)return this.set(n);var c=this.mag(),d=n.mag();if(c*d==0)this.mult(1-l).add(n.x*l,n.y*l,n.z*l);else{var v=this.cross(n),S=v.mag(),E=Math.atan2(S,this.dot(n));if(0<S)v.x/=S,v.y/=S,v.z/=S;else{if(E<.5*Math.PI)return this.mult(1-l).add(n.x*l,n.y*l,n.z*l),this;this.z===0&&n.z===0?v.set(0,0,1):this.x!==0?v.set(this.y,-this.x,0).normalize():v.set(1,0,0)}S=v.cross(this),n=1-l+l*d/c,v=n*Math.cos(l*E),d=n*Math.sin(l*E),this.x=this.x*v+S.x*d,this.y=this.y*v+S.y*d,this.z=this.z*v+S.z*d}}return this}},{key:"reflect",value:function(n){return n=u.default.Vector.normalize(n),this.sub(n.mult(2*this.dot(n)))}},{key:"array",value:function(){return[this.x||0,this.y||0,this.z||0]}},{key:"equals",value:function(S,l,c){var d,v,S=S instanceof u.default.Vector?(d=S.x||0,v=S.y||0,S.z||0):Array.isArray(S)?(d=S[0]||0,v=S[1]||0,S[2]||0):(d=S||0,v=l||0,c||0);return this.x===d&&this.y===v&&this.z===S}},{key:"clampToZero",value:function(){return this.x=this._clampToZero(this.x),this.y=this._clampToZero(this.y),this.z=this._clampToZero(this.z),this}},{key:"_clampToZero",value:function(n){return Math.abs(+(n||0))<=Number.EPSILON?0:n}}])&&y(r.prototype,i),s&&y(r,s),a})();var o=u.default.Vector;C.default=o},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.every":155,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.some":170,"core-js/modules/es.math.sign":178,"core-js/modules/es.number.constructor":179,"core-js/modules/es.number.epsilon":180,"core-js/modules/es.number.is-finite":181,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],317:[function(g,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(g=g("../core/main"))&&g.__esModule?g:{default:g},m="_lcg_random_state",u=4294967296,f=0,g=(p.default.prototype._lcg=function(y){return this[y]=(1664525*this[y]+1013904223)%u,this[y]/u},p.default.prototype._lcgSetSeed=function(y,o){this[y]=(o??Math.random()*u)>>>0},p.default.prototype.randomSeed=function(y){this._lcgSetSeed(m,y),this._gaussian_previous=!1},p.default.prototype.random=function(y,o){var a,r;return p.default._validateParameters("random",arguments),a=this[m]!=null?this._lcg(m):Math.random(),y===void 0?a:o===void 0?Array.isArray(y)?y[Math.floor(a*y.length)]:a*y:(o<y&&(r=y,y=o,o=r),a*(o-y)+y)},p.default.prototype.randomGaussian=function(y){var o,a,r,i,s=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1;if(this._gaussian_previous)o=f,this._gaussian_previous=!1;else{for(;1<=(i=(a=this.random(2)-1)*a+(r=this.random(2)-1)*r););o=a*(i=Math.sqrt(-2*Math.log(i)/i)),f=r*i,this._gaussian_previous=!0}return o*s+(y||0)},p.default);C.default=g},{"../core/main":283}],318:[function(t,W,C){"use strict";function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function m(o){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(a){return p(a)}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":p(a)})(o)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(y=t("../core/main"))&&y.__esModule?y:{default:y},f=(function(o){if(o&&o.__esModule)return o;if(o===null||m(o)!=="object"&&typeof o!="function")return{default:o};var a=g();if(a&&a.has(o))return a.get(o);var r,i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in o){var n;Object.prototype.hasOwnProperty.call(o,r)&&((n=s?Object.getOwnPropertyDescriptor(o,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=o[r])}return i.default=o,a&&a.set(o,i),i})(t("../core/constants"));function g(){var o;return typeof WeakMap!="function"?null:(o=new WeakMap,g=function(){return o},o)}u.default.prototype._angleMode=f.RADIANS,u.default.prototype.acos=function(o){return this._fromRadians(Math.acos(o))},u.default.prototype.asin=function(o){return this._fromRadians(Math.asin(o))},u.default.prototype.atan=function(o){return this._fromRadians(Math.atan(o))},u.default.prototype.atan2=function(o,a){return this._fromRadians(Math.atan2(o,a))},u.default.prototype.cos=function(o){return Math.cos(this._toRadians(o))},u.default.prototype.sin=function(o){return Math.sin(this._toRadians(o))},u.default.prototype.tan=function(o){return Math.tan(this._toRadians(o))},u.default.prototype.degrees=function(o){return o*f.RAD_TO_DEG},u.default.prototype.radians=function(o){return o*f.DEG_TO_RAD},u.default.prototype.angleMode=function(o){if(u.default._validateParameters("angleMode",arguments),o===void 0)return this._angleMode;o!==f.DEGREES&&o!==f.RADIANS||o!==this._angleMode&&(o===f.RADIANS?(this._setProperty("pRotationX",this.pRotationX*f.DEG_TO_RAD),this._setProperty("pRotationY",this.pRotationY*f.DEG_TO_RAD),this._setProperty("pRotationZ",this.pRotationZ*f.DEG_TO_RAD)):(this._setProperty("pRotationX",this.pRotationX*f.RAD_TO_DEG),this._setProperty("pRotationY",this.pRotationY*f.RAD_TO_DEG),this._setProperty("pRotationZ",this.pRotationZ*f.RAD_TO_DEG)),this._angleMode=o)},u.default.prototype._toRadians=function(o){return this._angleMode===f.DEGREES?o*f.DEG_TO_RAD:o},u.default.prototype._toDegrees=function(o){return this._angleMode===f.RADIANS?o*f.RAD_TO_DEG:o},u.default.prototype._fromRadians=function(o){return this._angleMode===f.DEGREES?o*f.RAD_TO_DEG:o},u.default.prototype._fromDegrees=function(o){return this._angleMode===f.RADIANS?o*f.DEG_TO_RAD:o};var y=u.default;C.default=y},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],319:[function(t,W,C){"use strict";t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};p.default.prototype.textAlign=function(m,u){var f;return p.default._validateParameters("textAlign",arguments),(f=this._renderer).textAlign.apply(f,arguments)},p.default.prototype.textLeading=function(m){var u;return p.default._validateParameters("textLeading",arguments),(u=this._renderer).textLeading.apply(u,arguments)},p.default.prototype.textSize=function(m){var u;return p.default._validateParameters("textSize",arguments),(u=this._renderer).textSize.apply(u,arguments)},p.default.prototype.textStyle=function(m){var u;return p.default._validateParameters("textStyle",arguments),(u=this._renderer).textStyle.apply(u,arguments)},p.default.prototype.textWidth=function(){for(var m=arguments.length,u=new Array(m),f=0;f<m;f++)u[f]=arguments[f];if(u[0]+="",p.default._validateParameters("textWidth",u),u[0].length===0)return 0;for(var g=u[0].replace(/\t/g,"  ").split(/\r?\n|\r|\n/g),y=[],o=0;o<g.length;o++)y.push(this._renderer.textWidth(g[o]));return Math.max.apply(Math,y)},p.default.prototype.textAscent=function(){for(var m=arguments.length,u=new Array(m),f=0;f<m;f++)u[f]=arguments[f];return p.default._validateParameters("textAscent",u),this._renderer.textAscent()},p.default.prototype.textDescent=function(){for(var m=arguments.length,u=new Array(m),f=0;f<m;f++)u[f]=arguments[f];return p.default._validateParameters("textDescent",u),this._renderer.textDescent()},p.default.prototype._updateTextMetrics=function(){return this._renderer._updateTextMetrics()},p.default.prototype.textWrap=function(m){return p.default._validateParameters("textWrap",[m]),this._renderer.textWrap(m)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206}],320:[function(t,W,C){"use strict";function p(r){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function m(r){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(i){return p(i)}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":p(i)})(r)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.split"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(a=t("../core/main"))&&a.__esModule?a:{default:a},f=o(t("../core/constants")),g=o(t("opentype.js"));function y(){var r;return typeof WeakMap!="function"?null:(r=new WeakMap,y=function(){return r},r)}function o(r){if(r&&r.__esModule)return r;if(r===null||m(r)!=="object"&&typeof r!="function")return{default:r};var i=y();if(i&&i.has(r))return i.get(r);var s,n,l={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(s in r)Object.prototype.hasOwnProperty.call(r,s)&&((n=c?Object.getOwnPropertyDescriptor(r,s):null)&&(n.get||n.set)?Object.defineProperty(l,s,n):l[s]=r[s]);return l.default=r,i&&i.set(r,l),l}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),u.default.prototype.loadFont=function(r,i,s){u.default._validateParameters("loadFont",arguments);var n=new u.default.Font(this),l=this;return g.load(r,function(v,S){if(v)return u.default._friendlyFileLoadError(4,r),s!==void 0?s(v):void console.error(v,r);n.font=S,i!==void 0&&i(n),l._decrementPreload();var v=r.split("\\").pop().split("/").pop(),S=v.lastIndexOf("."),E=S<1?null:v.slice(S+1);["ttf","otf","woff","woff2"].includes(E)&&(E=v.slice(0,S!==-1?S:0),(v=document.createElement("style")).appendChild(document.createTextNode(`
@font-face {
font-family: `.concat(E,`;
src: url(`).concat(r,`);
}
`))),document.head.appendChild(v))}),n},u.default.prototype.text=function(r,i,s,n,l){var c;return u.default._validateParameters("text",arguments),this._renderer._doFill||this._renderer._doStroke?(c=this._renderer).text.apply(c,arguments):this},u.default.prototype.textFont=function(r,i){if(u.default._validateParameters("textFont",arguments),arguments.length){if(r)return this._renderer._setProperty("_textFont",r),i&&(this._renderer._setProperty("_textSize",i),this._renderer._leadingSet||this._renderer._setProperty("_textLeading",i*f._DEFAULT_LEADMULT)),this._renderer._applyTextProperties();throw new Error("null font passed to textFont")}return this._renderer._textFont};var a=u.default;C.default=a},{"../core/constants":272,"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246,"opentype.js":257}],321:[function(t,W,C){"use strict";function p(_){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(_)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var m=(m=t("../core/main"))&&m.__esModule?m:{default:m},u=(function(_){if(_&&_.__esModule)return _;if(_===null||g(_)!=="object"&&typeof _!="function")return{default:_};var x=f();if(x&&x.has(_))return x.get(_);var O,T={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(O in _){var M;Object.prototype.hasOwnProperty.call(_,O)&&((M=P?Object.getOwnPropertyDescriptor(_,O):null)&&(M.get||M.set)?Object.defineProperty(T,O,M):T[O]=_[O])}return T.default=_,x&&x.set(_,T),T})(t("../core/constants"));function f(){var _;return typeof WeakMap!="function"?null:(_=new WeakMap,f=function(){return _},_)}function g(_){return(g=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(x){return p(x)}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":p(x)})(_)}function y(_,x){for(var O=0;O<x.length;O++){var T=x[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}function o(_,x){var O=_.length;return _[x<0?x%O+O:x%O]}function a(_,x,O,T){var P,M,F;return T?(a.tmpPoint1===void 0&&(a.tmpPoint1=[],a.tmpPoint2=[]),M=a.tmpPoint1,F=a.tmpPoint2,M.x=x.x-_.x,M.y=x.y-_.y,F.x=O.x-x.x,F.y=O.y-x.y,P=M.x*F.x+M.y*F.y,M=Math.sqrt(M.x*M.x+M.y*M.y),F=Math.sqrt(F.x*F.x+F.y*F.y),Math.acos(P/(M*F))<T):(x[0]-_[0])*(O[1]-_[1])-(O[0]-_[0])*(x[1]-_[1])==0}function r(j,N,R,X,K,M,F,D,A){var z=1-A,U=Math.pow(z,3),H=Math.pow(z,2),L=A*A,Y=L*A,G=U*j+3*H*A*R+3*z*A*A*K+Y*F,U=U*N+3*H*A*X+3*z*A*A*M+Y*D,H=j+2*A*(R-j)+L*(K-2*R+j),Y=N+2*A*(X-N)+L*(M-2*X+N),oe=R+2*A*(K-R)+L*(F-2*K+R),L=X+2*A*(M-X)+L*(D-2*M+X),j=z*j+A*R,R=z*N+A*X,N=z*K+A*F,X=z*M+A*D,K=90-180*Math.atan2(H-oe,Y-L)/Math.PI;return(oe<H||Y<L)&&(K+=180),{x:G,y:U,m:{x:H,y:Y},n:{x:oe,y:L},start:{x:j,y:R},end:{x:N,y:X},alpha:K}}function i(_,x,O,T,P,M,F,D,A){return A==null?S(_,x,O,T,P,M,F,D):r(_,x,O,T,P,M,F,D,(function(z,G,U,H,Y,oe,L,j,R){if(!(R<0||S(z,G,U,H,Y,oe,L,j)<R)){var N,X=.5,K=1-X;for(N=S(z,G,U,H,Y,oe,L,j,K);.01<Math.abs(N-R);)N=S(z,G,U,H,Y,oe,L,j,K+=(N<R?1:-1)*(X/=2));return K}})(_,x,O,T,P,M,F,D,A))}function s(_,x,O){for(var T,P,M,F,D,A=0,z=0,G=(_=(function(U,H){function Y(he,me,_e){var Ae,Se;if(!he)return["C",me.x,me.y,me.x,me.y,me.x,me.y];switch(he[0]in{T:1,Q:1}||(me.qx=me.qy=null),he[0]){case"M":me.X=he[1],me.Y=he[2];break;case"A":he=["C"].concat(l.apply(0,[me.x,me.y].concat(he.slice(1))));break;case"S":Se=_e==="C"||_e==="S"?(Ae=2*me.x-me.bx,2*me.y-me.by):(Ae=me.x,me.y),he=["C",Ae,Se].concat(he.slice(1));break;case"T":_e==="Q"||_e==="T"?(me.qx=2*me.x-me.qx,me.qy=2*me.y-me.qy):(me.qx=me.x,me.qy=me.y),he=["C"].concat(v(me.x,me.y,me.qx,me.qy,he[1],he[2]));break;case"Q":me.qx=he[1],me.qy=he[2],he=["C"].concat(v(me.x,me.y,he[1],he[2],he[3],he[4]));break;case"L":he=["C"].concat(d(me.x,me.y,he[1],he[2]));break;case"H":he=["C"].concat(d(me.x,me.y,he[1],me.y));break;case"V":he=["C"].concat(d(me.x,me.y,me.x,he[1]));break;case"Z":he=["C"].concat(d(me.x,me.y,me.X,me.Y))}return he}function oe(he,me){if(7<he[me].length){he[me].shift();for(var _e=he[me];_e.length;)re[me]="A",N&&(ie[me]="A"),he.splice(me++,0,["C"].concat(_e.splice(0,6)));he.splice(me,1),j=Math.max(R.length,N&&N.length||0)}}function L(he,me,_e,Ae,Se){he&&me&&he[Se][0]==="M"&&me[Se][0]!=="M"&&(me.splice(Se,0,["M",Ae.x,Ae.y]),_e.bx=0,_e.by=0,_e.x=he[Se][1],_e.y=he[Se][2],j=Math.max(R.length,N&&N.length||0))}var j,R=n(U),N=H&&n(H),X={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},K={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},re=[],ie=[],ee="",ae="";j=Math.max(R.length,N&&N.length||0);for(var ue=0;ue<j;ue++){(ee=R[ue]?R[ue][0]:ee)!=="C"&&(re[ue]=ee,ue&&(ae=re[ue-1])),R[ue]=Y(R[ue],X,ae),re[ue]!=="A"&&ee==="C"&&(re[ue]="C"),oe(R,ue),N&&((ee=N[ue]?N[ue][0]:ee)!=="C"&&(ie[ue]=ee,ue&&(ae=ie[ue-1])),N[ue]=Y(N[ue],K,ae),ie[ue]!=="A"&&ee==="C"&&(ie[ue]="C"),oe(N,ue)),L(R,N,X,K,ue),L(N,R,K,X,ue);var Q=R[ue],le=N&&N[ue],fe=Q.length,ve=N&&le.length;X.x=Q[fe-2],X.y=Q[fe-1],X.bx=parseFloat(Q[fe-4])||X.x,X.by=parseFloat(Q[fe-3])||X.y,K.bx=N&&(parseFloat(le[ve-4])||K.x),K.by=N&&(parseFloat(le[ve-3])||K.y),K.x=N&&le[ve-2],K.y=N&&le[ve-1]}return N?[R,N]:R})(_)).length;z<G;z++){if((M=_[z])[0]==="M")T=+M[1],P=+M[2];else{if(x<A+(F=i(T,P,M[1],M[2],M[3],M[4],M[5],M[6]))&&!O)return{x:(D=i(T,P,M[1],M[2],M[3],M[4],M[5],M[6],x-A)).x,y:D.y,alpha:D.alpha};A+=F,T=+M[5],P=+M[6]}M.shift()}return D=(D=O?A:r(T,P,M[0],M[1],M[2],M[3],M[4],M[5],1)).alpha?{x:D.x,y:D.y,alpha:D.alpha}:D}function n(_){var x=[],O=0,T=0,P=0,M=0,F=0;if(_){_[0][0]==="M"&&(P=O=+_[0][1],M=T=+_[0][2],F++,x[0]=["M",O,T]);for(var D,A,z=_.length===3&&_[0][0]==="M"&&_[1][0].toUpperCase()==="R"&&_[2][0].toUpperCase()==="Z",G=F,U=_.length;G<U;G++){if(x.push(D=[]),(A=_[G])[0]!==A[0].toUpperCase())switch(D[0]=A[0].toUpperCase(),D[0]){case"A":D[1]=A[1],D[2]=A[2],D[3]=A[3],D[4]=A[4],D[5]=A[5],D[6]=+(A[6]+O),D[7]=+(A[7]+T);break;case"V":D[1]=+A[1]+T;break;case"H":D[1]=+A[1]+O;break;case"R":for(var H,Y=2,oe=(H=[O,T].concat(A.slice(1))).length;Y<oe;Y++)H[Y]=+H[Y]+O,H[++Y]=+H[Y]+T;x.pop(),x=x.concat(c(H,z));break;case"M":P=+A[1]+O,M=+A[2]+T;break;default:for(var L=1,j=A.length;L<j;L++)D[L]=+A[L]+(L%2?O:T)}else if(A[0]==="R")H=[O,T].concat(A.slice(1)),x.pop(),x=x.concat(c(H,z)),D=["R"].concat(A.slice(-2));else for(var R=0,N=A.length;R<N;R++)D[R]=A[R];switch(D[0]){case"Z":O=P,T=M;break;case"H":O=D[1];break;case"V":T=D[1];break;case"M":P=D[D.length-2],M=D[D.length-1];break;default:O=D[D.length-2],T=D[D.length-1]}}}return x}function l(_,x,O,T,N,re,X,D,A,z){function G(ve,he,me){return{x:ve*Math.cos(me)-he*Math.sin(me),y:ve*Math.sin(me)+he*Math.cos(me)}}var U,j=Math.PI,R=120*j/180,H=j/180*(+N||0),Y=[],oe=(z?(ue=z[0],U=z[1],ee=z[2],ae=z[3]):(_=(K=G(_,x,-H)).x,x=K.y,1<(oe=(L=(_-(D=(K=G(D,A,-H)).x))/2)*L/(O*O)+(K=(x-(A=K.y))/2)*K/(T*T))&&(O*=oe=Math.sqrt(oe),T*=oe),oe=O*O,ie=T*T,ee=(re=(re===X?-1:1)*Math.sqrt(Math.abs((oe*ie-oe*K*K-ie*L*L)/(oe*K*K+ie*L*L))))*O*K/T+(_+D)/2,ae=re*-T*L/O+(x+A)/2,ue=Math.asin(((x-ae)/T).toFixed(9)),U=Math.asin(((A-ae)/T).toFixed(9)),(ue=_<ee?j-ue:ue)<0&&(ue=2*j+ue),(U=D<ee?j-U:U)<0&&(U=2*j+U),X&&U<ue&&(ue-=2*j),!X&&ue<U&&(U-=2*j)),U-ue),L=(Math.abs(oe)>R&&(ie=U,K=D,re=A,U=ue+R*(X&&ue<U?1:-1),Y=l(D=ee+O*Math.cos(U),A=ae+T*Math.sin(U),O,T,N,0,X,K,re,[U,ie,ee,ae])),oe=U-ue,Math.cos(ue)),j=Math.sin(ue),R=Math.cos(U),N=Math.sin(U),X=Math.tan(oe/4),K=4/3*O*X,re=4/3*T*X,ie=[_,x],ee=[_+K*j,x-re*L],ae=[D+K*N,A-re*R],ue=[D,A];if(ee[0]=2*ie[0]-ee[0],ee[1]=2*ie[1]-ee[1],z)return[ee,ae,ue].concat(Y);for(var Q=[],le=0,fe=(Y=[ee,ae,ue].concat(Y).join().split(",")).length;le<fe;le++)Q[le]=le%2?G(Y[le-1],Y[le],H).y:G(Y[le],Y[le+1],H).x;return Q}function c(_,x){for(var O=[],T=0,P=_.length;T<P-2*!x;T+=2){var M=[{x:+_[T-2],y:+_[T-1]},{x:+_[T],y:+_[T+1]},{x:+_[T+2],y:+_[T+3]},{x:+_[T+4],y:+_[T+5]}];x?T?P-4===T?M[3]={x:+_[0],y:+_[1]}:P-2===T&&(M[2]={x:+_[0],y:+_[1]},M[3]={x:+_[2],y:+_[3]}):M[0]={x:+_[P-2],y:+_[P-1]}:P-4===T?M[3]=M[2]:T||(M[0]={x:+_[T],y:+_[T+1]}),O.push(["C",(-M[0].x+6*M[1].x+M[2].x)/6,(-M[0].y+6*M[1].y+M[2].y)/6,(M[1].x+6*M[2].x-M[3].x)/6,(M[1].y+6*M[2].y-M[3].y)/6,M[2].x,M[2].y])}return O}function d(_,x,O,T){return[_,x,O,T,O,T]}function v(_,x,O,T,P,M){return[1/3*_+2/3*O,1/3*x+2/3*T,1/3*P+2/3*O,1/3*M+2/3*T,P,M]}function S(_,x,O,T,P,M,F,D,A){for(var z=(A=1<(A=A??1)?1:A<0?0:A)/2,G=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],U=0,H=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],Y=0;Y<12;Y++){var L=z*G[Y]+z,oe=E(L,_,O,P,F),L=E(L,x,T,M,D);U+=H[Y]*Math.sqrt(oe*oe+L*L)}return z*U}function E(_,x,O,T,P){return _*(_*(-3*x+9*O-9*T+3*P)+6*x-12*O+6*T)-3*x+3*O}m.default.Font=(function(){function _(P){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.parent=P,this.cache={},this.font=void 0}var x,O,T;return x=_,(O=[{key:"textBounds",value:function(P){var M=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,F=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0,G=3<arguments.length?arguments[3]:void 0,D=4<arguments.length?arguments[4]:void 0,A=D&&D.renderer&&D.renderer._pInst||this.parent,z=A._renderer.drawingContext,G=(z.textAlign||u.LEFT,z.textBaseline||u.BASELINE,G||A._renderer._textSize);if(!re){for(var U=[],H=[],Y=[],oe=(Y[0]=[],[]),L=this._scale(G),j=A._renderer.textLeading(),R=0,N=(this.font.forEachGlyph(P,M,F,G,D,function(ae,ue,Q,le){var fe=ae.getMetrics();ae.index===0?Y[R+=1]=[]:(Y[R].push(ue+fe.xMin*L),Y[R].push(ue+fe.xMax*L),oe.push(Q+R*j+-fe.yMin*L),oe.push(Q+R*j+-fe.yMax*L))}),0<Y[R].length&&(U[R]=Math.min.apply(null,Y[R]),H[R]=Math.max.apply(null,Y[R])),0),X=0;X<=R;X++){U[X]=Math.min.apply(null,Y[X]),H[X]=Math.max.apply(null,Y[X]);var K=H[X]-U[X];N<K&&(N=K)}var z=Math.min.apply(null,U),re={x:z,y:F=Math.min.apply(null,oe),h:Math.max.apply(null,oe)-F,w:N,advance:z-M},G=this._handleAlignment(A._renderer,P,re.x,re.y,re.w+re.advance);re.x=G.x,re.y=G.y}return re}},{key:"textToPoints",value:function(P,M,F,D,A){var z,G=M,U=[],H=this.parent,Y=P.split(/\r?\n|\r|\n/g);D=D||this.parent._renderer._textSize;for(var oe,L,j,R=0;R<Y.length;R++){var N=0;M=G;for(var X=(X=Y[R]).replace(/\t/g,"  "),K=this._getGlyphs(X),re=0;re<K.length;re++){if(L=X,!((j=K)[oe=re].name&&j[oe].name==="space"||L.length===j.length&&L[oe]===" "))for(var ie=(function(Q){for(var le,fe=[],ve=0;ve<Q.length;ve++)Q[ve].type==="M"&&(le&&fe.push(le),le=[]),le.push((function(he){var me=[he.type];return he.type==="M"||he.type==="L"?me.push(he.x,he.y):he.type==="C"?me.push(he.x1,he.y1,he.x2,he.y2,he.x,he.y):he.type==="Q"&&me.push(he.x1,he.y1,he.x,he.y),me})(Q[ve]));return fe.push(le),fe})(K[re].getPath(M,F,D).commands),ee=0;ee<ie.length;ee++)for(var ae=(function(Q,le){for(var le=(function(Ae,Se){if(g(Ae)!=="object")Ae=Se;else for(var Ge in Se)Ae[Ge]===void 0&&(Ae[Ge]=Se[Ge]);return Ae})(le,{sampleFactor:.1,simplifyThreshold:0}),fe=s(Q,0,1),ve=fe/(fe*le.sampleFactor),he=[],me=0;me<fe;me+=ve)he.push(s(Q,me));return le.simplifyThreshold&&(function(_e){for(var Ae=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,Se=0,Ge=_e.length-1;3<_e.length&&0<=Ge;--Ge)a(o(_e,Ge-1),o(_e,Ge),o(_e,Ge+1),Ae)&&(_e.splice(Ge%_e.length,1),Se++)})(he,le.simplifyThreshold),he})(ie[ee],A),ue=0;ue<ae.length;ue++)ae[ue].x+=N,z=this._handleAlignment(H._renderer,X,ae[ue].x,ae[ue].y),ae[ue].x=z.x,ae[ue].y=z.y,U.push(ae[ue]);N+=K[re].advanceWidth*this._scale(D)}F+=this.parent._renderer._textLeading}return U}},{key:"_getGlyphs",value:function(P){return this.font.stringToGlyphs(P)}},{key:"_getPath",value:function(P,z,F,D){var A=(D&&D.renderer&&D.renderer._pInst||this.parent)._renderer,z=this._handleAlignment(A,P,z,F);return this.font.getPath(P,z.x,z.y,A._textSize,D)}},{key:"_getPathData",value:function(P,M,F,D){var A=3;return typeof P=="string"&&2<arguments.length?P=this._getPath(P,M,F,D):g(M)==="object"&&(D=M),D&&typeof D.decimals=="number"&&(A=D.decimals),P.toPathData(A)}},{key:"_getSVG",value:function(P,M,F,D){var A=3;return typeof P=="string"&&2<arguments.length?P=this._getPath(P,M,F,D):g(M)==="object"&&(D=M),D&&(typeof D.decimals=="number"&&(A=D.decimals),typeof D.strokeWidth=="number"&&(P.strokeWidth=D.strokeWidth),D.fill!==void 0&&(P.fill=D.fill),D.stroke!==void 0&&(P.stroke=D.stroke)),P.toSVG(A)}},{key:"_renderPath",value:function(G,H,Y,D){var A=D&&D.renderer||this.parent._renderer,z=A.drawingContext,G=(g(G)==="object"&&G.commands?G:this._getPath(G,H,Y,D)).commands,U=(A._clipping||z.beginPath(),!0),H=!1,Y=void 0;try{for(var oe,L=G[Symbol.iterator]();!(U=(oe=L.next()).done);U=!0){var j=oe.value;j.type==="M"?z.moveTo(j.x,j.y):j.type==="L"?z.lineTo(j.x,j.y):j.type==="C"?z.bezierCurveTo(j.x1,j.y1,j.x2,j.y2,j.x,j.y):j.type==="Q"?z.quadraticCurveTo(j.x1,j.y1,j.x,j.y):j.type==="Z"&&z.closePath()}}catch(R){H=!0,Y=R}finally{try{U||L.return==null||L.return()}finally{if(H)throw Y}}return A._doStroke&&A._strokeSet&&!A._clipping&&z.stroke(),A._doFill&&!A._clipping&&(A._fillSet||A._setFill(u._DEFAULT_TEXT_FILL),z.fill()),this}},{key:"_textWidth",value:function(P,M){return this.font.getAdvanceWidth(P,M)}},{key:"_textAscent",value:function(P){return this.font.ascender*this._scale(P)}},{key:"_textDescent",value:function(P){return-this.font.descender*this._scale(P)}},{key:"_scale",value:function(P){return 1/this.font.unitsPerEm*(P||this.parent._renderer._textSize)}},{key:"_handleAlignment",value:function(P,M,F,D,A){var z=P._textSize;switch(A===void 0&&(A=this._textWidth(M,z)),P._textAlign){case u.CENTER:F-=A/2;break;case u.RIGHT:F-=A}switch(P._textBaseline){case u.TOP:D+=this._textAscent(z);break;case u.CENTER:D+=this._textAscent(z)/2;break;case u.BOTTOM:D-=this._textDescent(z)}return{x:F,y:D}}}])&&y(x.prototype,O),T&&y(x,T),_})(),t=m.default,C.default=t},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.function.name":174,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],322:[function(t,W,C){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.object.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.prototype.append=function(p,m){return p.push(m),p},t.default.prototype.arrayCopy=function(p,m,u,f,g){var y,o;p=g!==void 0?(o=Math.min(g,p.length),y=f,p.slice(m,o+m)):(o=u!==void 0?(o=u,Math.min(o,p.length)):p.length,u=m,p.slice(y=0,o)),Array.prototype.splice.apply(u,[y,o].concat(p))},t.default.prototype.concat=function(p,m){return p.concat(m)},t.default.prototype.reverse=function(p){return p.reverse()},t.default.prototype.shorten=function(p){return p.pop(),p},t.default.prototype.shuffle=function(p,m){for(var u,f,g=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(p),y=(p=m||g?p:p.slice()).length;1<y;)u=this.random(0,1)*y|0,f=p[--y],p[y]=p[u],p[u]=f;return p},t.default.prototype.sort=function(p,f){var u=f?p.slice(0,Math.min(f,p.length)):p,f=f?p.slice(Math.min(f,p.length)):[];return(u=typeof u[0]=="string"?u.sort():u.sort(function(g,y){return g-y})).concat(f)},t.default.prototype.splice=function(p,m,u){return Array.prototype.splice.apply(p,[u,0].concat(m)),p},t.default.prototype.subset=function(p,m,u){return u!==void 0?p.slice(m,m+u):p.slice(m,p.length)},t=t.default,C.default=t},{"../core/main":283,"core-js/modules/es.array-buffer.constructor":152,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.to-string":190}],323:[function(t,W,C){"use strict";t("core-js/modules/es.array.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.repeat"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.repeat"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};p.default.prototype.float=function(m){return m instanceof Array?m.map(parseFloat):parseFloat(m)},p.default.prototype.int=function(m){var u=1<arguments.length&&arguments[1]!==void 0?arguments[1]:10;return m===1/0||m==="Infinity"?1/0:m===-1/0||m==="-Infinity"?-1/0:typeof m=="string"?parseInt(m,u):typeof m=="number"?0|m:typeof m=="boolean"?m?1:0:m instanceof Array?m.map(function(f){return p.default.prototype.int(f,u)}):void 0},p.default.prototype.str=function(m){return m instanceof Array?m.map(p.default.prototype.str):String(m)},p.default.prototype.boolean=function(m){return typeof m=="number"?m!==0:typeof m=="string"?m.toLowerCase()==="true":typeof m=="boolean"?m:m instanceof Array?m.map(p.default.prototype.boolean):void 0},p.default.prototype.byte=function(m){return m=p.default.prototype.int(m,10),typeof m=="number"?(m+128)%256-128:m instanceof Array?m.map(p.default.prototype.byte):void 0},p.default.prototype.char=function(m){return typeof m!="number"||isNaN(m)?m instanceof Array?m.map(p.default.prototype.char):typeof m=="string"?p.default.prototype.char(parseInt(m,10)):void 0:String.fromCharCode(m)},p.default.prototype.unchar=function(m){return typeof m=="string"&&m.length===1?m.charCodeAt(0):m instanceof Array?m.map(p.default.prototype.unchar):void 0},p.default.prototype.hex=function(m,u){if(u=u??8,m instanceof Array)return m.map(function(g){return p.default.prototype.hex(g,u)});if(m===1/0||m===-1/0)return(m===1/0?"F":"0").repeat(u);if(typeof m=="number"){m<0&&(m=4294967295+m+1);for(var f=Number(m).toString(16).toUpperCase();f.length<u;)f="0".concat(f);return f=f.length>=u?f.substring(f.length-u,f.length):f}},p.default.prototype.unhex=function(m){return m instanceof Array?m.map(p.default.prototype.unhex):parseInt("0x".concat(m),16)},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.map":168,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.repeat":203}],324:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.pad-start"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.pad-start"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(o=t("../core/main"))&&o.__esModule?o:{default:o};function m(a,r){return(function(i){if(Array.isArray(i))return i})(a)||(function(i,s){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]"){var n=[],l=!0,c=!1,d=void 0;try{for(var v,S=i[Symbol.iterator]();!(l=(v=S.next()).done)&&(n.push(v.value),!s||n.length!==s);l=!0);}catch(E){c=!0,d=E}finally{try{l||S.return==null||S.return()}finally{if(c)throw d}}return n}})(a,r)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")})()}function u(a,r,i){var s,n=a<0,c=m((a=Math.abs(a)).toString().split("."),2),l=c[0],c=c[1];return i===void 0?(l=l.padStart(r,"0"),s=c?l+"."+c:l,n?"-"+s:s):(l=(s=m(a.toFixed(i).toString().split("."),2))[0],c=s[1],l=l.padStart(r,"0"),a=c===void 0?l:l+"."+c,n?"-"+a:a)}function f(n,r){var i=(n=n.toString()).indexOf("."),s=i!==-1?n.substring(i):"",n=(n=i!==-1?n.substring(0,i):n).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");if(r===0)s="";else if(r!==void 0)if(r>s.length)for(var l=r-(s+=i===-1?".":"").length+1,c=0;c<l;c++)s+="0";else s=s.substring(0,r+1);return n+s}function g(a){return 0<parseFloat(a)?"+".concat(a.toString()):a.toString()}function y(a){return 0<=parseFloat(a)?" ".concat(a.toString()):a.toString()}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),p.default.prototype.join=function(a,r){return p.default._validateParameters("join",arguments),a.join(r)},p.default.prototype.match=function(a,r){return p.default._validateParameters("match",arguments),a.match(r)},p.default.prototype.matchAll=function(a,r){p.default._validateParameters("matchAll",arguments);for(var i=new RegExp(r,"g"),s=i.exec(a),n=[];s!==null;)n.push(s),s=i.exec(a);return n},p.default.prototype.nf=function(a,r,i){return p.default._validateParameters("nf",arguments),a instanceof Array?a.map(function(s){return u(s,r,i)}):Object.prototype.toString.call(a)==="[object Arguments]"?a.length===3?this.nf(a[0],a[1],a[2]):a.length===2?this.nf(a[0],a[1]):this.nf(a[0]):u(a,r,i)},p.default.prototype.nfc=function(a,r){return p.default._validateParameters("nfc",arguments),a instanceof Array?a.map(function(i){return f(i,r)}):f(a,r)},p.default.prototype.nfp=function(){for(var a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];p.default._validateParameters("nfp",r);var s=p.default.prototype.nf.apply(this,r);return s instanceof Array?s.map(g):g(s)},p.default.prototype.nfs=function(){for(var a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];p.default._validateParameters("nfs",r);var s=p.default.prototype.nf.apply(this,r);return s instanceof Array?s.map(y):y(s)},p.default.prototype.split=function(a,r){return p.default._validateParameters("split",arguments),a.split(r)},p.default.prototype.splitTokens=function(a,r){var i,s;return p.default._validateParameters("splitTokens",arguments),s=r!==void 0?(s=/\]/g.exec(r=r),(i=/\[/g.exec(r))&&s?(r=r.slice(0,s.index)+r.slice(s.index+1),i=/\[/g.exec(r),r=r.slice(0,i.index)+r.slice(i.index+1),new RegExp("[\\[".concat(r,"\\]]"),"g")):s?(r=r.slice(0,s.index)+r.slice(s.index+1),new RegExp("[".concat(r,"\\]]"),"g")):i?(r=r.slice(0,i.index)+r.slice(i.index+1),new RegExp("[".concat(r,"\\[]"),"g")):new RegExp("[".concat(r,"]"),"g")):/\s/g,a.split(s).filter(function(n){return n})},p.default.prototype.trim=function(a){return p.default._validateParameters("trim",arguments),a instanceof Array?a.map(this.trim):a.trim()};var o=p.default;C.default=o},{"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.pad-start":202,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],325:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.prototype.day=function(){return new Date().getDate()},t.default.prototype.hour=function(){return new Date().getHours()},t.default.prototype.minute=function(){return new Date().getMinutes()},t.default.prototype.millis=function(){return this._millisStart===-1?0:window.performance.now()-this._millisStart},t.default.prototype.month=function(){return new Date().getMonth()+1},t.default.prototype.second=function(){return new Date().getSeconds()},t.default.prototype.year=function(){return new Date().getFullYear()},t=t.default,C.default=t},{"../core/main":283}],326:[function(t,W,C){"use strict";function p(a){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(a)}function m(a){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(r){return p(r)}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":p(r)})(a)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(o=t("../core/main"))&&o.__esModule?o:{default:o},f=(t("./p5.Geometry"),(function(a){if(a&&a.__esModule)return a;if(a===null||m(a)!=="object"&&typeof a!="function")return{default:a};var r=g();if(r&&r.has(a))return r.get(a);var i,s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in a){var l;Object.prototype.hasOwnProperty.call(a,i)&&((l=n?Object.getOwnPropertyDescriptor(a,i):null)&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=a[i])}return s.default=a,r&&r.set(a,s),s})(t("../core/constants")));function g(){var a;return typeof WeakMap!="function"?null:(a=new WeakMap,g=function(){return a},a)}u.default.prototype.beginGeometry=function(){return this._renderer.beginGeometry()},u.default.prototype.endGeometry=function(){return this._renderer.endGeometry()},u.default.prototype.buildGeometry=function(a){return this._renderer.buildGeometry(a)},u.default.prototype.freeGeometry=function(a){this._renderer._freeBuffers(a.gid)},u.default.prototype.plane=function(){var a,r=0<arguments.length&&arguments[0]!==void 0?arguments[0]:50,i=1<arguments.length&&arguments[1]!==void 0?arguments[1]:r,s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:1,n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:1,l=(this._assert3d("plane"),u.default._validateParameters("plane",arguments),"plane|".concat(s,"|").concat(n));return this._renderer.geometryInHash(l)||((a=new u.default.Geometry(s,n,function(){for(var c,d,v=0;v<=this.detailY;v++)for(var S=v/this.detailY,E=0;E<=this.detailX;E++)c=E/this.detailX,d=new u.default.Vector(c-.5,S-.5,0),this.vertices.push(d),this.uvs.push(c,S)})).computeFaces().computeNormals(),s<=1&&n<=1?a._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on plane objects with more than 1 detailX or 1 detailY"),this._renderer.createBuffers(l,a)),this._renderer.drawBuffersScaled(l,r,i,1),this},u.default.prototype.box=function(a,r,i,s,n){this._assert3d("box"),u.default._validateParameters("box",arguments),a===void 0&&(a=50),r===void 0&&(r=a),i===void 0&&(i=r);var l,c=this._renderer.attributes&&this._renderer.attributes.perPixelLighting,c=(n===void 0&&(n=c?1:4),"box|".concat(s=s===void 0?c?1:4:s,"|").concat(n));return this._renderer.geometryInHash(c)||((l=new u.default.Geometry(s,n,function(){var d=this;this.edges=[[0,1],[1,3],[3,2],[6,7],[8,9],[9,11],[14,15],[16,17],[17,19],[18,19],[20,21],[22,23]],[[0,4,2,6],[1,3,5,7],[0,1,4,5],[2,6,3,7],[0,2,1,3],[4,5,6,7]].forEach(function(v,S){for(var S=4*S,E=0;E<4;E++){var _=v[E],_=new u.default.Vector((2*(1&_)-1)/2,((2&_)-1)/2,((4&_)/2-1)/2);d.vertices.push(_),d.uvs.push(1&E,(2&E)/2)}d.faces.push([S,1+S,2+S]),d.faces.push([2+S,1+S,3+S])})})).computeNormals(),s<=4&&n<=4?l._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on box objects with more than 4 detailX or 4 detailY"),this._renderer.createBuffers(c,l)),this._renderer.drawBuffersScaled(c,a,r,i),this},u.default.prototype.sphere=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:50,r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:24,i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:16;return this._assert3d("sphere"),u.default._validateParameters("sphere",arguments),this.ellipsoid(a,a,a,r,i),this};function y(a,r,i,s,n,l,c){a=a<=0?1:a,r=r<0?0:r,i=i<=0?a:i,s=s<3?3:s;for(var d,v,S=(l=l===void 0||l)?-2:0,E=(n=n<1?1:n)+((c=c===void 0?r!==0:c)?2:0),_=Math.atan2(a-r,i),x=Math.sin(_),O=Math.cos(_),T=S;T<=E;++T){var P=T/n,M=i*P,F=void 0,F=T<0?(P=M=0,a):n<T?(M=i,P=1,r):a+(r-a)*P;for(T!==-2&&T!==n+2||(F=0),M-=i/2,d=0;d<s;++d){var D=d/(s-1),z=2*Math.PI*D,A=Math.sin(z),z=Math.cos(z),G=(this.vertices.push(new u.default.Vector(A*F,M,z*F)),void 0),G=T<0?new u.default.Vector(0,-1,0):n<T&&r?new u.default.Vector(0,1,0):new u.default.Vector(A*O,x,z*O);this.vertexNormals.push(G),this.uvs.push(D,P)}}var U=0;if(l){for(v=0;v<s;++v)this.faces.push([U+v,U+s+(v+1)%s,U+s+v]);U+=2*s}for(T=0;T<n;++T){for(d=0;d<s;++d){var H=(d+1)%s;this.faces.push([U+d,U+H,U+s+H]),this.faces.push([U+d,U+s+H,U+s+d])}U+=s}if(c)for(U+=s,d=0;d<s;++d)this.faces.push([U+d,U+(d+1)%s,U+s])}u.default.prototype.cylinder=function(){var a,r=0<arguments.length&&arguments[0]!==void 0?arguments[0]:50,i=1<arguments.length&&arguments[1]!==void 0?arguments[1]:r,s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:24,n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:1,l=!(4<arguments.length&&arguments[4]!==void 0)||arguments[4],c=!(5<arguments.length&&arguments[5]!==void 0)||arguments[5],d=(this._assert3d("cylinder"),u.default._validateParameters("cylinder",arguments),"cylinder|".concat(s,"|").concat(n,"|").concat(l,"|").concat(c));return this._renderer.geometryInHash(d)||(a=new u.default.Geometry(s,n),y.call(a,1,1,1,s,n,l,c),s<=24&&n<=16?a._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cylinder objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(d,a)),this._renderer.drawBuffersScaled(d,r,i,r),this},u.default.prototype.cone=function(){var a,r=0<arguments.length&&arguments[0]!==void 0?arguments[0]:50,i=1<arguments.length&&arguments[1]!==void 0?arguments[1]:r,s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:24,n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:1,l=!(4<arguments.length&&arguments[4]!==void 0)||arguments[4],c=(this._assert3d("cone"),u.default._validateParameters("cone",arguments),"cone|".concat(s,"|").concat(n,"|").concat(l));return this._renderer.geometryInHash(c)||(a=new u.default.Geometry(s,n),y.call(a,1,0,1,s,n,l,!1),s<=24&&n<=16?a._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cone objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(c,a)),this._renderer.drawBuffersScaled(c,r,i,r),this},u.default.prototype.ellipsoid=function(){var a,r=0<arguments.length&&arguments[0]!==void 0?arguments[0]:50,i=1<arguments.length&&arguments[1]!==void 0?arguments[1]:r,s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:r,n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:24,l=4<arguments.length&&arguments[4]!==void 0?arguments[4]:16,c=(this._assert3d("ellipsoid"),u.default._validateParameters("ellipsoid",arguments),"ellipsoid|".concat(n,"|").concat(l));return this._renderer.geometryInHash(c)||((a=new u.default.Geometry(n,l,function(){for(var d=0;d<=this.detailY;d++)for(var v=d/this.detailY,S=Math.PI*v-Math.PI/2,E=Math.cos(S),_=Math.sin(S),x=0;x<=this.detailX;x++){var O=x/this.detailX,P=2*Math.PI*O,T=Math.cos(P),P=Math.sin(P),P=new u.default.Vector(E*P,_,E*T);this.vertices.push(P),this.vertexNormals.push(P),this.uvs.push(O,v)}})).computeFaces(),n<=24&&l<=24?a._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on ellipsoids with more than 24 detailX or 24 detailY"),this._renderer.createBuffers(c,a)),this._renderer.drawBuffersScaled(c,r,i,s),this},u.default.prototype.torus=function(a,c,i,s){if(this._assert3d("torus"),u.default._validateParameters("torus",arguments),a===void 0)a=50;else if(!a)return;if(c===void 0)c=10;else if(!c)return;i===void 0&&(i=24),s===void 0&&(s=16);var n,l=(c/a).toPrecision(4),c="torus|".concat(l,"|").concat(i,"|").concat(s);return this._renderer.geometryInHash(c)||((n=new u.default.Geometry(i,s,function(){for(var d=0;d<=this.detailY;d++)for(var v=d/this.detailY,S=2*Math.PI*v,E=Math.cos(S),_=Math.sin(S),x=1+l*E,O=0;O<=this.detailX;O++){var T=O/this.detailX,P=2*Math.PI*T,F=Math.cos(P),P=Math.sin(P),M=new u.default.Vector(x*F,x*P,l*_),F=new u.default.Vector(E*F,E*P,_);this.vertices.push(M),this.vertexNormals.push(F),this.uvs.push(T,v)}})).computeFaces(),i<=24&&s<=16?n._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw strokes on torus object with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(c,n)),this._renderer.drawBuffersScaled(c,a,a,a),this},u.default.RendererGL.prototype.point=function(a,r){var i=[];return i.push(new u.default.Vector(a,r,2<arguments.length&&arguments[2]!==void 0?arguments[2]:0)),this._drawPoints(i,this.immediateMode.buffers.point),this},u.default.RendererGL.prototype.triangle=function(c){var r=c[0],i=c[1],s=c[2],n=c[3],l=c[4],c=c[5],d=(this.geometryInHash("tri")||((d=new u.default.Geometry(1,1,function(){var E=[];E.push(new u.default.Vector(0,0,0)),E.push(new u.default.Vector(1,0,0)),E.push(new u.default.Vector(0,1,0)),this.edges=[[0,1],[1,2],[2,0]],this.vertices=E,this.faces=[[0,1,2]],this.uvs=[0,0,1,0,1,1]}))._edgesToVertices(),d.computeNormals(),this.createBuffers("tri",d)),this.uModelMatrix.copy());try{var v=Math.sign(r*n-s*i+s*c-l*n+l*i-r*c),S=new u.default.Matrix([s-r,n-i,0,0,l-r,c-i,0,0,0,0,v,0,r,i,0,1]).mult(this.uModelMatrix);this.uModelMatrix=S,this.drawBuffers("tri")}finally{this.uModelMatrix=d}return this},u.default.RendererGL.prototype.ellipse=function(a){this.arc(a[0],a[1],a[2],a[3],0,f.TWO_PI,f.OPEN,a[4])},u.default.RendererGL.prototype.arc=function(){var a,r=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],s=arguments.length<=2?void 0:arguments[2],n=arguments.length<=3?void 0:arguments[3],l=arguments.length<=4?void 0:arguments[4],c=arguments.length<=5?void 0:arguments[5],d=arguments.length<=6?void 0:arguments[6],v=(arguments.length<=7?void 0:arguments[7])||25,S=(Math.abs(c-l)>=f.TWO_PI?"".concat(E="ellipse","|"):"".concat(E="arc","|").concat(l,"|").concat(c,"|").concat(d,"|")).concat(v,"|"),E=(this.geometryInHash(S)||((a=new u.default.Geometry(v,1,function(){if(l.toFixed(10)!==c.toFixed(10)){d!==f.PIE&&d!==void 0||(this.vertices.push(new u.default.Vector(.5,.5,0)),this.uvs.push([.5,.5]));for(var _=0;_<=v;_++){var O=(c-l)*(_/v)+l,x=.5+Math.cos(O)/2,O=.5+Math.sin(O)/2;this.vertices.push(new u.default.Vector(x,O,0)),this.uvs.push([x,O]),_<v-1&&(this.faces.push([0,_+1,_+2]),this.edges.push([_+1,_+2]))}switch(d){case f.PIE:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.edges.push([0,1]),this.edges.push([this.vertices.length-2,this.vertices.length-1]),this.edges.push([0,this.vertices.length-1]);break;case f.CHORD:this.edges.push([0,1]),this.edges.push([0,this.vertices.length-1]);break;case f.OPEN:this.edges.push([0,1]);break;default:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.edges.push([this.vertices.length-2,this.vertices.length-1])}}})).computeNormals(),v<=50?a._edgesToVertices(a):this._doStroke&&console.log("Cannot apply a stroke to an ".concat(E," with more than 50 detail")),this.createBuffers(S,a)),this.uModelMatrix.copy());try{this.uModelMatrix.translate([r,i,0]),this.uModelMatrix.scale(s,n,1),this.drawBuffers(S)}finally{this.uModelMatrix=E}return this},u.default.RendererGL.prototype.rect=function(a){var r=a[0],i=a[1],s=a[2],n=a[3];if(a[4]===void 0){var d=this._pInst._glAttributes.perPixelLighting,l=a[4]||(d?1:24),c=a[5]||(d?1:16),d="rect|".concat(l,"|").concat(c),v=(this.geometryInHash(d)||((v=new u.default.Geometry(l,c,function(){for(var G=0;G<=this.detailY;G++)for(var U=G/this.detailY,H=0;H<=this.detailX;H++){var Y=H/this.detailX,oe=new u.default.Vector(Y,U,0);this.vertices.push(oe),this.uvs.push(Y,U)}0<l&&0<c&&(this.edges=[[0,l],[l,(l+1)*(c+1)-1],[(l+1)*(c+1)-1,(l+1)*c],[(l+1)*c,0]])})).computeFaces().computeNormals()._edgesToVertices(),this.createBuffers(d,v)),this.uModelMatrix.copy());try{this.uModelMatrix.translate([r,i,0]),this.uModelMatrix.scale(s,n,1),this.drawBuffers(d)}finally{this.uModelMatrix=v}}else{var d=a[4],v=a[5]===void 0?d:a[5],S=a[6]===void 0?v:a[6],a=a[7]===void 0?S:a[7],P=s,E=n,O=((P+=r)<r&&(O=r,r=P,P=O),(E+=i)<i&&(O=i,i=E,E=O),Math.min((P-r)/2,(E-i)/2)),_=(O<d&&(d=O),O<v&&(v=O),O<S&&(S=O),O<a&&(a=O),r),x=i,O=P,r=E,T=(this.beginShape(),v!==0?(this.vertex(O-v,x),this.quadraticVertex(O,x,O,x+v)):this.vertex(O,x),S!==0?(this.vertex(O,r-S),this.quadraticVertex(O,r,O-S,r)):this.vertex(O,r),a!==0?(this.vertex(_+a,r),this.quadraticVertex(_,r,_,r-a)):this.vertex(_,r),d!==0?(this.vertex(_,x+d),this.quadraticVertex(_,x,_+d,x)):this.vertex(_,x),!(this.immediateMode.geometry.uvs.length=0)),i=!1,P=void 0;try{for(var M,F=this.immediateMode.geometry.vertices[Symbol.iterator]();!(T=(M=F.next()).done);T=!0){var D=M.value,A=(D.x-_)/s,z=(D.y-x)/n;this.immediateMode.geometry.uvs.push(A,z)}}catch(L){i=!0,P=L}finally{try{T||F.return==null||F.return()}finally{if(i)throw P}}this.endShape(f.CLOSE)}return this},u.default.RendererGL.prototype.quad=function(a,r,i,s,n,l,c,d,v,S,E,_){var x=12<arguments.length&&arguments[12]!==void 0?arguments[12]:2,O=13<arguments.length&&arguments[13]!==void 0?arguments[13]:2,T="quad|".concat(a,"|").concat(r,"|").concat(i,"|").concat(s,"|").concat(n,"|").concat(l,"|").concat(c,"|").concat(d,"|").concat(v,"|").concat(S,"|").concat(E,"|").concat(_,"|").concat(x,"|").concat(O);if(!this.geometryInHash(T)){var P=new u.default.Geometry(x,O,function(){for(var H=1/(this.detailX-1),Y=1/(this.detailY-1),oe=0;oe<this.detailY;oe++)for(var L=0;L<this.detailX;L++){var j=L*H,R=oe*Y;this.vertices.push(new u.default.Vector((1-j)*((1-R)*a+R*S)+j*((1-R)*s+R*c),(1-j)*((1-R)*r+R*E)+j*((1-R)*n+R*d),(1-j)*((1-R)*i+R*_)+j*((1-R)*l+R*v))),this.uvs.push([j,R])}});P.faces=[];for(var M=0;M<O-1;M++)for(var F=0;F<x-1;F++){var D=F+M*x,A=F+1+(M+1)*x,z=F+(M+1)*x;P.faces.push([D,F+1+M*x,A]),P.faces.push([D,A,z])}P.computeNormals();for(var G=[P.edges.length=0,2,3,1],U=0;U<G.length;U++)P.edges.push([G[U],G[(U+1)%G.length]]);P._edgesToVertices(),this.createBuffers(T,P)}return this.drawBuffers(T),this},u.default.RendererGL.prototype.bezier=function(a,r,i,s,n,l,c,d,v,S,E,_){arguments.length===8&&(E=d,S=c,d=l,c=n,n=s,s=i,i=l=v=_=0);var x=this._pInst._bezierDetail||20;this.beginShape();for(var O=0;O<=x;O++){var T=Math.pow(1-O/x,3),P=O/x*3*Math.pow(1-O/x,2),M=3*Math.pow(O/x,2)*(1-O/x),F=Math.pow(O/x,3);this.vertex(a*T+s*P+c*M+S*F,r*T+n*P+d*M+E*F,i*T+l*P+v*M+_*F)}return this.endShape(),this},u.default.RendererGL.prototype.curve=function(a,r,i,s,n,l,c,d,v,S,E,_){arguments.length===8&&(S=c,E=d,c=n,d=s,n=s=i,i=l=v=_=0);var x=this._pInst._curveDetail;this.beginShape();for(var O=0;O<=x;O++){var T=.5*Math.pow(O/x,3),P=.5*Math.pow(O/x,2),M=O/x*.5;this.vertex(T*(3*s-a-3*c+S)+P*(2*a-5*s+4*c-S)+M*(-a+c)+2*s*.5,T*(3*n-r-3*d+E)+P*(2*r-5*n+4*d-E)+M*(-r+d)+2*n*.5,T*(3*l-i-3*v+_)+P*(2*i-5*l+4*v-_)+M*(-i+v)+2*l*.5)}return this.endShape(),this},u.default.RendererGL.prototype.line=function(){return arguments.length===6?(this.beginShape(f.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]),this.vertex(arguments.length<=3?void 0:arguments[3],arguments.length<=4?void 0:arguments[4],arguments.length<=5?void 0:arguments[5]),this.endShape()):arguments.length===4&&(this.beginShape(f.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],0),this.vertex(arguments.length<=2?void 0:arguments[2],arguments.length<=3?void 0:arguments[3],0),this.endShape()),this},u.default.RendererGL.prototype.bezierVertex=function(){if(this.immediateMode._bezierVertex.length===0)throw Error("vertex() must be used once before calling bezierVertex()");var a,r,i,s,n,l,c=[],d=[],v=arguments.length;if(this._lookUpTableBezier.length===0||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var S=1/this._lutBezierDetail,E=S,_=1,x=0;E<1;){if(l=parseFloat(E.toFixed(6)),this._lookUpTableBezier[x]=this._bezierCoefficients(l),_.toFixed(6)===S.toFixed(6)){l=parseFloat(_.toFixed(6))+parseFloat(E.toFixed(6)),++x,this._lookUpTableBezier[x]=this._bezierCoefficients(l);break}E+=S,_-=S,++x}}for(var O=this._lookUpTableBezier.length,T=[],P=0;P<4;P++)T.push([]);T[0]=this.immediateMode.geometry.vertexColors.slice(-4),T[3]=this.curFillColor.slice();var M=[];for(P=0;P<4;P++)M.push([]);if(M[0]=this.immediateMode.geometry.vertexStrokeColors.slice(-4),M[3]=this.curStrokeColor.slice(),v===6){this.isBezier=!0;var c=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2],arguments.length<=4?void 0:arguments[4]],d=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3],arguments.length<=5?void 0:arguments[5]],F=Math.hypot(c[0]-c[1],d[0]-d[1]),A=Math.hypot(c[1]-c[2],d[1]-d[2]),D=Math.hypot(c[2]-c[3],d[2]-d[3]),A=F+A+D;for(F/=A,D/=A,n=0;n<4;n++)T[1].push(T[0][n]*(1-F)+T[3][n]*F),T[2].push(T[0][n]*D+T[3][n]*(1-D)),M[1].push(M[0][n]*(1-F)+M[3][n]*F),M[2].push(M[0][n]*D+M[3][n]*(1-D));for(s=0;s<O;s++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],P=a=r=0;P<4;P++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableBezier[s][P]*T[P][n],this.curStrokeColor[n]+=this._lookUpTableBezier[s][P]*M[P][n];a+=c[P]*this._lookUpTableBezier[s][P],r+=d[P]*this._lookUpTableBezier[s][P]}this.vertex(a,r)}this.curFillColor=T[3],this.curStrokeColor=M[3],this.immediateMode._bezierVertex[0]=arguments.length<=4?void 0:arguments[4],this.immediateMode._bezierVertex[1]=arguments.length<=5?void 0:arguments[5]}else if(v===9){this.isBezier=!0,c=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3],arguments.length<=6?void 0:arguments[6]],d=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4],arguments.length<=7?void 0:arguments[7]];var z=[this.immediateMode._bezierVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5],arguments.length<=8?void 0:arguments[8]],G=Math.hypot(c[0]-c[1],d[0]-d[1],z[0]-z[1]),A=Math.hypot(c[1]-c[2],d[1]-d[2],z[1]-z[2]),U=Math.hypot(c[2]-c[3],d[2]-d[3],z[2]-z[3]),v=G+A+U;for(G/=v,U/=v,n=0;n<4;n++)T[1].push(T[0][n]*(1-G)+T[3][n]*G),T[2].push(T[0][n]*U+T[3][n]*(1-U)),M[1].push(M[0][n]*(1-G)+M[3][n]*G),M[2].push(M[0][n]*U+M[3][n]*(1-U));for(s=0;s<O;s++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],P=a=r=i=0;P<4;P++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableBezier[s][P]*T[P][n],this.curStrokeColor[n]+=this._lookUpTableBezier[s][P]*M[P][n];a+=c[P]*this._lookUpTableBezier[s][P],r+=d[P]*this._lookUpTableBezier[s][P],i+=z[P]*this._lookUpTableBezier[s][P]}this.vertex(a,r,i)}this.curFillColor=T[3],this.curStrokeColor=M[3],this.immediateMode._bezierVertex[0]=arguments.length<=6?void 0:arguments[6],this.immediateMode._bezierVertex[1]=arguments.length<=7?void 0:arguments[7],this.immediateMode._bezierVertex[2]=arguments.length<=8?void 0:arguments[8]}},u.default.RendererGL.prototype.quadraticVertex=function(){if(this.immediateMode._quadraticVertex.length===0)throw Error("vertex() must be used once before calling quadraticVertex()");var a,r,i,s,n,l,c=[],d=[],v=arguments.length;if(this._lookUpTableQuadratic.length===0||this._lutQuadraticDetail!==this._pInst._curveDetail){this._lookUpTableQuadratic=[],this._lutQuadraticDetail=this._pInst._curveDetail;for(var S=1/this._lutQuadraticDetail,E=S,_=1,x=0;E<1;){if(l=parseFloat(E.toFixed(6)),this._lookUpTableQuadratic[x]=this._quadraticCoefficients(l),_.toFixed(6)===S.toFixed(6)){l=parseFloat(_.toFixed(6))+parseFloat(E.toFixed(6)),++x,this._lookUpTableQuadratic[x]=this._quadraticCoefficients(l);break}E+=S,_-=S,++x}}for(var O=this._lookUpTableQuadratic.length,T=[],P=0;P<3;P++)T.push([]);T[0]=this.immediateMode.geometry.vertexColors.slice(-4),T[2]=this.curFillColor.slice();var M=[];for(P=0;P<3;P++)M.push([]);if(M[0]=this.immediateMode.geometry.vertexStrokeColors.slice(-4),M[2]=this.curStrokeColor.slice(),v===4){this.isQuadratic=!0;var c=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2]],d=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3]],F=Math.hypot(c[0]-c[1],d[0]-d[1]);for(F/=F+Math.hypot(c[1]-c[2],d[1]-d[2]),n=0;n<4;n++)T[1].push(T[0][n]*(1-F)+T[2][n]*F),M[1].push(M[0][n]*(1-F)+M[2][n]*F);for(s=0;s<O;s++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],P=a=r=0;P<3;P++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableQuadratic[s][P]*T[P][n],this.curStrokeColor[n]+=this._lookUpTableQuadratic[s][P]*M[P][n];a+=c[P]*this._lookUpTableQuadratic[s][P],r+=d[P]*this._lookUpTableQuadratic[s][P]}this.vertex(a,r)}this.curFillColor=T[2],this.curStrokeColor=M[2],this.immediateMode._quadraticVertex[0]=arguments.length<=2?void 0:arguments[2],this.immediateMode._quadraticVertex[1]=arguments.length<=3?void 0:arguments[3]}else if(v===6){this.isQuadratic=!0,c=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3]],d=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4]];var D=[this.immediateMode._quadraticVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5]],A=Math.hypot(c[0]-c[1],d[0]-d[1],D[0]-D[1]);for(A/=A+Math.hypot(c[1]-c[2],d[1]-d[2],D[1]-D[2]),n=0;n<4;n++)T[1].push(T[0][n]*(1-A)+T[2][n]*A),M[1].push(M[0][n]*(1-A)+M[2][n]*A);for(s=0;s<O;s++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],P=a=r=i=0;P<3;P++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableQuadratic[s][P]*T[P][n],this.curStrokeColor[n]+=this._lookUpTableQuadratic[s][P]*M[P][n];a+=c[P]*this._lookUpTableQuadratic[s][P],r+=d[P]*this._lookUpTableQuadratic[s][P],i+=D[P]*this._lookUpTableQuadratic[s][P]}this.vertex(a,r,i)}this.curFillColor=T[2],this.curStrokeColor=M[2],this.immediateMode._quadraticVertex[0]=arguments.length<=3?void 0:arguments[3],this.immediateMode._quadraticVertex[1]=arguments.length<=4?void 0:arguments[4],this.immediateMode._quadraticVertex[2]=arguments.length<=5?void 0:arguments[5]}},u.default.RendererGL.prototype.curveVertex=function(){var a,r,i,s,n,l,c=[],d=[],v=arguments.length;if(this._lookUpTableBezier.length===0||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var S=1/this._lutBezierDetail,E=S,_=1,x=0;E<1;){if(l=parseFloat(E.toFixed(6)),this._lookUpTableBezier[x]=this._bezierCoefficients(l),_.toFixed(6)===S.toFixed(6)){l=parseFloat(_.toFixed(6))+parseFloat(E.toFixed(6)),++x,this._lookUpTableBezier[x]=this._bezierCoefficients(l);break}E+=S,_-=S,++x}}var O=this._lookUpTableBezier.length;if(v===2){if(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),this.immediateMode._curveVertex.length===8){for(this.isCurve=!0,c=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[6]]),d=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[7]]),n=0;n<O;n++)r=c[0]*this._lookUpTableBezier[n][0]+c[1]*this._lookUpTableBezier[n][1]+c[2]*this._lookUpTableBezier[n][2]+c[3]*this._lookUpTableBezier[n][3],i=d[0]*this._lookUpTableBezier[n][0]+d[1]*this._lookUpTableBezier[n][1]+d[2]*this._lookUpTableBezier[n][2]+d[3]*this._lookUpTableBezier[n][3],this.vertex(r,i);for(n=0;n<v;n++)this.immediateMode._curveVertex.shift()}}else if(v===3&&(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),this.immediateMode._curveVertex.push(arguments.length<=2?void 0:arguments[2]),this.immediateMode._curveVertex.length===12)){for(this.isCurve=!0,c=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[6],this.immediateMode._curveVertex[9]]),d=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[7],this.immediateMode._curveVertex[10]]),a=this._bezierToCatmull([this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[8],this.immediateMode._curveVertex[11]]),n=0;n<O;n++)r=c[0]*this._lookUpTableBezier[n][0]+c[1]*this._lookUpTableBezier[n][1]+c[2]*this._lookUpTableBezier[n][2]+c[3]*this._lookUpTableBezier[n][3],i=d[0]*this._lookUpTableBezier[n][0]+d[1]*this._lookUpTableBezier[n][1]+d[2]*this._lookUpTableBezier[n][2]+d[3]*this._lookUpTableBezier[n][3],s=a[0]*this._lookUpTableBezier[n][0]+a[1]*this._lookUpTableBezier[n][1]+a[2]*this._lookUpTableBezier[n][2]+a[3]*this._lookUpTableBezier[n][3],this.vertex(r,i,s);for(n=0;n<v;n++)this.immediateMode._curveVertex.shift()}},u.default.RendererGL.prototype.image=function(a,_,i,x,n,l,c,d,v){this._isErasing&&this.blendMode(this._cachedBlendMode),this._pInst.push(),this._pInst.noLights(),this._pInst.noStroke(),this._pInst.texture(a),this._pInst.textureMode(f.NORMAL);var S=0,E=(_<=a.width&&(S=_/a.width),1),_=(_+x<=a.width&&(E=(_+x)/a.width),0),x=(i<=a.height&&(_=i/a.height),1);i+n<=a.height&&(x=(i+n)/a.height),this.beginShape(),this.vertex(l,c,0,S,_),this.vertex(l+d,c,0,E,_),this.vertex(l+d,c+v,0,E,x),this.vertex(l,c+v,0,S,x),this.endShape(f.CLOSE),this._pInst.pop(),this._isErasing&&this.blendMode(f.REMOVE)};var o=u.default;C.default=o},{"../core/constants":272,"../core/main":283,"./p5.Geometry":335,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.hypot":176,"core-js/modules/es.math.sign":178,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],327:[function(t,W,C){"use strict";function p(r){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function m(r){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(i){return p(i)}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":p(i)})(r)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.assign"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(a=t("../core/main"))&&a.__esModule?a:{default:a},f=(function(r){if(r&&r.__esModule)return r;if(r===null||m(r)!=="object"&&typeof r!="function")return{default:r};var i=g();if(i&&i.has(r))return i.get(r);var s,n={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(s in r){var c;Object.prototype.hasOwnProperty.call(r,s)&&((c=l?Object.getOwnPropertyDescriptor(r,s):null)&&(c.get||c.set)?Object.defineProperty(n,s,c):n[s]=r[s])}return n.default=r,i&&i.set(r,n),n})(t("../core/constants"));function g(){var r;return typeof WeakMap!="function"?null:(r=new WeakMap,g=function(){return r},r)}function y(r){return(function(i){if(Array.isArray(i)){for(var s=0,n=new Array(i.length);s<i.length;s++)n[s]=i[s];return n}})(r)||(function(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)})(r)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}function o(r,i){for(var s=0;s<i.length;s++){var n=i[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}var a=(function(){function r(l){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");(this.renderer=l)._pInst.push(),this.identityMatrix=new u.default.Matrix,l.uModelMatrix=new u.default.Matrix,this.geometry=new u.default.Geometry,this.geometry.gid="_p5_GeometryBuilder_".concat(r.nextGeometryId),r.nextGeometryId++,this.hasTransform=!1}var i,s,n;return i=r,(s=[{key:"transformVertices",value:function(l){var c=this;return this.hasTransform?l.map(function(d){return c.renderer.uModelMatrix.multiplyPoint(d)}):l}},{key:"transformNormals",value:function(l){var c=this;return this.hasTransform?l.map(function(d){return c.renderer.uNMatrix.multiplyVec3(d)}):l}},{key:"addGeometry",value:function(l){for(var c,d=this,v=(this.hasTransform=!this.renderer.uModelMatrix.mat4.every(function(E,_){return E===d.identityMatrix.mat4[_]}),this.hasTransform&&this.renderer.uNMatrix.inverseTranspose(this.renderer.uModelMatrix),this.geometry.vertices.length),S=((c=this.geometry.vertices).push.apply(c,y(this.transformVertices(l.vertices))),(c=this.geometry.vertexNormals).push.apply(c,y(this.transformNormals(l.vertexNormals))),(c=this.geometry.uvs).push.apply(c,y(l.uvs)),this.renderer._doFill&&(c=this.geometry.faces).push.apply(c,y(l.faces.map(function(E){return E.map(function(_){return _+v})}))),this.renderer._doStroke&&(c=this.geometry.edges).push.apply(c,y(l.edges.map(function(E){return E.map(function(_){return _+v})}))),y(l.vertexColors));S.length<4*l.vertices.length;)S.push.apply(S,y(this.renderer.curFillColor));(c=this.geometry.vertexColors).push.apply(c,y(S))}},{key:"addImmediate",value:function(){var l=this.renderer.immediateMode.geometry,c=this.renderer.immediateMode.shapeMode,d=[];if(this.renderer._doFill)if(c===f.TRIANGLE_STRIP||c===f.QUAD_STRIP)for(var v=2;v<l.vertices.length;v++)v%2==0?d.push([v,v-1,v-2]):d.push([v,v-2,v-1]);else if(c===f.TRIANGLE_FAN)for(var S=2;S<l.vertices.length;S++)d.push([0,S-1,S]);else for(var E=0;E<l.vertices.length;E+=3)d.push([E,E+1,E+2]);this.addGeometry(Object.assign({},l,{faces:d}))}},{key:"addRetained",value:function(l){this.addGeometry(l.model)}},{key:"finish",value:function(){return this.renderer._pInst.pop(),this.geometry}}])&&o(i.prototype,s),n&&o(i,n),r})();a.nextGeometryId=0,C.default=a},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.every":155,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],328:[function(t,W,C){"use strict";function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var m=(y=t("../core/main"))&&y.__esModule?y:{default:y},u=(function(o){if(o&&o.__esModule)return o;if(o===null||g(o)!=="object"&&typeof o!="function")return{default:o};var a=f();if(a&&a.has(o))return a.get(o);var r,i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in o){var n;Object.prototype.hasOwnProperty.call(o,r)&&((n=s?Object.getOwnPropertyDescriptor(o,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=o[r])}return i.default=o,a&&a.set(o,i),i})(t("../core/constants"));function f(){var o;return typeof WeakMap!="function"?null:(o=new WeakMap,f=function(){return o},o)}function g(o){return(g=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(a){return p(a)}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":p(a)})(o)}m.default.prototype.orbitControl=function(o,a,r,v){var s=this,n=(this._assert3d("orbitControl"),m.default._validateParameters("orbitControl",arguments),this._renderer._curCamera);o===void 0&&(o=1),a===void 0&&(a=o),r===void 0&&(r=1),g(v)!=="object"&&(v={}),this.contextMenuDisabled!==!0&&(this.canvas.oncontextmenu=function(){return!1},this._setProperty("contextMenuDisabled",!0)),this.wheelDefaultDisabled!==!0&&(this.canvas.onwheel=function(){return!1},this._setProperty("wheelDefaultDisabled",!0));var E=v.disableTouchActions;this.touchActionsDisabled===!0||E!==void 0&&!E||(this.canvas.style["touch-action"]="none",this._setProperty("touchActionsDisabled",!0));var l,c,d,E=v.freeRotation,v=E!==void 0&&E,S=[],E=(this.touches.forEach(function(F){s._renderer.prevTouches.forEach(function(D){F.id===D.id&&(D={x:F.x,y:F.y,px:D.x,py:D.y},S.push(D))})}),this._renderer.prevTouches=this.touches,0),_=0,x=0,O=0,T=0,P=this.height<this.width?this.height:this.width,M=!1;return 0<S.length?(M=0<S[0].x&&S[0].x<this.width&&0<S[0].y&&S[0].y<this.height,S.length===1?(_=-o*((l=S[0]).x-l.px)/P,x=a*(l.y-l.py)/P):(l=S[0],c=S[1],E=-(Math.hypot(l.x-c.x,l.y-c.y)-Math.hypot(l.px-c.px,l.py-c.py))*r*4e-4,O=.5*(l.x+c.x)-.5*(l.px+c.px),T=.5*(l.y+c.y)-.5*(l.py+c.py)),0<this.touches.length?M&&(this._renderer.executeRotateAndMove=!0,this._renderer.executeZoom=!0):(this._renderer.executeRotateAndMove=!1,this._renderer.executeZoom=!1)):(M=0<this.mouseX&&this.mouseX<this.width&&0<this.mouseY&&this.mouseY<this.height,this._mouseWheelDeltaY!==0?(E=Math.sign(this._mouseWheelDeltaY)*r,E*=.01,this._mouseWheelDeltaY=0,M&&(this._renderer.executeZoom=!0)):this._renderer.executeZoom=!1,this.mouseIsPressed?(this.mouseButton===this.LEFT?(_=-o*this.movedX/P,x=a*this.movedY/P):this.mouseButton===this.RIGHT&&(O=this.movedX,T=this.movedY*n.yScale),M&&(this._renderer.executeRotateAndMove=!0)):this._renderer.executeRotateAndMove=!1),E!==0&&this._renderer.executeZoom&&(this._renderer.zoomVelocity+=E),.001<Math.abs(this._renderer.zoomVelocity)?(v?n._orbitFree(0,0,this._renderer.zoomVelocity):n._orbit(0,0,this._renderer.zoomVelocity),n.projMatrix.mat4[15]!==0&&(n.projMatrix.mat4[0]*=Math.pow(10,-this._renderer.zoomVelocity),n.projMatrix.mat4[5]*=Math.pow(10,-this._renderer.zoomVelocity),this._renderer.uPMatrix.mat4[0]=n.projMatrix.mat4[0],this._renderer.uPMatrix.mat4[5]=n.projMatrix.mat4[5]),this._renderer.zoomVelocity*=.85):this._renderer.zoomVelocity=0,_===0&&x===0||!this._renderer.executeRotateAndMove||this._renderer.rotateVelocity.add(.6*_,.6*x),1e-6<this._renderer.rotateVelocity.magSq()?(v?n._orbitFree(-this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0):n._orbit(this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0),this._renderer.rotateVelocity.mult(.85)):this._renderer.rotateVelocity.set(0,0),O===0&&T===0||!this._renderer.executeRotateAndMove||(l=2*O/this.width,c=2*-T/this.height,this._renderer.moveVelocity.add(.15*l,.15*c)),1e-6<this._renderer.moveVelocity.magSq()?(r=n._getLocalAxes(),o=n.eyeX-n.centerX,a=n.eyeY-n.centerY,P=n.eyeZ-n.centerZ,M=Math.sqrt(o*o+a*a+P*P),E=new m.default.Vector(n.centerX,n.centerY,n.centerZ),E=n.cameraMatrix.multiplyPoint(E),(E=this._renderer.uPMatrix.multiplyAndNormalizePoint(E)).x-=this._renderer.moveVelocity.x,E.y-=this._renderer.moveVelocity.y,x=(_=this._renderer.uPMatrix.mat4)[15]===0?(d=(_[8]+E.x)/_[0]*M,(_[9]+E.y)/_[5]*M):(d=(E.x-_[12])/_[0],(E.y-_[13])/_[5]),n.setPosition(n.eyeX+d*r.x[0]+x*r.y[0],n.eyeY+d*r.x[1]+x*r.y[1],n.eyeZ+d*r.x[2]+x*r.y[2]),this._renderer.moveVelocity.mult(.85)):this._renderer.moveVelocity.set(0,0),this},m.default.prototype.debugMode=function(){this._assert3d("debugMode");for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];m.default._validateParameters("debugMode",a);for(var i=this._registeredMethods.post.length-1;0<=i;i--)this._registeredMethods.post[i].toString()!==this._grid().toString()&&this._registeredMethods.post[i].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(i,1);a[0]===u.GRID?this.registerMethod("post",this._grid(a[1],a[2],a[3],a[4],a[5])):a[0]===u.AXES?this.registerMethod("post",this._axesIcon(a[1],a[2],a[3],a[4])):(this.registerMethod("post",this._grid(a[0],a[1],a[2],a[3],a[4])),this.registerMethod("post",this._axesIcon(a[5],a[6],a[7],a[8])))},m.default.prototype.noDebugMode=function(){this._assert3d("noDebugMode");for(var o=this._registeredMethods.post.length-1;0<=o;o--)this._registeredMethods.post[o].toString()!==this._grid().toString()&&this._registeredMethods.post[o].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(o,1)},m.default.prototype._grid=function(o,a,r,i,s){o===void 0&&(o=this.width/2),a===void 0&&(a=Math.round(o/30)<4?4:Math.round(o/30)),r===void 0&&(r=0),i===void 0&&(i=0),s===void 0&&(s=0);var n=o/a,l=o/2;return function(){this.push(),this.stroke(255*this._renderer.curStrokeColor[0],255*this._renderer.curStrokeColor[1],255*this._renderer.curStrokeColor[2]),this._renderer.uModelMatrix.reset();for(var c=0;c<=a;c++)this.beginShape(this.LINES),this.vertex(-l+r,i,c*n-l+s),this.vertex(l+r,i,c*n-l+s),this.endShape();for(var d=0;d<=a;d++)this.beginShape(this.LINES),this.vertex(d*n-l+r,i,-l+s),this.vertex(d*n-l+r,i,l+s),this.endShape();this.pop()}},m.default.prototype._axesIcon=function(o,a,r,i){return o===void 0&&(o=40<this.width/20?this.width/20:40),a===void 0&&(a=-this.width/4),r===void 0&&(r=a),i===void 0&&(i=a),function(){this.push(),this._renderer.uModelMatrix.reset(),this.strokeWeight(2),this.stroke(255,0,0),this.beginShape(this.LINES),this.vertex(a,r,i),this.vertex(a+o,r,i),this.endShape(),this.stroke(0,255,0),this.beginShape(this.LINES),this.vertex(a,r,i),this.vertex(a,r+o,i),this.endShape(),this.stroke(0,0,255),this.beginShape(this.LINES),this.vertex(a,r,i),this.vertex(a,r,i+o),this.endShape(),this.pop()}};var y=m.default;C.default=y},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.splice":171,"core-js/modules/es.math.hypot":176,"core-js/modules/es.math.sign":178,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],329:[function(t,W,C){"use strict";t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.filter"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};p.default.prototype.ambientLight=function(m,u,f,g){this._assert3d("ambientLight"),p.default._validateParameters("ambientLight",arguments);var y=this.color.apply(this,arguments);return this._renderer.ambientLightColors.push(y._array[0],y._array[1],y._array[2]),this._renderer._enableLighting=!0,this},p.default.prototype.specularColor=function(m,u,f){this._assert3d("specularColor"),p.default._validateParameters("specularColor",arguments);var g=this.color.apply(this,arguments);return this._renderer.specularColors=[g._array[0],g._array[1],g._array[2]],this},p.default.prototype.directionalLight=function(m,s,i,g,y,o){this._assert3d("directionalLight"),p.default._validateParameters("directionalLight",arguments),m=m instanceof p.default.Color?m:this.color(m,s,i);var a,r,s=arguments[arguments.length-1],i=typeof s=="number"?(a=arguments[arguments.length-3],r=arguments[arguments.length-2],arguments[arguments.length-1]):(a=s.x,r=s.y,s.z),s=Math.sqrt(a*a+r*r+i*i);return this._renderer.directionalLightDirections.push(a/s,r/s,i/s),this._renderer.directionalLightDiffuseColors.push(m._array[0],m._array[1],m._array[2]),Array.prototype.push.apply(this._renderer.directionalLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},p.default.prototype.pointLight=function(m,i,s,g,y,o){this._assert3d("pointLight"),p.default._validateParameters("pointLight",arguments),m=m instanceof p.default.Color?m:this.color(m,i,s);var a,r,i=arguments[arguments.length-1],s=typeof i=="number"?(a=arguments[arguments.length-3],r=arguments[arguments.length-2],arguments[arguments.length-1]):(a=i.x,r=i.y,i.z);return this._renderer.pointLightPositions.push(a,r,s),this._renderer.pointLightDiffuseColors.push(m._array[0],m._array[1],m._array[2]),Array.prototype.push.apply(this._renderer.pointLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},p.default.prototype.imageLight=function(m){this._renderer.activeImageLight=m,this._renderer._enableLighting=!0},p.default.prototype.panorama=function(m){this.filter(this._renderer._getSphereMapping(m))},p.default.prototype.lights=function(){this._assert3d("lights");var m=this.color("rgb(128,128,128)");return this.ambientLight(m),this.directionalLight(m,0,0,-1),this},p.default.prototype.lightFalloff=function(m,u,f){return this._assert3d("lightFalloff"),p.default._validateParameters("lightFalloff",arguments),m<0&&(m=0,console.warn("Value of constant argument in lightFalloff() should be never be negative. Set to 0.")),u<0&&(u=0,console.warn("Value of linear argument in lightFalloff() should be never be negative. Set to 0.")),f<0&&(f=0,console.warn("Value of quadratic argument in lightFalloff() should be never be negative. Set to 0.")),m===0&&u===0&&f===0&&(m=1,console.warn("Either one of the three arguments in lightFalloff() should be greater than zero. Set constant argument to 1.")),this._renderer.constantAttenuation=m,this._renderer.linearAttenuation=u,this._renderer.quadraticAttenuation=f,this},p.default.prototype.spotLight=function(m,u,f,g,y,o,a,r,i,s,n){this._assert3d("spotLight"),p.default._validateParameters("spotLight",arguments);var l,c,d,v=arguments.length;switch(v){case 11:case 10:l=this.color(m,u,f),c=new p.default.Vector(g,y,o),d=new p.default.Vector(a,r,i);break;case 9:m instanceof p.default.Color?(l=m,c=new p.default.Vector(u,f,g),d=new p.default.Vector(y,o,a),s=r,n=i):g instanceof p.default.Vector?(l=this.color(m,u,f),c=g,d=new p.default.Vector(y,o,a),s=r,n=i):a instanceof p.default.Vector?(l=this.color(m,u,f),c=new p.default.Vector(g,y,o),d=a,s=r,n=i):(l=this.color(m,u,f),c=new p.default.Vector(g,y,o),d=new p.default.Vector(a,r,i));break;case 8:s=(d=m instanceof p.default.Color?(l=m,c=new p.default.Vector(u,f,g),new p.default.Vector(y,o,a)):g instanceof p.default.Vector?(l=this.color(m,u,f),c=g,new p.default.Vector(y,o,a)):(l=this.color(m,u,f),c=new p.default.Vector(g,y,o),a),r);break;case 7:m instanceof p.default.Color&&u instanceof p.default.Vector?(l=m,c=u,d=new p.default.Vector(f,g,y),s=o,n=a):m instanceof p.default.Color&&y instanceof p.default.Vector?(l=m,c=new p.default.Vector(u,f,g),d=y,s=o,n=a):g instanceof p.default.Vector&&y instanceof p.default.Vector?(l=this.color(m,u,f),c=g,d=y,s=o,n=a):d=m instanceof p.default.Color?(l=m,c=new p.default.Vector(u,f,g),new p.default.Vector(y,o,a)):g instanceof p.default.Vector?(l=this.color(m,u,f),c=g,new p.default.Vector(y,o,a)):(l=this.color(m,u,f),c=new p.default.Vector(g,y,o),a);break;case 6:g instanceof p.default.Vector&&y instanceof p.default.Vector?(l=this.color(m,u,f),c=g,d=y,s=o):m instanceof p.default.Color&&y instanceof p.default.Vector?(l=m,c=new p.default.Vector(u,f,g),d=y,s=o):m instanceof p.default.Color&&u instanceof p.default.Vector&&(l=m,c=u,d=new p.default.Vector(f,g,y),s=o);break;case 5:m instanceof p.default.Color&&u instanceof p.default.Vector&&f instanceof p.default.Vector?(l=m,c=u,d=f,s=g,n=y):g instanceof p.default.Vector&&y instanceof p.default.Vector?(l=this.color(m,u,f),c=g,d=y):m instanceof p.default.Color&&y instanceof p.default.Vector?(l=m,c=new p.default.Vector(u,f,g),d=y):m instanceof p.default.Color&&u instanceof p.default.Vector&&(l=m,c=u,d=new p.default.Vector(f,g,y));break;case 4:l=m,c=u,d=f,s=g;break;case 3:l=m,c=u,d=f;break;default:return console.warn("Sorry, input for spotlight() is not in prescribed format. Too ".concat(v<3?"few":"many"," arguments were provided")),this}return this._renderer.spotLightDiffuseColors.push(l._array[0],l._array[1],l._array[2]),Array.prototype.push.apply(this._renderer.spotLightSpecularColors,this._renderer.specularColors),this._renderer.spotLightPositions.push(c.x,c.y,c.z),d.normalize(),this._renderer.spotLightDirections.push(d.x,d.y,d.z),s===void 0&&(s=Math.PI/3),n!==void 0&&n<1?(n=1,console.warn("Value of concentration needs to be greater than 1. Setting it to 1")):n===void 0&&(n=100),s=this._renderer._pInst._toRadians(s),this._renderer.spotLightAngle.push(Math.cos(s)),this._renderer.spotLightConc.push(n),this._renderer._enableLighting=!0,this},p.default.prototype.noLights=function(){this._assert3d("noLights");for(var m=arguments.length,u=new Array(m),f=0;f<m;f++)u[f]=arguments[f];return p.default._validateParameters("noLights",u),this._renderer.activeImageLight=null,this._renderer._enableLighting=!1,this._renderer.ambientLightColors.length=0,this._renderer.specularColors=[1,1,1],this._renderer.directionalLightDirections.length=0,this._renderer.directionalLightDiffuseColors.length=0,this._renderer.directionalLightSpecularColors.length=0,this._renderer.pointLightPositions.length=0,this._renderer.pointLightDiffuseColors.length=0,this._renderer.pointLightSpecularColors.length=0,this._renderer.spotLightPositions.length=0,this._renderer.spotLightDirections.length=0,this._renderer.spotLightDiffuseColors.length=0,this._renderer.spotLightSpecularColors.length=0,this._renderer.spotLightAngle.length=0,this._renderer.spotLightConc.length=0,this._renderer.constantAttenuation=1,this._renderer.linearAttenuation=0,this._renderer.quadraticAttenuation=0,this._renderer._useShininess=1,this._renderer._useMetalness=0,this},t=p.default,C.default=t},{"../core/main":283,"core-js/modules/es.array.filter":157}],330:[function(t,W,C){"use strict";function p(s){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t("regenerator-runtime/runtime");var m=(i=t("../core/main"))&&i.__esModule?i:{default:i};function u(s){return(function(n){if(Array.isArray(n)){for(var l=0,c=new Array(n.length);l<n.length;l++)c[l]=n[l];return c}})(s)||(function(n){if(Symbol.iterator in Object(n)||Object.prototype.toString.call(n)==="[object Arguments]")return Array.from(n)})(s)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}function f(s,n,l,c,d,v,S){try{var E=s[v](S),_=E.value}catch(x){return void l(x)}E.done?n(_):Promise.resolve(_).then(c,d)}function g(s){return function(){var n=this,l=arguments;return new Promise(function(c,d){var v=s.apply(n,l);function S(_){f(v,c,d,S,E,"next",_)}function E(_){f(v,c,d,S,E,"throw",_)}S(void 0)})}}function y(s){return(y=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(n){return p(n)}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":p(n)})(s)}function o(s,n,l){for(var c=2<arguments.length&&l!==void 0?l:{},d={v:[],vt:[],vn:[]},v={},S=null,E=new Set,_=!1,x=!1,O=0;O<n.length;++O){var T=n[O].trim().split(/\b\s+/);if(0<T.length){if(T[0]==="usemtl")S=T[1];else if(T[0]==="v"||T[0]==="vn"){var P=new m.default.Vector(parseFloat(T[1]),parseFloat(T[2]),parseFloat(T[3]));d[T[0]].push(P)}else if(T[0]==="vt")P=[parseFloat(T[1]),1-parseFloat(T[2])],d[T[0]].push(P);else if(T[0]==="f")for(var M=3;M<T.length;++M){for(var F=[],D=[1,M-1,M],A=0;A<D.length;++A){for(var z,G=T[D[A]],U=G.split("/"),H=0;H<U.length;H++)U[H]=parseInt(U[H])-1;v[G]||(v[G]={}),v[G][S]===void 0?(z=s.vertices.length,s.vertices.push(d.v[U[0]].copy()),s.uvs.push(d.vt[U[1]]?d.vt[U[1]].slice():[0,0]),s.vertexNormals.push(d.vn[U[2]]?d.vn[U[2]].copy():new m.default.Vector),v[G][S]=z,F.push(z),S&&c[S]&&c[S].diffuseColor&&E.add(d.v[U[0]])):F.push(v[G][S])}if(F[0]!==F[1]&&F[0]!==F[2]&&F[1]!==F[2])if(s.faces.push(F),S&&c[S]&&c[S].diffuseColor)for(var _=_=!0,Y=c[S].diffuseColor,oe=0;oe<F.length;oe++)s.vertexColors.push(Y[0]),s.vertexColors.push(Y[1]),s.vertexColors.push(Y[2]);else x=!0}}}if(s.vertexNormals.length===0&&s.computeNormals(),_===x)throw new Error("Model coloring is inconsistent. Either all vertices should have colors or none should.")}function a(s,n){if((function(ue){for(var Q=new DataView(ue),le=[115,111,108,105,100],fe=0;fe<5;fe++)if((function(ve,he,me){for(var _e=0,Ae=ve.length;_e<Ae;_e++)if(ve[_e]!==he.getUint8(me+_e,!1))return;return 1})(le,Q,fe))return;return 1})(n)){for(var l,c,d,v,S,E,_,x=s,O=new DataView(n),T=O.getUint32(80,!0),P=!1,M=0;M<70;M++)O.getUint32(M,!1)===1129270351&&O.getUint8(M+4)===82&&O.getUint8(M+5)===61&&(P=!0,v=[],S=O.getUint8(M+6)/255,E=O.getUint8(M+7)/255,_=O.getUint8(M+8)/255);for(var F=0;F<T;F++){for(var D,A=84+50*F,z=O.getFloat32(A,!0),G=O.getFloat32(4+A,!0),U=O.getFloat32(8+A,!0),H=(P&&(D=O.getUint16(48+A,!0),d=(32768&D)==0?(l=(31&D)/31,c=(D>>5&31)/31,(D>>10&31)/31):(l=S,c=E,_)),new m.default.Vector(z,G,U)),Y=1;Y<=3;Y++){var oe=A+12*Y,oe=new m.default.Vector(O.getFloat32(oe,!0),O.getFloat32(4+oe,!0),O.getFloat32(8+oe,!0));x.vertices.push(oe),x.vertexNormals.push(H),P&&v.push(l,c,d)}x.faces.push([3*F,3*F+1,3*F+2]),x.uvs.push([0,0],[0,0],[0,0])}}else if(n=new DataView(n),"TextDecoder"in window)for(var L,j,R=s,N=new TextDecoder("utf-8").decode(n).split(`
`),X="",K=[],re=0;re<N.length;++re){for(var ie=N[re].trim(),ee=ie.split(" "),ae=0;ae<ee.length;++ae)ee[ae]===""&&ee.splice(ae,1);if(ee.length!==0)switch(X){case"":if(ee[0]!=="solid")return console.error(ie),void console.error('Invalid state "'.concat(ee[0],'", should be "solid"'));X="solid";break;case"solid":if(ee[0]!=="facet"||ee[1]!=="normal")return console.error(ie),void console.error('Invalid state "'.concat(ee[0],'", should be "facet normal"'));L=new m.default.Vector(parseFloat(ee[2]),parseFloat(ee[3]),parseFloat(ee[4])),R.vertexNormals.push(L,L,L),X="facet normal";break;case"facet normal":if(ee[0]!=="outer"||ee[1]!=="loop")return console.error(ie),void console.error('Invalid state "'.concat(ee[0],'", should be "outer loop"'));X="vertex";break;case"vertex":if(ee[0]==="vertex")j=new m.default.Vector(parseFloat(ee[1]),parseFloat(ee[2]),parseFloat(ee[3])),R.vertices.push(j),R.uvs.push([0,0]),K.push(R.vertices.indexOf(j));else{if(ee[0]!=="endloop")return console.error(ie),void console.error('Invalid state "'.concat(ee[0],'", should be "vertex" or "endloop"'));R.faces.push(K),K=[],X="endloop"}break;case"endloop":if(ee[0]!=="endfacet")return console.error(ie),void console.error('Invalid state "'.concat(ee[0],'", should be "endfacet"'));X="endfacet";break;case"endfacet":if(ee[0]!=="endsolid"){if(ee[0]!=="facet"||ee[1]!=="normal")return console.error(ie),void console.error('Invalid state "'.concat(ee[0],'", should be "endsolid" or "facet normal"'));L=new m.default.Vector(parseFloat(ee[2]),parseFloat(ee[3]),parseFloat(ee[4])),R.vertexNormals.push(L,L,L),X="facet normal"}break;default:console.error('Invalid state "'.concat(X,'"'))}}else console.warn("Sorry, ASCII STL loading only works in browsers that support TextDecoder (https://caniuse.com/#feat=textencoder)")}t("./p5.Geometry"),m.default.prototype.loadModel=function(s,n){m.default._validateParameters("loadModel",arguments);var l,c,d=!1,v=!1,S=!1,E=s.slice(-4),_=(n&&y(n)==="object"?(d=n.normalize||!1,l=n.successCallback,c=n.failureCallback,E=n.fileType||E,v=n.flipU||!1,S=n.flipV||!1):typeof n=="boolean"?(d=n,l=arguments[2],c=arguments[3],arguments[4]!==void 0&&(E=arguments[4])):(l=typeof n=="function"?n:void 0,c=arguments[2],arguments[3]!==void 0&&(E=arguments[3])),new m.default.Geometry),x=(_.gid="".concat(s,"|").concat(d),this);function O(){return(O=g(regeneratorRuntime.mark(function P(M){var F,D,A,z;return regeneratorRuntime.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:for(F=[],D=0;D<M.length;D++)(A=M[D].match(/^mtllib (.+)/))&&(function(){var U="",H=A[1],Y=s.split("/");U=1<Y.length?(Y.pop(),Y.join("/")+"/"+H):H,F.push((function(){return T.apply(this,arguments)})(U).then(function(oe){return oe?(L=x,j=U,new Promise(function(R,N){var X=null,K={};L.loadStrings(j,function(re){for(var ie=0;ie<re.length;++ie){var ee,ae=re[ie].trim().split(/\s+/);ae[0]==="newmtl"?(ee=ae[1],K[X=ee]={}):ae[0]==="Kd"?K[X].diffuseColor=[parseFloat(ae[1]),parseFloat(ae[2]),parseFloat(ae[3])]:ae[0]==="Ka"?K[X].ambientColor=[parseFloat(ae[1]),parseFloat(ae[2]),parseFloat(ae[3])]:ae[0]==="Ks"?K[X].specularColor=[parseFloat(ae[1]),parseFloat(ae[2]),parseFloat(ae[3])]:ae[0]==="map_Kd"&&(K[X].texturePath=ae[1])}R(K)},N)})):(console.warn("MTL file not found or error in parsing; proceeding without materials: ".concat(U)),{});var L,j}).catch(function(oe){return console.warn("Error loading MTL file: ".concat(U),oe),{}}))})();return G.prev=2,G.next=5,Promise.all(F);case 5:return z=G.sent,z=Object.assign.apply(Object,[{}].concat(u(z))),G.abrupt("return",z);case 10:return G.prev=10,G.t0=G.catch(2),G.abrupt("return",{});case 13:case"end":return G.stop()}},P,null,[[2,10]])}))).apply(this,arguments)}function T(){return(T=g(regeneratorRuntime.mark(function P(M){var F;return regeneratorRuntime.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.prev=0,D.next=3,fetch(M,{method:"HEAD"});case 3:return F=D.sent,D.abrupt("return",F.ok);case 7:return D.prev=7,D.t0=D.catch(0),D.abrupt("return",!1);case 10:case"end":return D.stop()}},P,null,[[0,7]])}))).apply(this,arguments)}return E.match(/\.stl$/i)?this.httpDo(s,"GET","arrayBuffer",function(P){a(_,P),d&&_.normalize(),v&&_.flipU(),S&&_.flipV(),x._decrementPreload(),typeof l=="function"&&l(_)},c):E.match(/\.obj$/i)?this.loadStrings(s,(function(){var P=g(regeneratorRuntime.mark(function M(F){var D;return regeneratorRuntime.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.prev=0,A.next=3,(function(){return O.apply(this,arguments)})(F);case 3:D=A.sent,o(_,F,D),A.next=11;break;case 7:return A.prev=7,A.t0=A.catch(0),c?c(A.t0):m.default._friendlyError("Error during parsing: "+A.t0.message),A.abrupt("return");case 11:return A.prev=11,d&&_.normalize(),v&&_.flipU(),S&&_.flipV(),_._makeTriangleEdges(),x._decrementPreload(),typeof l=="function"&&l(_),A.finish(11);case 19:case"end":return A.stop()}},M,null,[[0,7,11,19]])}));return function(M){return P.apply(this,arguments)}})(),c):(m.default._friendlyFileLoadError(3,s),c?c():m.default._friendlyError("Sorry, the file type is invalid. Only OBJ and STL files are supported.")),_},m.default.prototype.model=function(s){this._assert3d("model"),m.default._validateParameters("model",arguments),0<s.vertices.length&&(this._renderer.geometryInHash(s.gid)||(s._edgesToVertices(),this._renderer.createBuffers(s.gid,s)),this._renderer.drawBuffers(s.gid))};var r=0,i=(m.default.prototype.createModel=function(s){var n,l,c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:" ",E=2<arguments.length?arguments[2]:void 0,d=(m.default._validateParameters("createModel",arguments),!1),v=!1,S=!1,E=(E&&y(E)==="object"?(d=E.normalize||!1,n=E.successCallback,l=E.failureCallback,v=E.flipU||!1,S=E.flipV||!1):l=typeof E=="boolean"?(d=E,n=arguments[3],arguments[4]):(n=typeof arguments[2]=="function"?arguments[2]:void 0,arguments[3]),new m.default.Geometry);if(E.gid="".concat(c,"|").concat(d,"|").concat(r++),c.match(/\.stl$/i))try{a(E,new TextEncoder().encode(s).buffer)}catch(_){return void(l?l(_):m.default._friendlyError("Error during parsing: "+_.message))}else if(c.match(/\.obj$/i))try{o(E,s.split(`
`))}catch(_){return void(l?l(_):m.default._friendlyError("Error during parsing: "+_.message))}else m.default._friendlyFileLoadError(3,s),l?l():m.default._friendlyError("Sorry, the file type is invalid. Only OBJ and STL files are supported.");return d&&E.normalize(),v&&E.flipU(),S&&E.flipV(),E._makeTriangleEdges(),typeof n=="function"&&n(E),E},m.default);C.default=i},{"../core/main":283,"./p5.Geometry":335,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.from":162,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246,"regenerator-runtime/runtime":260}],331:[function(t,W,C){"use strict";function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function m(o){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(a){return p(a)}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":p(a)})(o)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(y=t("../core/main"))&&y.__esModule?y:{default:y},f=(function(o){if(o&&o.__esModule)return o;if(o===null||m(o)!=="object"&&typeof o!="function")return{default:o};var a=g();if(a&&a.has(o))return a.get(o);var r,i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in o){var n;Object.prototype.hasOwnProperty.call(o,r)&&((n=s?Object.getOwnPropertyDescriptor(o,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=o[r])}return i.default=o,a&&a.set(o,i),i})(t("../core/constants"));function g(){var o;return typeof WeakMap!="function"?null:(o=new WeakMap,g=function(){return o},o)}t("./p5.Texture"),u.default.prototype.loadShader=function(o,a,r,i){u.default._validateParameters("loadShader",arguments),i=i||console.error;function s(){l._decrementPreload(),r&&r(n)}var n=new u.default.Shader,l=this,c=!1,d=!1;return this.loadStrings(o,function(v){n._vertSrc=v.join(`
`),d=!0,c&&s()},i),this.loadStrings(a,function(v){n._fragSrc=v.join(`
`),c=!0,d&&s()},i),n},u.default.prototype.createShader=function(o,a,r){return u.default._validateParameters("createShader",arguments),new u.default.Shader(this._renderer,o,a,r)},u.default.prototype.createFilterShader=function(o){u.default._validateParameters("createFilterShader",arguments);var a=o.includes("#version 300 es")?`#version 300 es
    uniform mat4 uModelViewMatrix;
    uniform mat4 uProjectionMatrix;

    in vec3 aPosition;
    in vec2 aTexCoord;
    out vec2 vTexCoord;

    void main() {
      // transferring texcoords for the frag shader
      vTexCoord = aTexCoord;

      // copy position with a fourth coordinate for projection (1.0 is normal)
      vec4 positionVec4 = vec4(aPosition, 1.0);

      // project to 3D space
      gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;
    }
  `:`
    uniform mat4 uModelViewMatrix;
    uniform mat4 uProjectionMatrix;

    attribute vec3 aPosition;
    // texcoords only come from p5 to vertex shader
    // so pass texcoords on to the fragment shader in a varying variable
    attribute vec2 aTexCoord;
    varying vec2 vTexCoord;

    void main() {
      // transferring texcoords for the frag shader
      vTexCoord = aTexCoord;

      // copy position with a fourth coordinate for projection (1.0 is normal)
      vec4 positionVec4 = vec4(aPosition, 1.0);

      // project to 3D space
      gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;
    }
  `,a=new u.default.Shader(this._renderer,a,o);return this._renderer.GL?a.ensureCompiledOnContext(this):a.ensureCompiledOnContext(this._renderer.getFilterGraphicsLayer()),a},u.default.prototype.shader=function(o){return this._assert3d("shader"),u.default._validateParameters("shader",arguments),o.ensureCompiledOnContext(this),o.isStrokeShader()?this._renderer.userStrokeShader=o:(this._renderer.userFillShader=o,this._renderer._useNormalMaterial=!1),o.setDefaultUniforms(),this},u.default.prototype.baseMaterialShader=function(){return this._assert3d("baseMaterialShader"),this._renderer.baseMaterialShader()},u.default.prototype.baseNormalShader=function(){return this._assert3d("baseNormalShader"),this._renderer.baseNormalShader()},u.default.prototype.baseColorShader=function(){return this._assert3d("baseColorShader"),this._renderer.baseColorShader()},u.default.prototype.baseStrokeShader=function(){return this._assert3d("baseStrokeShader"),this._renderer.baseStrokeShader()},u.default.prototype.resetShader=function(){return this._renderer.userFillShader=this._renderer.userStrokeShader=null,this},u.default.prototype.texture=function(o){return this._assert3d("texture"),u.default._validateParameters("texture",arguments),o.gifProperties&&o._animateGif(this),this._renderer.drawMode=f.TEXTURE,this._renderer._useNormalMaterial=!1,this._renderer._tex=o,this._renderer._setProperty("_doFill",!0),this},u.default.prototype.textureMode=function(o){o!==f.IMAGE&&o!==f.NORMAL?console.warn("You tried to set ".concat(o," textureMode only supports IMAGE & NORMAL ")):this._renderer.textureMode=o},u.default.prototype.textureWrap=function(o){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:o,r=(this._renderer.textureWrapX=o,this._renderer.textureWrapY=a,!0),i=!1,s=void 0;try{for(var n,l=this._renderer.textures.values()[Symbol.iterator]();!(r=(n=l.next()).done);r=!0)n.value.setWrapMode(o,a)}catch(c){i=!0,s=c}finally{try{r||l.return==null||l.return()}finally{if(i)throw s}}},u.default.prototype.normalMaterial=function(){this._assert3d("normalMaterial");for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return u.default._validateParameters("normalMaterial",a),this._renderer.drawMode=f.FILL,this._renderer._useSpecularMaterial=!1,this._renderer._useEmissiveMaterial=!1,this._renderer._useNormalMaterial=!0,this._renderer.curFillColor=[1,1,1,1],this._renderer._setProperty("_doFill",!0),this.noStroke(),this},u.default.prototype.ambientMaterial=function(o,a,r){this._assert3d("ambientMaterial"),u.default._validateParameters("ambientMaterial",arguments);var i=u.default.prototype.color.apply(this,arguments);return this._renderer._hasSetAmbient=!0,this._renderer.curAmbientColor=i._array,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._setProperty("_doFill",!0),this},u.default.prototype.emissiveMaterial=function(o,a,r,i){this._assert3d("emissiveMaterial"),u.default._validateParameters("emissiveMaterial",arguments);var s=u.default.prototype.color.apply(this,arguments);return this._renderer.curEmissiveColor=s._array,this._renderer._useEmissiveMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this},u.default.prototype.specularMaterial=function(o,a,r,i){this._assert3d("specularMaterial"),u.default._validateParameters("specularMaterial",arguments);var s=u.default.prototype.color.apply(this,arguments);return this._renderer.curSpecularColor=s._array,this._renderer._useSpecularMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this},u.default.prototype.shininess=function(o){return this._assert3d("shininess"),u.default._validateParameters("shininess",arguments),this._renderer._useShininess=o=o<1?1:o,this},u.default.prototype.metalness=function(o){return this._assert3d("metalness"),o=1-Math.exp(-o/100),this._renderer._useMetalness=o,this},u.default.RendererGL.prototype._applyColorBlend=function(o,s){var r=this.GL,i=this.drawMode===f.TEXTURE,s=s||this.userFillShader||this.userStrokeShader||this.userPointShader||i||this.curBlendMode!==f.BLEND||o[o.length-1]<1||this._isErasing;return s!==this._isBlending&&(s||this.curBlendMode!==f.BLEND&&this.curBlendMode!==f.ADD?r.enable(r.BLEND):r.disable(r.BLEND),r.depthMask(!0),this._isBlending=s),this._applyBlendMode(),o},u.default.RendererGL.prototype._applyBlendMode=function(){if(this._cachedBlendMode!==this.curBlendMode){var o=this.GL;switch(this.curBlendMode){case f.BLEND:o.blendEquation(o.FUNC_ADD),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA);break;case f.ADD:o.blendEquation(o.FUNC_ADD),o.blendFunc(o.ONE,o.ONE);break;case f.REMOVE:o.blendEquation(o.FUNC_ADD),o.blendFunc(o.ZERO,o.ONE_MINUS_SRC_ALPHA);break;case f.MULTIPLY:o.blendEquation(o.FUNC_ADD),o.blendFunc(o.DST_COLOR,o.ONE_MINUS_SRC_ALPHA);break;case f.SCREEN:o.blendEquation(o.FUNC_ADD),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_COLOR);break;case f.EXCLUSION:o.blendEquationSeparate(o.FUNC_ADD,o.FUNC_ADD),o.blendFuncSeparate(o.ONE_MINUS_DST_COLOR,o.ONE_MINUS_SRC_COLOR,o.ONE,o.ONE);break;case f.REPLACE:o.blendEquation(o.FUNC_ADD),o.blendFunc(o.ONE,o.ZERO);break;case f.SUBTRACT:o.blendEquationSeparate(o.FUNC_REVERSE_SUBTRACT,o.FUNC_ADD),o.blendFuncSeparate(o.ONE,o.ONE,o.ONE,o.ONE_MINUS_SRC_ALPHA);break;case f.DARKEST:this.blendExt?(o.blendEquationSeparate(this.blendExt.MIN||this.blendExt.MIN_EXT,o.FUNC_ADD),o.blendFuncSeparate(o.ONE,o.ONE,o.ONE,o.ONE)):console.warn("blendMode(DARKEST) does not work in your browser in WEBGL mode.");break;case f.LIGHTEST:this.blendExt?(o.blendEquationSeparate(this.blendExt.MAX||this.blendExt.MAX_EXT,o.FUNC_ADD),o.blendFuncSeparate(o.ONE,o.ONE,o.ONE,o.ONE)):console.warn("blendMode(LIGHTEST) does not work in your browser in WEBGL mode.");break;default:console.error("Oops! Somehow RendererGL set curBlendMode to an unsupported mode.")}this._isErasing||(this._cachedBlendMode=this.curBlendMode)}};var y=u.default;C.default=y},{"../core/constants":272,"../core/main":283,"./p5.Texture":343,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],332:[function(t,W,C){"use strict";t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.string.sub"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(u,f){for(var g=0;g<f.length;g++){var y=f[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(u,y.key,y)}}p.default.prototype.camera=function(){var u;this._assert3d("camera");for(var f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return p.default._validateParameters("camera",g),(u=this._renderer._curCamera).camera.apply(u,g),this},p.default.prototype.perspective=function(){var u;this._assert3d("perspective");for(var f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return p.default._validateParameters("perspective",g),(u=this._renderer._curCamera).perspective.apply(u,g),this},p.default.prototype.linePerspective=function(u){if(p.default._validateParameters("linePerspective",arguments),!(this._renderer instanceof p.default.RendererGL))throw new Error("linePerspective() must be called in WebGL mode.");if(u===void 0)return this._renderer._curCamera.useLinePerspective;this._renderer._curCamera.useLinePerspective=u},p.default.prototype.ortho=function(){var u;this._assert3d("ortho");for(var f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return p.default._validateParameters("ortho",g),(u=this._renderer._curCamera).ortho.apply(u,g),this},p.default.prototype.frustum=function(){var u;this._assert3d("frustum");for(var f=arguments.length,g=new Array(f),y=0;y<f;y++)g[y]=arguments[y];return p.default._validateParameters("frustum",g),(u=this._renderer._curCamera).frustum.apply(u,g),this},p.default.prototype.createCamera=function(){this._assert3d("createCamera");var u=new p.default.Camera(this._renderer);return u._computeCameraDefaultSettings(),u._setDefaultCamera(),this._renderer._curCamera=u},p.default.Camera=(function(){function u(o){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this._renderer=o,this.cameraType="default",this.useLinePerspective=!0,this.cameraMatrix=new p.default.Matrix,this.projMatrix=new p.default.Matrix,this.yScale=1}var f,g,y;return f=u,(g=[{key:"perspective",value:function(s,a,r,i){this.cameraType=0<arguments.length?"custom":"default",s===void 0?(s=this.defaultCameraFOV,this.cameraFOV=s):this.cameraFOV=this._renderer._pInst._toRadians(s),a===void 0&&(a=this.defaultAspectRatio),r===void 0&&(r=this.defaultCameraNear),i===void 0&&(i=this.defaultCameraFar),r<=1e-4&&(r=.01,console.log("Avoid perspective near plane values close to or below 0. Setting value to 0.01.")),i<r&&console.log("Perspective far plane value is less than near plane value. Nothing will be shown."),this.aspectRatio=a,this.cameraNear=r,this.cameraFar=i,this.projMatrix=p.default.Matrix.identity();var s=1/Math.tan(this.cameraFOV/2),n=1/(this.cameraNear-this.cameraFar);this.projMatrix.set(s/a,0,0,0,0,-s*this.yScale,0,0,0,0,(i+r)*n,-1,0,0,2*i*r*n,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix)}},{key:"ortho",value:function(_,E,r,i,s,n){var x=this.fbo||this._renderer,x=(_===void 0&&(_=-x.width/2),E===void 0&&(E=+x.width/2),r===void 0&&(r=-x.height/2),i===void 0&&(i=+x.height/2),s===void 0&&(s=0),n===void 0&&(n=Math.max(x.width,x.height)+800),this.cameraNear=s,E-_),l=i-r,c=(this.cameraFar=n)-s,d=2/x,v=2/l*this.yScale,S=-2/c,E=-(E+_)/x,_=-(i+r)/l,x=-(n+s)/c;this.projMatrix=p.default.Matrix.identity(),this.projMatrix.set(d,0,0,0,0,-v,0,0,0,0,S,0,E,_,x,1),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix),this.cameraType="custom"}},{key:"frustum",value:function(_,E,r,i,s,n){_===void 0&&(_=.05*-this._renderer.width),E===void 0&&(E=.05*+this._renderer.width),r===void 0&&(r=.05*+this._renderer.height),i===void 0&&(i=.05*-this._renderer.height),s===void 0&&(s=this.defaultCameraNear),n===void 0&&(n=this.defaultCameraFar),this.cameraNear=s;var x=E-_,l=i-r,c=(this.cameraFar=n)-s,d=2*s/x,v=2*s/l*this.yScale,S=-2*n*s/c,E=(E+_)/x,_=(i+r)/l,x=-(n+s)/c;this.projMatrix=p.default.Matrix.identity(),this.projMatrix.set(d,0,0,0,0,-v,0,0,E,_,x,-1,0,0,S,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix),this.cameraType="custom"}},{key:"_rotateView",value:function(d,v,S,E){var s=this.centerX,n=this.centerY,l=this.centerZ,c=(s-=this.eyeX,n-=this.eyeY,l-=this.eyeZ,p.default.Matrix.identity(this._renderer._pInst)),d=(c.rotate(this._renderer._pInst._toRadians(d),v,S,E),[s*c.mat4[0]+n*c.mat4[4]+l*c.mat4[8],s*c.mat4[1]+n*c.mat4[5]+l*c.mat4[9],s*c.mat4[2]+n*c.mat4[6]+l*c.mat4[10]]),v=(d[0]+=this.eyeX,d[1]+=this.eyeY,d[2]+=this.eyeZ,this.upX*c.mat4[0]+this.upY*c.mat4[4]+this.upZ*c.mat4[8]),S=this.upX*c.mat4[1]+this.upY*c.mat4[5]+this.upZ*c.mat4[9],E=this.upX*c.mat4[2]+this.upY*c.mat4[6]+this.upZ*c.mat4[10];this.camera(this.eyeX,this.eyeY,this.eyeZ,d[0],d[1],d[2],v,S,E)}},{key:"roll",value:function(r){var a=this._getLocalAxes(),r=p.default.Quat.fromAxisAngle(this._renderer._pInst._toRadians(r),a.z[0],a.z[1],a.z[2]).rotateVector(new p.default.Vector(this.upX,this.upY,this.upZ));this.camera(this.eyeX,this.eyeY,this.eyeZ,this.centerX,this.centerY,this.centerZ,r.x,r.y,r.z)}},{key:"pan",value:function(o){var a=this._getLocalAxes();this._rotateView(o,a.y[0],a.y[1],a.y[2])}},{key:"tilt",value:function(o){var a=this._getLocalAxes();this._rotateView(o,a.x[0],a.x[1],a.x[2])}},{key:"lookAt",value:function(o,a,r){this.camera(this.eyeX,this.eyeY,this.eyeZ,o,a,r,this.upX,this.upY,this.upZ)}},{key:"camera",value:function(o,a,r,i,s,n,l,c,d){return o===void 0&&(o=this.defaultEyeX,a=this.defaultEyeY,r=this.defaultEyeZ,i=o,s=a,c=1,d=l=n=0),this.eyeX=o,this.eyeY=a,this.eyeZ=r,i!==void 0&&(this.centerX=i,this.centerY=s,this.centerZ=n),l!==void 0&&(this.upX=l,this.upY=c,this.upZ=d),i=this._getLocalAxes(),this.cameraMatrix.set(i.x[0],i.y[0],i.z[0],0,i.x[1],i.y[1],i.z[1],0,i.x[2],i.y[2],i.z[2],0,0,0,0,1),s=-o,this.cameraMatrix.translate([s,-a,-r]),this._isActive()&&this._renderer.uViewMatrix.set(this.cameraMatrix),this}},{key:"move",value:function(i,s,r){var n=this._getLocalAxes(),i=[n.x[0]*i,n.x[1]*i,n.x[2]*i],s=[n.y[0]*s,n.y[1]*s,n.y[2]*s],n=[n.z[0]*r,n.z[1]*r,n.z[2]*r];this.camera(this.eyeX+i[0]+s[0]+n[0],this.eyeY+i[1]+s[1]+n[1],this.eyeZ+i[2]+s[2]+n[2],this.centerX+i[0]+s[0]+n[0],this.centerY+i[1]+s[1]+n[1],this.centerZ+i[2]+s[2]+n[2],this.upX,this.upY,this.upZ)}},{key:"setPosition",value:function(o,a,r){var i=o-this.eyeX,s=a-this.eyeY,n=r-this.eyeZ;this.camera(o,a,r,this.centerX+i,this.centerY+s,this.centerZ+n,this.upX,this.upY,this.upZ)}},{key:"set",value:function(o){for(var a=0,r=["eyeX","eyeY","eyeZ","centerX","centerY","centerZ","upX","upY","upZ","cameraFOV","aspectRatio","cameraNear","cameraFar","cameraType","yScale","useLinePerspective"];a<r.length;a++){var i=r[a];this[i]=o[i]}this.cameraMatrix=o.cameraMatrix.copy(),this.projMatrix=o.projMatrix.copy(),this._isActive()&&(this._renderer.uModelMatrix.reset(),this._renderer.uViewMatrix.set(this.cameraMatrix),this._renderer.uPMatrix.set(this.projMatrix))}},{key:"slerp",value:function(o,a,r){var i,s,n,l,c,d,v,S,E,_,x,O,T,P,M,F,D,A;r===0?this.set(o):r===1?this.set(a):(this.projMatrix.mat4[15]!==0&&(this.projMatrix.mat4[0]=o.projMatrix.mat4[0]*Math.pow(a.projMatrix.mat4[0]/o.projMatrix.mat4[0],r),this.projMatrix.mat4[5]=o.projMatrix.mat4[5]*Math.pow(a.projMatrix.mat4[5]/o.projMatrix.mat4[5],r),this._isActive()&&(this._renderer.uPMatrix.mat4=this.projMatrix.mat4.slice())),l=new p.default.Vector(o.eyeX,o.eyeY,o.eyeZ),c=new p.default.Vector(a.eyeX,a.eyeY,a.eyeZ),F=new p.default.Vector(o.centerX,o.centerY,o.centerZ),A=new p.default.Vector(a.centerX,a.centerY,a.centerZ),n=p.default.Vector.dist(l,F),i=p.default.Vector.dist(c,A),i=n*Math.pow(i/n,r),n=p.default.Vector.sub(l,c),s=1,1e-6<(D=(P=l.copy().sub(c).sub(F).add(A)).magSq())&&(s=p.default.Vector.dot(n,P)/D,s=Math.max(0,Math.min(s,1))),n=p.default.Vector.lerp(p.default.Vector.lerp(l,F,s),p.default.Vector.lerp(c,A,s),r),P=o.cameraMatrix.createSubMatrix3x3(),D=a.cameraMatrix.createSubMatrix3x3(),l=P.row(2),F=D.row(2),c=P.row(1),A=D.row(1),o=new p.default.Vector,a=new p.default.Vector,d=new p.default.Vector,v=new p.default.Vector,1-(S=.5*((P=(D=D.mult3x3(P.copy().transpose3x3())).diagonal())[0]+P[1]+P[2]-1))<1e-7?(o.set(p.default.Vector.lerp(l,F,r)).normalize(),d.set(o).mult(s*i).add(n),v.set(o).mult((s-1)*i).add(n),a.set(p.default.Vector.lerp(c,A,r)).normalize()):(F=1/(1-S),A=Math.max(P[0],P[1],P[2]),O=D.mat3[1]+D.mat3[3],T=D.mat3[2]+D.mat3[6],M=D.mat3[5]+D.mat3[7],A=A===P[0]?(_=.5*O*(F/=E=Math.sqrt((P[0]-S)*F)),x=.5*T*F,.5*(D.mat3[7]-D.mat3[5])/E):A===P[1]?(x=.5*M*(F/=_=Math.sqrt((P[1]-S)*F)),E=.5*O*F,.5*(D.mat3[2]-D.mat3[6])/_):(E=.5*T*(F/=x=Math.sqrt((P[2]-S)*F)),_=.5*M*F,.5*(D.mat3[3]-D.mat3[1])/x),O=r*Math.atan2(A,S),T=Math.cos(O),P=Math.sin(O),(A=new p.default.Matrix("mat3",[T+(M=1-T)*E*E,M*(F=E*_)+P*x,M*(D=x*E)-P*_,M*F-P*x,T+M*_*_,M*(r=_*x)+P*E,M*D+P*_,M*r-P*E,T+M*x*x])).multiplyVec3(l,o),d.set(o).mult(s*i).add(n),v.set(o).mult((s-1)*i).add(n),A.multiplyVec3(c,a)),this.camera(d.x,d.y,d.z,v.x,v.y,v.z,a.x,a.y,a.z))}},{key:"_computeCameraDefaultSettings",value:function(){this.defaultAspectRatio=this._renderer.width/this._renderer.height,this.defaultEyeX=0,this.defaultEyeY=0,this.defaultEyeZ=800,this.defaultCameraFOV=2*Math.atan(this._renderer.height/2/this.defaultEyeZ),this.defaultCenterX=0,this.defaultCenterY=0,this.defaultCenterZ=0,this.defaultCameraNear=.1*this.defaultEyeZ,this.defaultCameraFar=10*this.defaultEyeZ}},{key:"_setDefaultCamera",value:function(){this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.eyeX=this.defaultEyeX,this.eyeY=this.defaultEyeY,this.eyeZ=this.defaultEyeZ,this.centerX=this.defaultCenterX,this.centerY=this.defaultCenterY,this.centerZ=this.defaultCenterZ,this.upX=0,this.upY=1,this.upZ=0,this.cameraNear=this.defaultCameraNear,this.cameraFar=this.defaultCameraFar,this.perspective(),this.camera(),this.cameraType="default"}},{key:"_resize",value:function(){this.cameraType==="default"&&(this._computeCameraDefaultSettings(),this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.perspective())}},{key:"copy",value:function(){var o=new p.default.Camera(this._renderer);return o.cameraFOV=this.cameraFOV,o.aspectRatio=this.aspectRatio,o.eyeX=this.eyeX,o.eyeY=this.eyeY,o.eyeZ=this.eyeZ,o.centerX=this.centerX,o.centerY=this.centerY,o.centerZ=this.centerZ,o.upX=this.upX,o.upY=this.upY,o.upZ=this.upZ,o.cameraNear=this.cameraNear,o.cameraFar=this.cameraFar,o.cameraType=this.cameraType,o.useLinePerspective=this.useLinePerspective,o.cameraMatrix=this.cameraMatrix.copy(),o.projMatrix=this.projMatrix.copy(),o.yScale=this.yScale,o}},{key:"_getLocalAxes",value:function(){var o=this.eyeX-this.centerX,a=this.eyeY-this.centerY,r=this.eyeZ-this.centerZ,l=Math.sqrt(o*o+a*a+r*r),l=(l!==0&&(o/=l,a/=l,r/=l),this.upX),i=(c=this.upY)*r-(d=this.upZ)*a,s=-l*r+d*o,n=l*a-c*o,l=a*n-r*s,c=-o*n+r*i,d=o*s-a*i,v=Math.sqrt(i*i+s*s+n*n),v=(v!==0&&(i/=v,s/=v,n/=v),Math.sqrt(l*l+c*c+d*d));return v!==0&&(l/=v,c/=v,d/=v),{x:[i,s,n],y:[l,c,d],z:[o,a,r]}}},{key:"_orbit",value:function(o,v,d){var s=this.eyeX-this.centerX,n=this.eyeY-this.centerY,l=this.eyeZ-this.centerZ,i=Math.hypot(s,n,l),s=new p.default.Vector(s,n,l).normalize(),n=new p.default.Vector(this.upX,this.upY,this.upZ).normalize(),l=p.default.Vector.cross(n,s).normalize(),c=p.default.Vector.cross(l,n),d=((i=(i*=Math.pow(10,d))<this.cameraNear?this.cameraNear:i)>this.cameraFar&&(i=this.cameraFar),Math.acos(Math.max(-1,Math.min(1,p.default.Vector.dot(s,n))))+v),v=o;(d<=0||d>=Math.PI)&&(this.upX*=-1,this.upY*=-1,this.upZ*=-1),n.mult(Math.cos(d)),c.mult(Math.cos(v)*Math.sin(d)),l.mult(Math.sin(v)*Math.sin(d)),s.set(n).add(c).add(l),this.eyeX=i*s.x+this.centerX,this.eyeY=i*s.y+this.centerY,this.eyeZ=i*s.z+this.centerZ,this.camera(this.eyeX,this.eyeY,this.eyeZ,this.centerX,this.centerY,this.centerZ,this.upX,this.upY,this.upZ)}},{key:"_orbitFree",value:function(d,v,E){var s=this.eyeX-this.centerX,n=this.eyeY-this.centerY,l=this.eyeZ-this.centerZ,i=Math.hypot(s,n,l),s=new p.default.Vector(s,n,l).normalize(),n=new p.default.Vector(this.upX,this.upY,this.upZ),l=p.default.Vector.cross(n,s).normalize(),c=p.default.Vector.cross(s,l),_=Math.atan2(v,d),_=(c.mult(Math.sin(_)),l.mult(Math.cos(_)).add(c),Math.sqrt(d*d+v*v)),c=p.default.Vector.cross(s,l),d=((i=(i*=Math.pow(10,E))<this.cameraNear?this.cameraNear:i)>this.cameraFar&&(i=this.cameraFar),Math.cos(_)),v=Math.sin(_),E=n.dot(s),_=n.dot(l),S=E*d+_*v,E=-E*v+_*d,_=n.dot(c);n.x=S*s.x+E*l.x+_*c.x,n.y=S*s.y+E*l.y+_*c.y,n.z=S*s.z+E*l.z+_*c.z,l.mult(-v),s.mult(d).add(l).mult(i),this.camera(s.x+this.centerX,s.y+this.centerY,s.z+this.centerZ,this.centerX,this.centerY,this.centerZ,n.x,n.y,n.z)}},{key:"_isActive",value:function(){return this===this._renderer._curCamera}}])&&m(f.prototype,g),y&&m(f,y),u})(),p.default.prototype.setCamera=function(u){this._renderer._curCamera=u,this._renderer.uPMatrix.set(u.projMatrix),this._renderer.uViewMatrix.set(u.cameraMatrix)},t=p.default.Camera,C.default=t},{"../core/main":283,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.hypot":176,"core-js/modules/es.string.sub":208}],333:[function(t,W,C){"use strict";t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.log2"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.log2"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t};function p(m,u){for(var f=0;f<u.length;f++){var g=u[f];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}t.default.DataArray=(function(){function m(){var y=0<arguments.length&&arguments[0]!==void 0?arguments[0]:128,o=this,a=m;if(!(o instanceof a))throw new TypeError("Cannot call a class as a function");this.length=0,this.data=new Float32Array(y),this.initialLength=y}var u,f,g;return u=m,(f=[{key:"dataArray",value:function(){return this.subArray(0,this.length)}},{key:"clear",value:function(){this.length=0}},{key:"rescale",value:function(){var y;this.length<this.data.length/2&&(y=1<<Math.ceil(Math.log2(this.length)),(y=new Float32Array(y)).set(this.data.subarray(0,this.length),0),this.data=y)}},{key:"reset",value:function(){this.clear(),this.data=new Float32Array(this.initialLength)}},{key:"push",value:function(){for(var y=arguments.length,o=new Array(y),a=0;a<y;a++)o[a]=arguments[a];this.ensureLength(this.length+o.length),this.data.set(o,this.length),this.length+=o.length}},{key:"slice",value:function(y,o){return this.data.slice(y,Math.min(o,this.length))}},{key:"subArray",value:function(y,o){return this.data.subarray(y,Math.min(o,this.length))}},{key:"ensureLength",value:function(y){for(;this.data.length<y;){var o=new Float32Array(2*this.data.length);o.set(this.data,0),this.data=o}}}])&&p(u.prototype,f),g&&p(u,g),m})(),t=t.default.DataArray,C.default=t},{"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.log2":177,"core-js/modules/es.object.to-string":190,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239}],334:[function(x,W,C){"use strict";function p(O){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T})(O)}function m(O){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(T){return p(T)}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":p(T)})(O)}x("core-js/modules/es.symbol"),x("core-js/modules/es.symbol.description"),x("core-js/modules/es.symbol.iterator"),x("core-js/modules/es.array.fill"),x("core-js/modules/es.array.includes"),x("core-js/modules/es.array.iterator"),x("core-js/modules/es.object.get-own-property-descriptor"),x("core-js/modules/es.object.get-prototype-of"),x("core-js/modules/es.object.to-string"),x("core-js/modules/es.reflect.construct"),x("core-js/modules/es.reflect.get"),x("core-js/modules/es.regexp.to-string"),x("core-js/modules/es.string.includes"),x("core-js/modules/es.string.iterator"),x("core-js/modules/es.typed-array.float32-array"),x("core-js/modules/es.typed-array.uint8-array"),x("core-js/modules/es.typed-array.uint8-clamped-array"),x("core-js/modules/es.typed-array.copy-within"),x("core-js/modules/es.typed-array.every"),x("core-js/modules/es.typed-array.fill"),x("core-js/modules/es.typed-array.filter"),x("core-js/modules/es.typed-array.find"),x("core-js/modules/es.typed-array.find-index"),x("core-js/modules/es.typed-array.for-each"),x("core-js/modules/es.typed-array.includes"),x("core-js/modules/es.typed-array.index-of"),x("core-js/modules/es.typed-array.iterator"),x("core-js/modules/es.typed-array.join"),x("core-js/modules/es.typed-array.last-index-of"),x("core-js/modules/es.typed-array.map"),x("core-js/modules/es.typed-array.reduce"),x("core-js/modules/es.typed-array.reduce-right"),x("core-js/modules/es.typed-array.reverse"),x("core-js/modules/es.typed-array.set"),x("core-js/modules/es.typed-array.slice"),x("core-js/modules/es.typed-array.some"),x("core-js/modules/es.typed-array.sort"),x("core-js/modules/es.typed-array.subarray"),x("core-js/modules/es.typed-array.to-locale-string"),x("core-js/modules/es.typed-array.to-string"),x("core-js/modules/es.weak-map"),x("core-js/modules/web.dom-collections.iterator"),x("core-js/modules/es.array.fill"),x("core-js/modules/es.array.includes"),x("core-js/modules/es.array.iterator"),x("core-js/modules/es.object.get-prototype-of"),x("core-js/modules/es.object.to-string"),x("core-js/modules/es.string.includes"),x("core-js/modules/es.typed-array.float32-array"),x("core-js/modules/es.typed-array.uint8-array"),x("core-js/modules/es.typed-array.uint8-clamped-array"),x("core-js/modules/es.typed-array.copy-within"),x("core-js/modules/es.typed-array.every"),x("core-js/modules/es.typed-array.fill"),x("core-js/modules/es.typed-array.filter"),x("core-js/modules/es.typed-array.find"),x("core-js/modules/es.typed-array.find-index"),x("core-js/modules/es.typed-array.for-each"),x("core-js/modules/es.typed-array.includes"),x("core-js/modules/es.typed-array.index-of"),x("core-js/modules/es.typed-array.iterator"),x("core-js/modules/es.typed-array.join"),x("core-js/modules/es.typed-array.last-index-of"),x("core-js/modules/es.typed-array.map"),x("core-js/modules/es.typed-array.reduce"),x("core-js/modules/es.typed-array.reduce-right"),x("core-js/modules/es.typed-array.reverse"),x("core-js/modules/es.typed-array.set"),x("core-js/modules/es.typed-array.slice"),x("core-js/modules/es.typed-array.some"),x("core-js/modules/es.typed-array.sort"),x("core-js/modules/es.typed-array.subarray"),x("core-js/modules/es.typed-array.to-locale-string"),x("core-js/modules/es.typed-array.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(_=x("../core/main"))&&_.__esModule?_:{default:_},f=(function(O){if(O&&O.__esModule)return O;if(O===null||m(O)!=="object"&&typeof O!="function")return{default:O};var T=o();if(T&&T.has(O))return T.get(O);var P,M={},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(P in O){var D;Object.prototype.hasOwnProperty.call(O,P)&&((D=F?Object.getOwnPropertyDescriptor(O,P):null)&&(D.get||D.set)?Object.defineProperty(M,P,D):M[P]=O[P])}return M.default=O,T&&T.set(O,M),M})(x("../core/constants")),g=x("./p5.Texture"),y=x("./p5.RendererGL");function o(){var O;return typeof WeakMap!="function"?null:(O=new WeakMap,o=function(){return O},O)}function a(O,T){return(function(P){if(Array.isArray(P))return P})(O)||(function(P,M){if(Symbol.iterator in Object(P)||Object.prototype.toString.call(P)==="[object Arguments]"){var F=[],D=!0,A=!1,z=void 0;try{for(var G,U=P[Symbol.iterator]();!(D=(G=U.next()).done)&&(F.push(G.value),!M||F.length!==M);D=!0);}catch(H){A=!0,z=H}finally{try{D||U.return==null||U.return()}finally{if(A)throw z}}return F}})(O,T)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")})()}function r(O,T,P){return T in O?Object.defineProperty(O,T,{value:P,enumerable:!0,configurable:!0,writable:!0}):O[T]=P,O}function i(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}function s(O,T){for(var P=0;P<T.length;P++){var M=T[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}function n(O,T,P){T&&s(O.prototype,T),P&&s(O,P)}function l(O,T,P){return(l=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(A,F,D){var A=(function(z,G){for(;!Object.prototype.hasOwnProperty.call(z,G)&&(z=v(z))!==null;);return z})(A,F);if(A)return(A=Object.getOwnPropertyDescriptor(A,F)).get?A.get.call(D):A.value})(O,T,P||O)}function c(O,T){return(c=Object.setPrototypeOf||function(P,M){return P.__proto__=M,P})(O,T)}function d(O){return function(){var T,P=v(O),P=(T=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(T=v(this).constructor,Reflect.construct(P,arguments,T)):P.apply(this,arguments),this);if(!T||m(T)!=="object"&&typeof T!="function"){if(P!==void 0)return P;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return T}}function v(O){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)})(O)}var S=(function(O){var T=M;if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(O&&O.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),O&&c(T,O);var P=d(M);function M(F){var D;return i(this,M),(D=P.call(this,F.target._renderer)).fbo=F,D.yScale=-1,D}return n(M,[{key:"_computeCameraDefaultSettings",value:function(){l(v(M.prototype),"_computeCameraDefaultSettings",this).call(this),this.defaultAspectRatio=this.fbo.width/this.fbo.height,this.defaultCameraFOV=2*Math.atan(this.fbo.height/2/this.defaultEyeZ)}}]),M})(u.default.Camera),E=(u.default.FramebufferCamera=S,(function(){function O(T,P){i(this,O),this.framebuffer=T,this.property=P}return n(O,[{key:"rawTexture",value:function(){return this.framebuffer[this.property]}},{key:"width",get:function(){return this.framebuffer.width*this.framebuffer.density}},{key:"height",get:function(){return this.framebuffer.height*this.framebuffer.density}}]),O})()),_=(u.default.FramebufferTexture=E,(function(){function O(T){var P=this,M=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},F=(i(this,O),this.target=T,this.target._renderer.framebuffers.add(this),this._isClipApplied=!1,this.pixels=[],this.format=M.format||f.UNSIGNED_BYTE,this.channels=M.channels||(T._renderer._pInst._glAttributes.alpha?f.RGBA:f.RGB),this.useDepth=M.depth===void 0||M.depth,this.depthFormat=M.depthFormat||f.FLOAT,this.textureFiltering=M.textureFiltering||f.LINEAR,M.antialias===void 0?this.antialiasSamples=T._renderer._pInst._glAttributes.antialias?2:0:typeof M.antialias=="number"?this.antialiasSamples=M.antialias:this.antialiasSamples=M.antialias?2:0,this.antialias=0<this.antialiasSamples,this.antialias&&T.webglVersion!==f.WEBGL2&&(console.warn("Antialiasing is unsupported in a WebGL 1 context"),this.antialias=!1),this.density=M.density||T.pixelDensity(),T._renderer.GL);if(this.gl=F,M.width&&M.height?(D=T._renderer._adjustDimensions(M.width,M.height),this.width=D.adjustedWidth,this.height=D.adjustedHeight,this._autoSized=!1):(M.width===void 0!=(M.height===void 0)&&console.warn("Please supply both width and height for a framebuffer to give it a size. Only one was given, so the framebuffer will match the size of its canvas."),this.width=T.width,this.height=T.height,this._autoSized=!0),this._checkIfFormatsAvailable(),M.stencil&&!this.useDepth&&console.warn("A stencil buffer can only be used if also using depth. Since the framebuffer has no depth buffer, the stencil buffer will be ignored."),this.useStencil=this.useDepth&&(M.stencil===void 0||M.stencil),this.framebuffer=F.createFramebuffer(),!this.framebuffer)throw new Error("Unable to create a framebuffer");if(this.antialias&&(this.aaFramebuffer=F.createFramebuffer(),!this.aaFramebuffer))throw new Error("Unable to create a framebuffer for antialiasing");this._recreateTextures();var D=this.target._renderer._curCamera;this.defaultCamera=this.createCamera(),this.filterCamera=this.createCamera(),this.target._renderer._curCamera=D,this.draw(function(){return P.target.clear()})}return n(O,[{key:"resize",value:function(T,P){this._autoSized=!1;var M=this.target._renderer._adjustDimensions(T,P);T=M.adjustedWidth,P=M.adjustedHeight,this.width=T,this.height=P,this._handleResize()}},{key:"pixelDensity",value:function(T){if(!T)return this.density;this._autoSized=!1,this.density=T,this._handleResize()}},{key:"autoSized",value:function(T){if(T===void 0)return this._autoSized;this._autoSized=T,this._handleResize()}},{key:"_checkIfFormatsAvailable",value:function(){var T=this.gl,T=(this.useDepth&&this.target.webglVersion===f.WEBGL&&!T.getExtension("WEBGL_depth_texture")&&(console.warn("Unable to create depth textures in this environment. Falling back to a framebuffer without depth."),this.useDepth=!1),this.useDepth&&this.target.webglVersion===f.WEBGL&&this.depthFormat===f.FLOAT&&(console.warn("FLOAT depth format is unavailable in WebGL 1. Defaulting to UNSIGNED_INT."),this.depthFormat=f.UNSIGNED_INT),[f.UNSIGNED_BYTE,f.FLOAT,f.HALF_FLOAT].includes(this.format)||(console.warn("Unknown Framebuffer format. Please use UNSIGNED_BYTE, FLOAT, or HALF_FLOAT. Defaulting to UNSIGNED_BYTE."),this.format=f.UNSIGNED_BYTE),this.useDepth&&![f.UNSIGNED_INT,f.FLOAT].includes(this.depthFormat)&&(console.warn("Unknown Framebuffer depth format. Please use UNSIGNED_INT or FLOAT. Defaulting to FLOAT."),this.depthFormat=f.FLOAT),(0,g.checkWebGLCapabilities)(this.target._renderer));T.float||this.format!==f.FLOAT||(console.warn("This environment does not support FLOAT textures. Falling back to UNSIGNED_BYTE."),this.format=f.UNSIGNED_BYTE),this.useDepth&&!T.float&&this.depthFormat===f.FLOAT&&(console.warn("This environment does not support FLOAT depth textures. Falling back to UNSIGNED_INT."),this.depthFormat=f.UNSIGNED_INT),T.halfFloat||this.format!==f.HALF_FLOAT||(console.warn("This environment does not support HALF_FLOAT textures. Falling back to UNSIGNED_BYTE."),this.format=f.UNSIGNED_BYTE),this.channels===f.RGB&&[f.FLOAT,f.HALF_FLOAT].includes(this.format)&&(console.warn("FLOAT and HALF_FLOAT formats do not work cross-platform with only RGB channels. Falling back to RGBA."),this.channels=f.RGBA)}},{key:"_recreateTextures",value:function(){var T=this.gl,P=(this._updateSize(),T.getParameter(T.TEXTURE_BINDING_2D)),M=T.getParameter(T.FRAMEBUFFER_BINDING),F=T.createTexture();if(!F)throw new Error("Unable to create color texture");T.bindTexture(T.TEXTURE_2D,F);var D=this._glColorFormat();if(T.texImage2D(T.TEXTURE_2D,0,D.internalFormat,this.width*this.density,this.height*this.density,0,D.format,D.type,null),this.colorTexture=F,T.bindFramebuffer(T.FRAMEBUFFER,this.framebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,F,0),this.useDepth){var F=T.createTexture();if(!F)throw new Error("Unable to create depth texture");var A=this._glDepthFormat();T.bindTexture(T.TEXTURE_2D,F),T.texImage2D(T.TEXTURE_2D,0,A.internalFormat,this.width*this.density,this.height*this.density,0,A.format,A.type,null),T.framebufferTexture2D(T.FRAMEBUFFER,this.useStencil?T.DEPTH_STENCIL_ATTACHMENT:T.DEPTH_ATTACHMENT,T.TEXTURE_2D,F,0),this.depthTexture=F}this.antialias&&(this.colorRenderbuffer=T.createRenderbuffer(),T.bindRenderbuffer(T.RENDERBUFFER,this.colorRenderbuffer),T.renderbufferStorageMultisample(T.RENDERBUFFER,Math.max(0,Math.min(this.antialiasSamples,T.getParameter(T.MAX_SAMPLES))),D.internalFormat,this.width*this.density,this.height*this.density),this.useDepth&&(A=this._glDepthFormat(),this.depthRenderbuffer=T.createRenderbuffer(),T.bindRenderbuffer(T.RENDERBUFFER,this.depthRenderbuffer),T.renderbufferStorageMultisample(T.RENDERBUFFER,Math.max(0,Math.min(this.antialiasSamples,T.getParameter(T.MAX_SAMPLES))),A.internalFormat,this.width*this.density,this.height*this.density)),T.bindFramebuffer(T.FRAMEBUFFER,this.aaFramebuffer),T.framebufferRenderbuffer(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.RENDERBUFFER,this.colorRenderbuffer),this.useDepth&&T.framebufferRenderbuffer(T.FRAMEBUFFER,this.useStencil?T.DEPTH_STENCIL_ATTACHMENT:T.DEPTH_ATTACHMENT,T.RENDERBUFFER,this.depthRenderbuffer)),this.useDepth&&(this.depth=new E(this,"depthTexture"),F=T.NEAREST,this.depthP5Texture=new u.default.Texture(this.target._renderer,this.depth,{minFilter:F,magFilter:F}),this.target._renderer.textures.set(this.depth,this.depthP5Texture)),this.color=new E(this,"colorTexture"),D=this.textureFiltering===f.LINEAR?T.LINEAR:T.NEAREST,this.colorP5Texture=new u.default.Texture(this.target._renderer,this.color,{minFilter:D,magFilter:D}),this.target._renderer.textures.set(this.color,this.colorP5Texture),T.bindTexture(T.TEXTURE_2D,P),T.bindFramebuffer(T.FRAMEBUFFER,M)}},{key:"_glColorFormat",value:function(){var T,P,M=this.gl,F=this.format===f.FLOAT?M.FLOAT:this.format===f.HALF_FLOAT?this.target.webglVersion===f.WEBGL2?M.HALF_FLOAT:M.getExtension("OES_texture_half_float").HALF_FLOAT_OES:M.UNSIGNED_BYTE,D=this.channels===f.RGBA?M.RGBA:M.RGB;return{internalFormat:this.target.webglVersion===f.WEBGL2?(r(P={},M.FLOAT,r({},M.RGBA,M.RGBA32F)),r(P,M.HALF_FLOAT,r({},M.RGBA,M.RGBA16F)),r(P,M.UNSIGNED_BYTE,(r(T={},M.RGBA,M.RGBA8),r(T,M.RGB,M.RGB8),T)),P[F][D]):this.format===f.HALF_FLOAT?M.RGBA:D,format:D,type:F}}},{key:"_glDepthFormat",value:function(){var M=this.gl,T=this.useStencil?this.depthFormat===f.FLOAT?M.FLOAT_32_UNSIGNED_INT_24_8_REV:this.target.webglVersion===f.WEBGL2?M.UNSIGNED_INT_24_8:M.getExtension("WEBGL_depth_texture").UNSIGNED_INT_24_8_WEBGL:this.depthFormat===f.FLOAT?M.FLOAT:M.UNSIGNED_INT,P=this.useStencil?M.DEPTH_STENCIL:M.DEPTH_COMPONENT,M=this.useStencil?this.depthFormat===f.FLOAT?M.DEPTH32F_STENCIL8:this.target.webglVersion===f.WEBGL2?M.DEPTH24_STENCIL8:M.DEPTH_STENCIL:this.target.webglVersion===f.WEBGL2?this.depthFormat===f.FLOAT?M.DEPTH_COMPONENT32F:M.DEPTH_COMPONENT24:M.DEPTH_COMPONENT;return{internalFormat:M,format:P,type:T}}},{key:"_updateSize",value:function(){this._autoSized&&(this.width=this.target.width,this.height=this.target.height,this.density=this.target.pixelDensity())}},{key:"_canvasSizeChanged",value:function(){this._autoSized&&this._handleResize()}},{key:"_handleResize",value:function(){var F=this.color,T=this.depth,P=this.colorRenderbuffer,M=this.depthRenderbuffer,F=(this._deleteTexture(F),T&&this._deleteTexture(T),this.gl);P&&F.deleteRenderbuffer(P),M&&F.deleteRenderbuffer(M),this._recreateTextures(),this.defaultCamera._resize()}},{key:"createCamera",value:function(){var T=new S(this);return T._computeCameraDefaultSettings(),T._setDefaultCamera(),this.target._renderer._curCamera=T}},{key:"_deleteTexture",value:function(T){this.gl.deleteTexture(T.rawTexture()),this.target._renderer.textures.delete(T)}},{key:"remove",value:function(){var T=this.gl;this._deleteTexture(this.color),this.depth&&this._deleteTexture(this.depth),T.deleteFramebuffer(this.framebuffer),this.aaFramebuffer&&T.deleteFramebuffer(this.aaFramebuffer),this.depthRenderbuffer&&T.deleteRenderbuffer(this.depthRenderbuffer),this.colorRenderbuffer&&T.deleteRenderbuffer(this.colorRenderbuffer),this.target._renderer.framebuffers.delete(this)}},{key:"begin",value:function(){this.prevFramebuffer=this.target._renderer.activeFramebuffer(),this.prevFramebuffer&&this.prevFramebuffer._beforeEnd(),this.target._renderer.activeFramebuffers.push(this),this._beforeBegin(),this.target.push(),this.target.setCamera(this.defaultCamera),this.target.resetMatrix(),this.target._renderer.uViewMatrix.set(this.target._renderer._curCamera.cameraMatrix),this.target._renderer.uModelMatrix.reset(),this.target._renderer._applyStencilTestIfClipping()}},{key:"_framebufferToBind",value:function(){return this.antialias?this.aaFramebuffer:this.framebuffer}},{key:"_beforeBegin",value:function(){var T=this.gl;T.bindFramebuffer(T.FRAMEBUFFER,this._framebufferToBind()),this.target._renderer.viewport(this.width*this.density,this.height*this.density)}},{key:"_beforeEnd",value:function(){if(this.antialias){var T=this.gl,P=(T.bindFramebuffer(T.READ_FRAMEBUFFER,this.aaFramebuffer),T.bindFramebuffer(T.DRAW_FRAMEBUFFER,this.framebuffer),[[T.COLOR_BUFFER_BIT,this.colorP5Texture.glMagFilter]]);this.useDepth&&P.push([T.DEPTH_BUFFER_BIT,this.depthP5Texture.glMagFilter]);for(var M=0,F=P;M<F.length;M++){var A=a(F[M],2),D=A[0],A=A[1];T.blitFramebuffer(0,0,this.width*this.density,this.height*this.density,0,0,this.width*this.density,this.height*this.density,D,A)}}}},{key:"end",value:function(){var T=this.gl;if(this.target.pop(),this.target._renderer.activeFramebuffers.pop()!==this)throw new Error("It looks like you've called end() while another Framebuffer is active.");this._beforeEnd(),this.prevFramebuffer?this.prevFramebuffer._beforeBegin():(T.bindFramebuffer(T.FRAMEBUFFER,null),this.target._renderer.viewport(this.target._renderer._origViewport.width,this.target._renderer._origViewport.height)),this.target._renderer._applyStencilTestIfClipping()}},{key:"draw",value:function(T){this.begin(),T(),this.end()}},{key:"loadPixels",value:function(){var T=this.gl,P=this.target._renderer.activeFramebuffer(),M=(T.bindFramebuffer(T.FRAMEBUFFER,this.framebuffer),this._glColorFormat());this.pixels=(0,y.readPixelsWebGL)(this.pixels,T,this.framebuffer,0,0,this.width*this.density,this.height*this.density,M.format,M.type),P?T.bindFramebuffer(T.FRAMEBUFFER,P._framebufferToBind()):T.bindFramebuffer(T.FRAMEBUFFER,null)}},{key:"get",value:function(T,P,M,F){u.default._validateParameters("p5.Framebuffer.get",arguments);var D=this._glColorFormat();if(T===void 0&&P===void 0)P=T=0,M=this.width,F=this.height;else if(M===void 0&&F===void 0)return(T<0||P<0||T>=this.width||P>=this.height)&&(console.warn("The x and y values passed to p5.Framebuffer.get are outside of its range and will be clamped."),T=this.target.constrain(T,0,this.width-1),P=this.target.constrain(P,0,this.height-1)),(0,y.readPixelWebGL)(this.gl,this.framebuffer,T*this.density,P*this.density,D.format,D.type);T=this.target.constrain(T,0,this.width-1),P=this.target.constrain(P,0,this.height-1),M=this.target.constrain(M,1,this.width-T),F=this.target.constrain(F,1,this.height-P);for(var A=(0,y.readPixelsWebGL)(void 0,this.gl,this.framebuffer,T*this.density,P*this.density,M*this.density,F*this.density,D.format,D.type),z=new Uint8ClampedArray(M*F*this.density*this.density*4),G=(z.fill(255),D.type===this.gl.RGB?3:4),U=0;U<F*this.density;U++)for(var H=0;H<M*this.density;H++)for(var Y=0;Y<4;Y++){var oe,L=4*(U*M*this.density+H)+Y;Y<G&&(oe=G==4?L:(U*M*this.density+H)*G+Y,z[L]=A[oe])}return T=new u.default.Image(M*this.density,F*this.density),T.imageData=T.canvas.getContext("2d").createImageData(T.width,T.height),T.imageData.data.set(z),T.pixels=T.imageData.data,T.updatePixels(),this.density!==1&&T.resize(M,F),T}},{key:"updatePixels",value:function(){var T=this.gl,P=(this.colorP5Texture.bindTexture(),this._glColorFormat()),M=P.format===T.RGBA?4:3,M=this.width*this.height*this.density*this.density*M,F=P.type===T.UNSIGNED_BYTE?Uint8Array:Float32Array;if(!(this.pixels instanceof F)||this.pixels.length!==M)throw new Error("The pixels array has not been set correctly. Please call loadPixels() before updatePixels().");T.texImage2D(T.TEXTURE_2D,0,P.internalFormat,this.width*this.density,this.height*this.density,0,P.format,P.type,this.pixels),this.colorP5Texture.unbindTexture(),F=this.target._renderer.activeFramebuffer(),this.antialias?(this.begin(),this.target.push(),this.target.imageMode(this.target.CENTER),this.target.resetMatrix(),this.target.noStroke(),this.target.clear(),this.target.image(this,0,0),this.target.pop(),this.useDepth&&(T.clearDepth(1),T.clear(T.DEPTH_BUFFER_BIT)),this.end()):(T.bindFramebuffer(T.FRAMEBUFFER,this.framebuffer),this.useDepth&&(T.clearDepth(1),T.clear(T.DEPTH_BUFFER_BIT)),F?T.bindFramebuffer(T.FRAMEBUFFER,F._framebufferToBind()):T.bindFramebuffer(T.FRAMEBUFFER,null))}}]),O})()),x=u.default.Framebuffer=_;C.default=x},{"../core/constants":272,"../core/main":283,"./p5.RendererGL":341,"./p5.Texture":343,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.reflect.get":193,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.typed-array.uint8-clamped-array":243,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],335:[function(t,W,C){"use strict";function p(i){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(i)}function m(i){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(s){return p(s)}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":p(s)})(i)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.flat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.unscopables.flat"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.entries"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.flat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.unscopables.flat"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.sub"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(r=t("../core/main"))&&r.__esModule?r:{default:r},f=(function(i){if(i&&i.__esModule)return i;if(i===null||m(i)!=="object"&&typeof i!="function")return{default:i};var s=g();if(s&&s.has(i))return s.get(i);var n,l={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in i){var d;Object.prototype.hasOwnProperty.call(i,n)&&((d=c?Object.getOwnPropertyDescriptor(i,n):null)&&(d.get||d.set)?Object.defineProperty(l,n,d):l[n]=i[n])}return l.default=i,s&&s.set(i,l),l})(t("../core/constants"));function g(){var i;return typeof WeakMap!="function"?null:(i=new WeakMap,g=function(){return i},i)}function y(i){return(function(s){if(Array.isArray(s)){for(var n=0,l=new Array(s.length);n<s.length;n++)l[n]=s[n];return l}})(i)||(function(s){if(Symbol.iterator in Object(s)||Object.prototype.toString.call(s)==="[object Arguments]")return Array.from(s)})(i)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}function o(i,s){return(function(n){if(Array.isArray(n))return n})(i)||(function(n,l){if(Symbol.iterator in Object(n)||Object.prototype.toString.call(n)==="[object Arguments]"){var c=[],d=!0,v=!1,S=void 0;try{for(var E,_=n[Symbol.iterator]();!(d=(E=_.next()).done)&&(c.push(E.value),!l||c.length!==l);d=!0);}catch(x){v=!0,S=x}finally{try{d||_.return==null||_.return()}finally{if(v)throw S}}return c}})(i,s)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")})()}function a(i,s){for(var n=0;n<s.length;n++){var l=s[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(i,l.key,l)}}u.default.Geometry=(function(){function i(c,d,v){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.vertices=[],this.boundingBoxCache=null,this.lineVertices=new u.default.DataArray,this.lineTangentsIn=new u.default.DataArray,this.lineTangentsOut=new u.default.DataArray,this.lineSides=new u.default.DataArray,this.vertexNormals=[],this.faces=[],this.uvs=[],this.edges=[],this.vertexColors=[],this.vertexStrokeColors=[],this.lineVertexColors=new u.default.DataArray,this.detailX=c!==void 0?c:1,this.detailY=d!==void 0?d:1,this.dirtyFlags={},this._hasFillTransparency=void 0,this._hasStrokeTransparency=void 0,v instanceof Function&&v.call(this)}var s,n,l;return s=i,(n=[{key:"calculateBoundingBox",value:function(){if(!this.boundingBoxCache){for(var c=new u.default.Vector(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new u.default.Vector(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE),v=0;v<this.vertices.length;v++){var S=this.vertices[v];c.x=Math.min(c.x,S.x),c.y=Math.min(c.y,S.y),c.z=Math.min(c.z,S.z),d.x=Math.max(d.x,S.x),d.y=Math.max(d.y,S.y),d.z=Math.max(d.z,S.z)}var E=new u.default.Vector(d.x-c.x,d.y-c.y,d.z-c.z),_=new u.default.Vector((c.x+d.x)/2,(c.y+d.y)/2,(c.z+d.z)/2);this.boundingBoxCache={min:c,max:d,size:E,offset:_}}return this.boundingBoxCache}},{key:"reset",value:function(){this._hasFillTransparency=void 0,this._hasStrokeTransparency=void 0,this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear(),this.vertices.length=0,this.edges.length=0,this.vertexColors.length=0,this.vertexStrokeColors.length=0,this.lineVertexColors.clear(),this.vertexNormals.length=0,this.uvs.length=0,this.dirtyFlags={}}},{key:"hasFillTransparency",value:function(){if(this._hasFillTransparency===void 0){this._hasFillTransparency=!1;for(var c=0;c<this.vertexColors.length;c+=4)if(this.vertexColors[c+3]<1){this._hasFillTransparency=!0;break}}return this._hasFillTransparency}},{key:"hasStrokeTransparency",value:function(){if(this._hasStrokeTransparency===void 0){this._hasStrokeTransparency=!1;for(var c=0;c<this.lineVertexColors.length;c+=4)if(this.lineVertexColors[c+3]<1){this._hasStrokeTransparency=!0;break}}return this._hasStrokeTransparency}},{key:"clearColors",value:function(){return this.vertexColors=[],this}},{key:"saveObj",value:function(){var c=this,d=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"model.obj",v="";if(this.vertices.forEach(function(_){v+="v ".concat(_.x," ").concat(_.y," ").concat(_.z,`
`)}),this.uvs&&0<this.uvs.length)for(var S=0;S<this.uvs.length;S+=2)v+="vt ".concat(this.uvs[S]," ").concat(this.uvs[S+1],`
`);this.vertexNormals&&0<this.vertexNormals.length&&this.vertexNormals.forEach(function(_){v+="vn ".concat(_.x," ").concat(_.y," ").concat(_.z,`
`)}),this.faces.forEach(function(_){var x="f";_.forEach(function(O){x=x+" "+(O+1),(0<c.vertexNormals.length||0<c.uvs.length)&&(x+="/",0<c.uvs.length&&(x+=O+1),x+="/",0<c.vertexNormals.length&&(x+=O+1))}),v+=x+`
`});var E=new Blob([v],{type:"text/plain"});u.default.prototype.downloadFile(E,d,"obj")}},{key:"saveStl",value:function(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"model.stl",d=(1<arguments.length&&arguments[1]!==void 0?arguments[1]:{}).binary,d=d!==void 0&&d,v=c.substring(0,c.lastIndexOf(".")),S=[],E=!0,_=!1,x=void 0;try{for(var O,T=this.faces[Symbol.iterator]();!(E=(O=T.next()).done);E=!0){var P=O.value,M=u.default.Vector.sub(this.vertices[P[1]],this.vertices[P[0]]),F=u.default.Vector.sub(this.vertices[P[2]],this.vertices[P[0]]),D=M.y*F.z-M.z*F.y,A=M.z*F.x-M.x*F.z,z=M.x*F.y-M.y*F.x;S.push(new u.default.Vector(D,A,z).normalize())}}catch(_e){_=!0,x=_e}finally{try{E||T.return==null||T.return()}finally{if(_)throw x}}if(d){var G,U=80,_=2*this.faces.length+3*this.faces.length*4*4+80+4,x=new ArrayBuffer(_);(G=new DataView(x)).setUint32(U,this.faces.length,!0),U+=4;for(var H=0,Y=Object.entries(this.faces);H<Y.length;H++){var oe=o(Y[H],2),j=oe[0],oe=oe[1],j=S[j],L=(G.setFloat32(U,j.x,!0),U+=4,G.setFloat32(U,j.y,!0),U+=4,G.setFloat32(U,j.z,!0),U+=4,!0),j=!1,R=void 0;try{for(var N,X=oe[Symbol.iterator]();!(L=(N=X.next()).done);L=!0){var K=N.value,re=this.vertices[K];G.setFloat32(U,re.x,!0),U+=4,G.setFloat32(U,re.y,!0),U+=4,G.setFloat32(U,re.z,!0),U+=4}}catch(Se){j=!0,R=Se}finally{try{L||X.return==null||X.return()}finally{if(j)throw R}}G.setUint16(U,0,!0),U+=2}}else{G="solid "+v+`
`;for(var ie=0,ee=Object.entries(this.faces);ie<ee.length;ie++){var ae=o(ee[ie],2),Q=ae[0],ae=ae[1],Q=S[Q],ue=(G=G+(" facet norm "+Q.x+" "+Q.y+" "+Q.z+`
`)+`  outer loop
`,!0),Q=!1,le=void 0;try{for(var fe,ve=ae[Symbol.iterator]();!(ue=(fe=ve.next()).done);ue=!0){var he=fe.value,me=this.vertices[he];G+="   vertex "+me.x+" "+me.y+" "+me.z+`
`}}catch(_e){Q=!0,le=_e}finally{try{ue||ve.return==null||ve.return()}finally{if(Q)throw le}}G=G+`  endloop
 endfacet
`}G+="endsolid "+v+`
`}d=new Blob([G],{type:"text/plain"}),u.default.prototype.downloadFile(d,c,"stl")}},{key:"flipU",value:function(){this.uvs=this.uvs.flat().map(function(c,d){return d%2==0?1-c:c})}},{key:"flipV",value:function(){this.uvs=this.uvs.flat().map(function(c,d){return d%2==0?c:1-c})}},{key:"computeFaces",value:function(){this.faces.length=0;for(var c,d,v,S=this.detailX+1,E=0;E<this.detailY;E++)for(var _=0;_<this.detailX;_++)d=(E+1)*S+_+1,this.faces.push([E*S+_,c=E*S+_+1,v=(E+1)*S+_]),this.faces.push([v,c,d]);return this}},{key:"_getFaceNormal",value:function(d){var d=this.faces[d],v=this.vertices[d[0]],E=this.vertices[d[1]],d=this.vertices[d[2]],E=u.default.Vector.sub(E,v),d=u.default.Vector.sub(d,v),v=u.default.Vector.cross(E,d),S=u.default.Vector.mag(v),E=S/(u.default.Vector.mag(E)*u.default.Vector.mag(d));return E===0||isNaN(E)?(console.warn("p5.Geometry.prototype._getFaceNormal:","face has colinear sides or a repeated vertex"),v):(1<E&&(E=1),v.mult(Math.asin(E)/S))}},{key:"computeNormals",value:function(){var c,d=this,v=0<arguments.length&&arguments[0]!==void 0?arguments[0]:f.FLAT,S=(1<arguments.length&&arguments[1]!==void 0?arguments[1]:{}).roundToPrecision,E=this.vertexNormals,_=this.vertices,x=this.faces;if(v===f.SMOOTH){for(var O={},T=[],P=Math.pow(10,S===void 0?3:S),M=function(G){return Math.round(G*P)/P},F=function(G){return"".concat(M(G.x),",").concat(M(G.y),",").concat(M(G.z))},D=0;D<_.length;D++){var A=_[D],z=F(A);O[z]===void 0&&(O[z]=T.length,T.push(A))}x.forEach(function(G){for(var U=0;U<3;++U){var H=G[U],H=_[H],H=F(H);G[U]=O[H]}}),this.edges.forEach(function(G){for(var U=0;U<2;++U){var H=G[U],H=_[H],H=F(H);G[U]=O[H]}}),this.vertices=_=T}for(c=E.length=0;c<_.length;++c)E.push(new u.default.Vector);for(x.forEach(function(G,U){for(var H=d._getFaceNormal(U),Y=0;Y<3;++Y){var oe=G[Y];E[oe].add(H)}}),c=0;c<_.length;++c)E[c].normalize();return this}},{key:"averageNormals",value:function(){for(var c=0;c<=this.detailY;c++){var d=this.detailX+1,v=u.default.Vector.add(this.vertexNormals[c*d],this.vertexNormals[c*d+this.detailX]),v=u.default.Vector.div(v,2);this.vertexNormals[c*d]=v,this.vertexNormals[c*d+this.detailX]=v}return this}},{key:"averagePoleNormals",value:function(){for(var c=new u.default.Vector(0,0,0),d=0;d<this.detailX;d++)c.add(this.vertexNormals[d]);for(var c=u.default.Vector.div(c,this.detailX),v=0;v<this.detailX;v++)this.vertexNormals[v]=c;c=new u.default.Vector(0,0,0);for(var S=this.vertices.length-1;S>this.vertices.length-1-this.detailX;S--)c.add(this.vertexNormals[S]);c=u.default.Vector.div(c,this.detailX);for(var E=this.vertices.length-1;E>this.vertices.length-1-this.detailX;E--)this.vertexNormals[E]=c;return this}},{key:"_makeTriangleEdges",value:function(){for(var c=this.edges.length=0;c<this.faces.length;c++)this.edges.push([this.faces[c][0],this.faces[c][1]]),this.edges.push([this.faces[c][1],this.faces[c][2]]),this.edges.push([this.faces[c][2],this.faces[c][0]]);return this}},{key:"_edgesToVertices",value:function(){this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear();for(var c,d=new Map,v=new Set,S=0;S<this.edges.length;S++){var E,_=this.edges[S-1],x=this.edges[S],O=this.vertices[x[0]],T=this.vertices[x[1]],P=0<this.vertexStrokeColors.length&&_?this.vertexStrokeColors.slice(4*_[1],4*(_[1]+1)):[0,0,0,0],M=0<this.vertexStrokeColors.length?this.vertexStrokeColors.slice(4*x[0],4*(x[0]+1)):[0,0,0,0],F=0<this.vertexStrokeColors.length?this.vertexStrokeColors.slice(4*x[1],4*(x[1]+1)):[0,0,0,0],D=T.copy().sub(O).normalize(),A=0<D.magSq();A&&this._addSegment(O,T,M,F,D),0<S&&_[1]===x[0]?v.has(x[0])||(v.add(x[0]),d.delete(x[0]),c&&A&&D.dot(c)<1-1e-8&&this._addJoin(O,c,D,M)):(A&&!v.has(x[0])&&((E=d.get(x[0]))?(this._addJoin(O,E.dir,D,M),d.delete(x[0]),v.add(x[0])):d.set(x[0],{point:O,dir:D.copy().mult(-1),color:M})),c&&!v.has(_[1])&&((E=d.get(_[1]))?(this._addJoin(this.vertices[_[1]],c,E.dir.copy().mult(-1),P),d.delete(_[1]),v.add(_[1])):d.set(_[1],{point:this.vertices[_[1]],dir:c,color:P}),c=void 0)),S!==this.edges.length-1||v.has(x[1])||((O=d.get(x[1]))?(this._addJoin(T,D,O.dir.copy().mult(-1),F),d.delete(x[1]),v.add(x[1])):d.set(x[1],{point:T,dir:D,color:F})),A&&(c=D)}var z=!0,G=!1,U=void 0;try{for(var H,Y=d.values()[Symbol.iterator]();!(z=(H=Y.next()).done);z=!0){var oe=H.value,L=oe.point,j=oe.dir,R=oe.color;this._addCap(L,j,R)}}catch(N){G=!0,U=N}finally{try{z||Y.return==null||Y.return()}finally{if(G)throw U}}return this}},{key:"_addSegment",value:function(_,x,v,S,E){var _=_.array(),x=x.array(),O=E.array();this.lineSides.push(1,1,-1,1,-1,-1);for(var T=0,P=[this.lineTangentsIn,this.lineTangentsOut];T<P.length;T++)for(var M=P[T],F=0;F<6;F++)M.push.apply(M,y(O));return(E=this.lineVertices).push.apply(E,y(_).concat(y(x),y(_),y(x),y(x),y(_))),(E=this.lineVertexColors).push.apply(E,y(v).concat(y(S),y(v),y(S),y(S),y(v))),this}},{key:"_addCap",value:function(c,d,v){for(var S,E=c.array(),_=d.array(),x=[0,0,0],O=0;O<6;O++)(S=this.lineVertices).push.apply(S,y(E)),(S=this.lineTangentsIn).push.apply(S,y(_)),(S=this.lineTangentsOut).push.apply(S,x),(S=this.lineVertexColors).push.apply(S,y(v));return this.lineSides.push(-1,2,-2,1,2,-1),this}},{key:"_addJoin",value:function(c,d,v,S){for(var E,_=c.array(),x=d.array(),O=v.array(),T=0;T<12;T++)(E=this.lineVertices).push.apply(E,y(_)),(E=this.lineTangentsIn).push.apply(E,y(x)),(E=this.lineTangentsOut).push.apply(E,y(O)),(E=this.lineVertexColors).push.apply(E,y(S));return this.lineSides.push(-1,-3,-2,-1,0,-3),this.lineSides.push(3,1,2,3,0,1),this}},{key:"normalize",value:function(){if(0<this.vertices.length){for(var c=this.vertices[0].copy(),d=this.vertices[0].copy(),v=0;v<this.vertices.length;v++)c.x=Math.max(c.x,this.vertices[v].x),d.x=Math.min(d.x,this.vertices[v].x),c.y=Math.max(c.y,this.vertices[v].y),d.y=Math.min(d.y,this.vertices[v].y),c.z=Math.max(c.z,this.vertices[v].z),d.z=Math.min(d.z,this.vertices[v].z);for(var S=u.default.Vector.lerp(c,d,.5),E=u.default.Vector.sub(c,d),_=200/Math.max(Math.max(E.x,E.y),E.z),x=0;x<this.vertices.length;x++)this.vertices[x].sub(S),this.vertices[x].mult(_)}return this}}])&&a(s.prototype,n),l&&a(s,l),i})();var r=u.default.Geometry;C.default=r},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array-buffer.constructor":152,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.flat":160,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.unscopables.flat":173,"core-js/modules/es.map":175,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.entries":184,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],336:[function(g,W,C){"use strict";g("core-js/modules/es.array.iterator"),g("core-js/modules/es.object.to-string"),g("core-js/modules/es.typed-array.float32-array"),g("core-js/modules/es.typed-array.copy-within"),g("core-js/modules/es.typed-array.every"),g("core-js/modules/es.typed-array.fill"),g("core-js/modules/es.typed-array.filter"),g("core-js/modules/es.typed-array.find"),g("core-js/modules/es.typed-array.find-index"),g("core-js/modules/es.typed-array.for-each"),g("core-js/modules/es.typed-array.includes"),g("core-js/modules/es.typed-array.index-of"),g("core-js/modules/es.typed-array.iterator"),g("core-js/modules/es.typed-array.join"),g("core-js/modules/es.typed-array.last-index-of"),g("core-js/modules/es.typed-array.map"),g("core-js/modules/es.typed-array.reduce"),g("core-js/modules/es.typed-array.reduce-right"),g("core-js/modules/es.typed-array.reverse"),g("core-js/modules/es.typed-array.set"),g("core-js/modules/es.typed-array.slice"),g("core-js/modules/es.typed-array.some"),g("core-js/modules/es.typed-array.sort"),g("core-js/modules/es.typed-array.subarray"),g("core-js/modules/es.typed-array.to-locale-string"),g("core-js/modules/es.typed-array.to-string"),g("core-js/modules/es.array.iterator"),g("core-js/modules/es.object.to-string"),g("core-js/modules/es.typed-array.float32-array"),g("core-js/modules/es.typed-array.copy-within"),g("core-js/modules/es.typed-array.every"),g("core-js/modules/es.typed-array.fill"),g("core-js/modules/es.typed-array.filter"),g("core-js/modules/es.typed-array.find"),g("core-js/modules/es.typed-array.find-index"),g("core-js/modules/es.typed-array.for-each"),g("core-js/modules/es.typed-array.includes"),g("core-js/modules/es.typed-array.index-of"),g("core-js/modules/es.typed-array.iterator"),g("core-js/modules/es.typed-array.join"),g("core-js/modules/es.typed-array.last-index-of"),g("core-js/modules/es.typed-array.map"),g("core-js/modules/es.typed-array.reduce"),g("core-js/modules/es.typed-array.reduce-right"),g("core-js/modules/es.typed-array.reverse"),g("core-js/modules/es.typed-array.set"),g("core-js/modules/es.typed-array.slice"),g("core-js/modules/es.typed-array.some"),g("core-js/modules/es.typed-array.sort"),g("core-js/modules/es.typed-array.subarray"),g("core-js/modules/es.typed-array.to-locale-string"),g("core-js/modules/es.typed-array.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(g=g("../core/main"))&&g.__esModule?g:{default:g};function m(y,o){for(var a=0;a<o.length;a++){var r=o[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(y,r.key,r)}}var u=Array,f=function(y){return Array.isArray(y)},g=(typeof Float32Array<"u"&&(u=Float32Array,f=function(y){return Array.isArray(y)||y instanceof Float32Array}),p.default.Matrix=(function(){function y(){var i=this,s=y;if(i instanceof s)return arguments.length&&((i=arguments.length-1)<0||arguments.length<=i?void 0:arguments[i])instanceof p.default&&(this.p5=(s=arguments.length-1)<0||arguments.length<=s?void 0:arguments[s]),(arguments.length<=0?void 0:arguments[0])==="mat3"?this.mat3=Array.isArray(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:new u([1,0,0,0,1,0,0,0,1]):this.mat4=Array.isArray(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:new u([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this;throw new TypeError("Cannot call a class as a function")}var o,a,r;return o=y,r=[{key:"identity",value:function(i){return new p.default.Matrix(i)}}],(a=[{key:"reset",value:function(){return this.mat3?this.mat3.set([1,0,0,0,1,0,0,0,1]):this.mat4&&this.mat4.set([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this}},{key:"set",value:function(i){var s=arguments;if(i instanceof p.default.Matrix?s=i.mat4:f(i)&&(s=i),s.length!==16)p.default._friendlyError("Expected 16 values but received ".concat(s.length,"."),"p5.Matrix.set");else for(var n=0;n<16;n++)this.mat4[n]=s[n];return this}},{key:"get",value:function(){return new p.default.Matrix(this.mat4,this.p5)}},{key:"copy",value:function(){var i;return this.mat3!==void 0?((i=new p.default.Matrix("mat3",this.p5)).mat3[0]=this.mat3[0],i.mat3[1]=this.mat3[1],i.mat3[2]=this.mat3[2],i.mat3[3]=this.mat3[3],i.mat3[4]=this.mat3[4],i.mat3[5]=this.mat3[5],i.mat3[6]=this.mat3[6],i.mat3[7]=this.mat3[7],i.mat3[8]=this.mat3[8]):((i=new p.default.Matrix(this.p5)).mat4[0]=this.mat4[0],i.mat4[1]=this.mat4[1],i.mat4[2]=this.mat4[2],i.mat4[3]=this.mat4[3],i.mat4[4]=this.mat4[4],i.mat4[5]=this.mat4[5],i.mat4[6]=this.mat4[6],i.mat4[7]=this.mat4[7],i.mat4[8]=this.mat4[8],i.mat4[9]=this.mat4[9],i.mat4[10]=this.mat4[10],i.mat4[11]=this.mat4[11],i.mat4[12]=this.mat4[12],i.mat4[13]=this.mat4[13],i.mat4[14]=this.mat4[14],i.mat4[15]=this.mat4[15]),i}},{key:"transpose",value:function(i){var s,n,l,c,d,v;return i instanceof p.default.Matrix?(s=i.mat4[1],n=i.mat4[2],l=i.mat4[3],c=i.mat4[6],d=i.mat4[7],v=i.mat4[11],this.mat4[0]=i.mat4[0],this.mat4[1]=i.mat4[4],this.mat4[2]=i.mat4[8],this.mat4[3]=i.mat4[12],this.mat4[4]=s,this.mat4[5]=i.mat4[5],this.mat4[6]=i.mat4[9],this.mat4[7]=i.mat4[13],this.mat4[8]=n,this.mat4[9]=c,this.mat4[10]=i.mat4[10],this.mat4[11]=i.mat4[14],this.mat4[12]=l,this.mat4[13]=d,this.mat4[14]=v,this.mat4[15]=i.mat4[15]):f(i)&&(s=i[1],n=i[2],l=i[3],c=i[6],d=i[7],v=i[11],this.mat4[0]=i[0],this.mat4[1]=i[4],this.mat4[2]=i[8],this.mat4[3]=i[12],this.mat4[4]=s,this.mat4[5]=i[5],this.mat4[6]=i[9],this.mat4[7]=i[13],this.mat4[8]=n,this.mat4[9]=c,this.mat4[10]=i[10],this.mat4[11]=i[14],this.mat4[12]=l,this.mat4[13]=d,this.mat4[14]=v,this.mat4[15]=i[15]),this}},{key:"invert",value:function(A){A instanceof p.default.Matrix?(s=A.mat4[0],n=A.mat4[1],l=A.mat4[2],c=A.mat4[3],d=A.mat4[4],v=A.mat4[5],S=A.mat4[6],E=A.mat4[7],_=A.mat4[8],x=A.mat4[9],O=A.mat4[10],T=A.mat4[11],P=A.mat4[12],M=A.mat4[13],F=A.mat4[14],D=A.mat4[15]):f(A)&&(s=A[0],n=A[1],l=A[2],c=A[3],d=A[4],v=A[5],S=A[6],E=A[7],_=A[8],x=A[9],O=A[10],T=A[11],P=A[12],M=A[13],F=A[14],D=A[15]);var s,n,l,c,d,v,S,E,_,x,O,T,P,M,F,D,A=s*v-n*d,z=s*S-l*d,G=s*E-c*d,U=n*S-l*v,H=n*E-c*v,Y=l*E-c*S,oe=_*M-x*P,L=_*F-O*P,j=_*D-T*P,R=x*F-O*M,N=x*D-T*M,X=O*D-T*F,K=A*X-z*N+G*R+U*j-H*L+Y*oe;return K?(this.mat4[0]=(v*X-S*N+E*R)*(K=1/K),this.mat4[1]=(l*N-n*X-c*R)*K,this.mat4[2]=(M*Y-F*H+D*U)*K,this.mat4[3]=(O*H-x*Y-T*U)*K,this.mat4[4]=(S*j-d*X-E*L)*K,this.mat4[5]=(s*X-l*j+c*L)*K,this.mat4[6]=(F*G-P*Y-D*z)*K,this.mat4[7]=(_*Y-O*G+T*z)*K,this.mat4[8]=(d*N-v*j+E*oe)*K,this.mat4[9]=(n*j-s*N-c*oe)*K,this.mat4[10]=(P*H-M*G+D*A)*K,this.mat4[11]=(x*G-_*H-T*A)*K,this.mat4[12]=(v*L-d*R-S*oe)*K,this.mat4[13]=(s*R-n*L+l*oe)*K,this.mat4[14]=(M*z-P*U-F*A)*K,this.mat4[15]=(_*U-x*z+O*A)*K,this):null}},{key:"invert3x3",value:function(){var i=this.mat3[0],s=this.mat3[1],n=this.mat3[2],l=this.mat3[3],c=this.mat3[4],d=this.mat3[5],v=this.mat3[6],S=this.mat3[7],E=this.mat3[8],_=E*c-d*S,x=-E*l+d*v,O=S*l-c*v,T=i*_+s*x+n*O;return T?(this.mat3[0]=_*(T=1/T),this.mat3[1]=(-E*s+n*S)*T,this.mat3[2]=(d*s-n*c)*T,this.mat3[3]=x*T,this.mat3[4]=(E*i-n*v)*T,this.mat3[5]=(-d*i+n*l)*T,this.mat3[6]=O*T,this.mat3[7]=(-S*i+s*v)*T,this.mat3[8]=(c*i-s*l)*T,this):null}},{key:"transpose3x3",value:function(i){var s=(i=i===void 0?this.mat3:i)[1],n=i[2],l=i[5];return this.mat3[0]=i[0],this.mat3[1]=i[3],this.mat3[2]=i[6],this.mat3[3]=s,this.mat3[4]=i[4],this.mat3[5]=i[7],this.mat3[6]=n,this.mat3[7]=l,this.mat3[8]=i[8],this}},{key:"inverseTranspose",value:function(i){if(i=i.mat4,this.mat3===void 0?p.default._friendlyError("sorry, this function only works with mat3"):(this.mat3[0]=i[0],this.mat3[1]=i[1],this.mat3[2]=i[2],this.mat3[3]=i[4],this.mat3[4]=i[5],this.mat3[5]=i[6],this.mat3[6]=i[8],this.mat3[7]=i[9],this.mat3[8]=i[10]),i=this.invert3x3(),i)i.transpose3x3(this.mat3);else for(var s=0;s<9;s++)this.mat3[s]=0;return this}},{key:"determinant",value:function(){var i=this.mat4[0]*this.mat4[5]-this.mat4[1]*this.mat4[4],s=this.mat4[0]*this.mat4[6]-this.mat4[2]*this.mat4[4],n=this.mat4[0]*this.mat4[7]-this.mat4[3]*this.mat4[4],l=this.mat4[1]*this.mat4[6]-this.mat4[2]*this.mat4[5],c=this.mat4[1]*this.mat4[7]-this.mat4[3]*this.mat4[5],d=this.mat4[2]*this.mat4[7]-this.mat4[3]*this.mat4[6],v=this.mat4[8]*this.mat4[13]-this.mat4[9]*this.mat4[12],S=this.mat4[8]*this.mat4[14]-this.mat4[10]*this.mat4[12],E=this.mat4[8]*this.mat4[15]-this.mat4[11]*this.mat4[12],_=this.mat4[9]*this.mat4[14]-this.mat4[10]*this.mat4[13],x=this.mat4[9]*this.mat4[15]-this.mat4[11]*this.mat4[13];return i*(this.mat4[10]*this.mat4[15]-this.mat4[11]*this.mat4[14])-s*x+n*_+l*E-c*S+d*v}},{key:"mult",value:function(n){var s;if(n===this||n===this.mat4)s=this.copy().mat4;else if(n instanceof p.default.Matrix)s=n.mat4;else if(f(n))s=n;else{if(arguments.length!==16)return;s=arguments}var n=this.mat4[0],l=this.mat4[1],c=this.mat4[2],d=this.mat4[3];return this.mat4[0]=n*s[0]+l*s[4]+c*s[8]+d*s[12],this.mat4[1]=n*s[1]+l*s[5]+c*s[9]+d*s[13],this.mat4[2]=n*s[2]+l*s[6]+c*s[10]+d*s[14],this.mat4[3]=n*s[3]+l*s[7]+c*s[11]+d*s[15],n=this.mat4[4],l=this.mat4[5],c=this.mat4[6],d=this.mat4[7],this.mat4[4]=n*s[0]+l*s[4]+c*s[8]+d*s[12],this.mat4[5]=n*s[1]+l*s[5]+c*s[9]+d*s[13],this.mat4[6]=n*s[2]+l*s[6]+c*s[10]+d*s[14],this.mat4[7]=n*s[3]+l*s[7]+c*s[11]+d*s[15],n=this.mat4[8],l=this.mat4[9],c=this.mat4[10],d=this.mat4[11],this.mat4[8]=n*s[0]+l*s[4]+c*s[8]+d*s[12],this.mat4[9]=n*s[1]+l*s[5]+c*s[9]+d*s[13],this.mat4[10]=n*s[2]+l*s[6]+c*s[10]+d*s[14],this.mat4[11]=n*s[3]+l*s[7]+c*s[11]+d*s[15],n=this.mat4[12],l=this.mat4[13],c=this.mat4[14],d=this.mat4[15],this.mat4[12]=n*s[0]+l*s[4]+c*s[8]+d*s[12],this.mat4[13]=n*s[1]+l*s[5]+c*s[9]+d*s[13],this.mat4[14]=n*s[2]+l*s[6]+c*s[10]+d*s[14],this.mat4[15]=n*s[3]+l*s[7]+c*s[11]+d*s[15],this}},{key:"apply",value:function(n){var s;if(n===this||n===this.mat4)s=this.copy().mat4;else if(n instanceof p.default.Matrix)s=n.mat4;else if(f(n))s=n;else{if(arguments.length!==16)return;s=arguments}var n=this.mat4,l=n[0],c=n[4],d=n[8],v=n[12],l=(n[0]=s[0]*l+s[1]*c+s[2]*d+s[3]*v,n[4]=s[4]*l+s[5]*c+s[6]*d+s[7]*v,n[8]=s[8]*l+s[9]*c+s[10]*d+s[11]*v,n[12]=s[12]*l+s[13]*c+s[14]*d+s[15]*v,n[1]),c=n[5],d=n[9],v=n[13],l=(n[1]=s[0]*l+s[1]*c+s[2]*d+s[3]*v,n[5]=s[4]*l+s[5]*c+s[6]*d+s[7]*v,n[9]=s[8]*l+s[9]*c+s[10]*d+s[11]*v,n[13]=s[12]*l+s[13]*c+s[14]*d+s[15]*v,n[2]),c=n[6],d=n[10],v=n[14],l=(n[2]=s[0]*l+s[1]*c+s[2]*d+s[3]*v,n[6]=s[4]*l+s[5]*c+s[6]*d+s[7]*v,n[10]=s[8]*l+s[9]*c+s[10]*d+s[11]*v,n[14]=s[12]*l+s[13]*c+s[14]*d+s[15]*v,n[3]),c=n[7],d=n[11],v=n[15];return n[3]=s[0]*l+s[1]*c+s[2]*d+s[3]*v,n[7]=s[4]*l+s[5]*c+s[6]*d+s[7]*v,n[11]=s[8]*l+s[9]*c+s[10]*d+s[11]*v,n[15]=s[12]*l+s[13]*c+s[14]*d+s[15]*v,this}},{key:"scale",value:function(i,s,n){return i instanceof p.default.Vector?(s=i.y,n=i.z,i=i.x):i instanceof Array&&(s=i[1],n=i[2],i=i[0]),this.mat4[0]*=i,this.mat4[1]*=i,this.mat4[2]*=i,this.mat4[3]*=i,this.mat4[4]*=s,this.mat4[5]*=s,this.mat4[6]*=s,this.mat4[7]*=s,this.mat4[8]*=n,this.mat4[9]*=n,this.mat4[10]*=n,this.mat4[11]*=n,this}},{key:"rotate",value:function(A,N,R,l){N instanceof p.default.Vector?(R=N.y,l=N.z,N=N.x):N instanceof Array&&(R=N[1],l=N[2],N=N[0]);var c=Math.sqrt(N*N+R*R+l*l),c=(N*=1/c,R*=1/c,l*=1/c,this.mat4[0]),d=this.mat4[1],v=this.mat4[2],S=this.mat4[3],E=this.mat4[4],_=this.mat4[5],x=this.mat4[6],O=this.mat4[7],T=this.mat4[8],P=this.mat4[9],M=this.mat4[10],F=this.mat4[11],D=Math.sin(A),A=Math.cos(A),z=1-A,G=N*N*z+A,U=R*N*z+l*D,H=l*N*z-R*D,Y=N*R*z-l*D,oe=R*R*z+A,L=l*R*z+N*D,j=N*l*z+R*D,R=R*l*z-N*D,N=l*l*z+A;return this.mat4[0]=c*G+E*U+T*H,this.mat4[1]=d*G+_*U+P*H,this.mat4[2]=v*G+x*U+M*H,this.mat4[3]=S*G+O*U+F*H,this.mat4[4]=c*Y+E*oe+T*L,this.mat4[5]=d*Y+_*oe+P*L,this.mat4[6]=v*Y+x*oe+M*L,this.mat4[7]=S*Y+O*oe+F*L,this.mat4[8]=c*j+E*R+T*N,this.mat4[9]=d*j+_*R+P*N,this.mat4[10]=v*j+x*R+M*N,this.mat4[11]=S*j+O*R+F*N,this}},{key:"translate",value:function(l){var s=l[0],n=l[1],l=l[2]||0;this.mat4[12]+=this.mat4[0]*s+this.mat4[4]*n+this.mat4[8]*l,this.mat4[13]+=this.mat4[1]*s+this.mat4[5]*n+this.mat4[9]*l,this.mat4[14]+=this.mat4[2]*s+this.mat4[6]*n+this.mat4[10]*l,this.mat4[15]+=this.mat4[3]*s+this.mat4[7]*n+this.mat4[11]*l}},{key:"rotateX",value:function(i){this.rotate(i,1,0,0)}},{key:"rotateY",value:function(i){this.rotate(i,0,1,0)}},{key:"rotateZ",value:function(i){this.rotate(i,0,0,1)}},{key:"perspective",value:function(c,s,n,l){var c=1/Math.tan(c/2),d=1/(n-l);return this.mat4[0]=c/s,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=c,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=(l+n)*d,this.mat4[11]=-1,this.mat4[12]=0,this.mat4[13]=0,this.mat4[14]=2*l*n*d,this.mat4[15]=0,this}},{key:"ortho",value:function(i,s,n,l,c,d){var v=1/(i-s),S=1/(n-l),E=1/(c-d);return this.mat4[0]=-2*v,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=-2*S,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=2*E,this.mat4[11]=0,this.mat4[12]=(i+s)*v,this.mat4[13]=(l+n)*S,this.mat4[14]=(d+c)*E,this.mat4[15]=1,this}},{key:"multiplyVec4",value:function(i,s,n,l){var c=new Array(4),d=this.mat4;return c[0]=d[0]*i+d[4]*s+d[8]*n+d[12]*l,c[1]=d[1]*i+d[5]*s+d[9]*n+d[13]*l,c[2]=d[2]*i+d[6]*s+d[10]*n+d[14]*l,c[3]=d[3]*i+d[7]*s+d[11]*n+d[15]*l,c}},{key:"multiplyPoint",value:function(n){var l=n.x,s=n.y,n=n.z,l=this.multiplyVec4(l,s,n,1);return new p.default.Vector(l[0],l[1],l[2])}},{key:"multiplyAndNormalizePoint",value:function(n){var l=n.x,s=n.y,n=n.z,l=this.multiplyVec4(l,s,n,1);return l[0]/=l[3],l[1]/=l[3],l[2]/=l[3],new p.default.Vector(l[0],l[1],l[2])}},{key:"multiplyDirection",value:function(n){var l=n.x,s=n.y,n=n.z,l=this.multiplyVec4(l,s,n,0);return new p.default.Vector(l[0],l[1],l[2])}},{key:"mult3x3",value:function(n){var s;if(n===this||n===this.mat3)s=this.copy().mat3;else if(n instanceof p.default.Matrix)s=n.mat3;else if(f(n))s=n;else{if(arguments.length!==9)return;s=arguments}var n=this.mat3[0],l=this.mat3[1],c=this.mat3[2];return this.mat3[0]=n*s[0]+l*s[3]+c*s[6],this.mat3[1]=n*s[1]+l*s[4]+c*s[7],this.mat3[2]=n*s[2]+l*s[5]+c*s[8],n=this.mat3[3],l=this.mat3[4],c=this.mat3[5],this.mat3[3]=n*s[0]+l*s[3]+c*s[6],this.mat3[4]=n*s[1]+l*s[4]+c*s[7],this.mat3[5]=n*s[2]+l*s[5]+c*s[8],n=this.mat3[6],l=this.mat3[7],c=this.mat3[8],this.mat3[6]=n*s[0]+l*s[3]+c*s[6],this.mat3[7]=n*s[1]+l*s[4]+c*s[7],this.mat3[8]=n*s[2]+l*s[5]+c*s[8],this}},{key:"column",value:function(i){return new p.default.Vector(this.mat3[3*i],this.mat3[3*i+1],this.mat3[3*i+2])}},{key:"row",value:function(i){return new p.default.Vector(this.mat3[i],this.mat3[i+3],this.mat3[i+6])}},{key:"diagonal",value:function(){return this.mat3!==void 0?[this.mat3[0],this.mat3[4],this.mat3[8]]:[this.mat4[0],this.mat4[5],this.mat4[10],this.mat4[15]]}},{key:"multiplyVec3",value:function(i,s){return(s=s===void 0?i.copy():s).x=this.row(0).dot(i),s.y=this.row(1).dot(i),s.z=this.row(2).dot(i),s}},{key:"createSubMatrix3x3",value:function(){var i=new p.default.Matrix("mat3");return i.mat3[0]=this.mat4[0],i.mat3[1]=this.mat4[1],i.mat3[2]=this.mat4[2],i.mat3[3]=this.mat4[4],i.mat3[4]=this.mat4[5],i.mat3[5]=this.mat4[6],i.mat3[6]=this.mat4[8],i.mat3[7]=this.mat4[9],i.mat3[8]=this.mat4[10],i}}])&&m(o.prototype,a),r&&m(o,r),y})(),p.default.Matrix);C.default=g},{"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239}],337:[function(t,W,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(u,f){for(var g=0;g<f.length;g++){var y=f[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(u,y.key,y)}}p.default.Quat=(function(){function u(o,a,r,i){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.w=o,this.vec=new p.default.Vector(a,r,i)}var f,g,y;return f=u,y=[{key:"fromAxisAngle",value:function(o,n,r,i){var s=Math.cos(o/2),n=new p.default.Vector(n,r,i).normalize().mult(Math.sin(o/2));return new p.default.Quat(s,n.x,n.y,n.z)}}],(g=[{key:"conjugate",value:function(){return new p.default.Quat(this.w,-this.vec.x,-this.vec.y,-this.vec.z)}},{key:"multiply",value:function(o){return new p.default.Quat(this.w*o.w-this.vec.x*o.vec.x-this.vec.y*o.vec.y-this.vec.z-o.vec.z,this.w*o.vec.x+this.vec.x*o.w+this.vec.y*o.vec.z-this.vec.z*o.vec.y,this.w*o.vec.y-this.vec.x*o.vec.z+this.vec.y*o.w+this.vec.z*o.vec.x,this.w*o.vec.z+this.vec.x*o.vec.y-this.vec.y*o.vec.x+this.vec.z*o.w)}},{key:"rotateVector",value:function(o){return new p.default.Vector.mult(o,this.w*this.w-this.vec.dot(this.vec)).add(p.default.Vector.mult(this.vec,2*o.dot(this.vec))).add(p.default.Vector.mult(this.vec,2*this.w).cross(o)).clampToZero()}},{key:"rotateBy",value:function(o){return o.multiply(this).multiply(o.conjugate()).vec.clampToZero()}}])&&m(f.prototype,g),y&&m(f,y),u})(),t=p.default.Quat,C.default=t},{"../core/main":283}],338:[function(t,W,C){"use strict";t("core-js/modules/es.array.map"),t("core-js/modules/es.array.map"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t};function p(m,u){for(var f=0;f<u.length;f++){var g=u[f];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}t.default.RenderBuffer=(function(){function m(y,o,a,r,i,s){if(!(this instanceof m))throw new TypeError("Cannot call a class as a function");this.size=y,this.src=o,this.dst=a,this.attr=r,this._renderer=i,this.map=s}var u,f,g;return u=m,(f=[{key:"_prepareBuffer",value:function(y,o){var a,r,i,l=o.attributes,s=this._renderer.GL,n=y.model||y,l=l[this.attr];l&&(a=y[this.dst],0<(r=n[this.src]).length?((i=!a)&&(y[this.dst]=a=s.createBuffer()),s.bindBuffer(s.ARRAY_BUFFER,a),!i&&n.dirtyFlags[this.src]===!1||(i=(y=this.map)?y(r):r,this._renderer._bindBuffer(a,s.ARRAY_BUFFER,i),n.dirtyFlags[this.src]=!1),o.enableAttrib(l,this.size)):(y=l.location)!==-1&&this._renderer.registerEnabled.has(y)&&(s.disableVertexAttribArray(y),this._renderer.registerEnabled.delete(y)))}}])&&p(u.prototype,f),g&&p(u,g),m})(),t=t.default.RenderBuffer,C.default=t},{"../core/main":283,"core-js/modules/es.array.map":168}],339:[function(t,W,C){"use strict";function p(r){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function m(r){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(i){return p(i)}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":p(i)})(r)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.find-index"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.map"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.find-index"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.map"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(a=t("../core/main"))&&a.__esModule?a:{default:a},f=(function(r){if(r&&r.__esModule)return r;if(r===null||m(r)!=="object"&&typeof r!="function")return{default:r};var i=g();if(i&&i.has(r))return i.get(r);var s,n={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(s in r){var c;Object.prototype.hasOwnProperty.call(r,s)&&((c=l?Object.getOwnPropertyDescriptor(r,s):null)&&(c.get||c.set)?Object.defineProperty(n,s,c):n[s]=r[s])}return n.default=r,i&&i.set(r,n),n})(t("../core/constants"));function g(){var r;return typeof WeakMap!="function"?null:(r=new WeakMap,g=function(){return r},r)}function y(r){return(function(i){if(Array.isArray(i)){for(var s=0,n=new Array(i.length);s<i.length;s++)n[s]=i[s];return n}})(r)||(function(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)})(r)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}t("./p5.RenderBuffer"),u.default.RendererGL.prototype.beginShape=function(r){return this.immediateMode.shapeMode=r!==void 0?r:f.TESS,this.immediateMode.geometry.reset(),this.immediateMode.contourIndices=[],this};var o={vertices:1,vertexNormals:1,vertexColors:4,vertexStrokeColors:4,uvs:2},a=(u.default.RendererGL.prototype.beginContour=function(){if(this.immediateMode.shapeMode!==f.TESS)throw new Error("WebGL mode can only use contours with beginShape(TESS).");this.immediateMode.contourIndices.push(this.immediateMode.geometry.vertices.length)},u.default.RendererGL.prototype.vertex=function(r,i){if(this.immediateMode.shapeMode===f.QUADS&&this.immediateMode.geometry.vertices.length%6==3)for(var s in o){var n=o[s],s=this.immediateMode.geometry[s];s.push.apply(s,y(s.slice(s.length-3*n,s.length-2*n)).concat(y(s.slice(s.length-n,s.length))))}var l,c,d=l=c=0,v=(arguments.length===3?d=arguments[2]:arguments.length===4?(l=arguments[2],c=arguments[3]):arguments.length===5&&(d=arguments[2],l=arguments[3],c=arguments[4]),new u.default.Vector(r,i,d)),v=(this.immediateMode.geometry.vertices.push(v),this.immediateMode.geometry.vertexNormals.push(this._currentNormal),this.curFillColor||[.5,.5,.5,1]),v=(this.immediateMode.geometry.vertexColors.push(v[0],v[1],v[2],v[3]),this.curStrokeColor||[.5,.5,.5,1]);return this.immediateMode.geometry.vertexStrokeColors.push(v[0],v[1],v[2],v[3]),this.textureMode!==f.IMAGE||this.isProcessingVertices||(this._tex!==null?0<this._tex.width&&0<this._tex.height&&(l/=this._tex.width,c/=this._tex.height):this.userFillShader===void 0&&this.userStrokeShader===void 0&&this.userPointShader===void 0&&this._tex===null&&4<=arguments.length&&console.warn("You must first call texture() before using vertex() with image based u and v coordinates")),this.immediateMode.geometry.uvs.push(l,c),this.immediateMode._bezierVertex[0]=r,this.immediateMode._bezierVertex[1]=i,this.immediateMode._bezierVertex[2]=d,this.immediateMode._quadraticVertex[0]=r,this.immediateMode._quadraticVertex[1]=i,this.immediateMode._quadraticVertex[2]=d,this},u.default.RendererGL.prototype.normal=function(r,i,s){return r instanceof u.default.Vector?this._currentNormal=r:this._currentNormal=new u.default.Vector(r,i,s),this},u.default.RendererGL.prototype.endShape=function(r,i,s,n,l,c){var d,v=6<arguments.length&&arguments[6]!==void 0?arguments[6]:1;return this.immediateMode.shapeMode===f.POINTS?this._drawPoints(this.immediateMode.geometry.vertices,this.immediateMode.buffers.point):(this.immediateMode.geometry.vertices.length===3&&this.immediateMode.shapeMode===f.TESS&&(this.immediateMode.shapeMode=f.TRIANGLES),this.isProcessingVertices=!0,this._processVertices.apply(this,arguments),d=this.isProcessingVertices=!1,this.immediateMode.shapeMode!==f.LINE_STRIP&&this.immediateMode.shapeMode!==f.LINES||(this.immediateMode.shapeMode=f.TRIANGLE_FAN,d=!0),this.immediateMode.shapeMode===f.QUADS?this.immediateMode.shapeMode=f.TRIANGLES:this.immediateMode.shapeMode===f.QUAD_STRIP&&(this.immediateMode.shapeMode=f.TRIANGLE_STRIP),this._doFill&&!d&&!this.geometryBuilder&&3<=this.immediateMode.geometry.vertices.length&&this._drawImmediateFill(v),this._doStroke&&!this.geometryBuilder&&1<=this.immediateMode.geometry.lineVertices.length&&this._drawImmediateStroke(),this.geometryBuilder&&this.geometryBuilder.addImmediate(),this.isBezier=!1,this.isQuadratic=!1,this.isCurve=!1,this.immediateMode._bezierVertex.length=0,this.immediateMode._quadraticVertex.length=0,this.immediateMode._curveVertex.length=0),this},u.default.RendererGL.prototype._processVertices=function(r){var i;this.immediateMode.geometry.vertices.length!==0&&(i=this._doStroke,r=r===f.CLOSE,i&&(this.immediateMode.geometry.edges=this._calculateEdges(this.immediateMode.shapeMode,this.immediateMode.geometry.vertices,r),this.geometryBuilder||this.immediateMode.geometry._edgesToVertices()),i=this.immediateMode.shapeMode===f.TESS,r=0<this.immediateMode.contourIndices.length,this._doFill&&(this.isBezier||this.isQuadratic||this.isCurve||i||r)&&this.immediateMode.shapeMode!==f.LINES&&this._tesselateShape())},u.default.RendererGL.prototype._calculateEdges=function(r,i,s){var n=[],l=0,c=this.immediateMode.contourIndices.slice(),d=0;switch(r){case f.TRIANGLE_STRIP:for(l=0;l<i.length-2;l++)n.push([l,l+1]),n.push([l,l+2]);n.push([l,l+1]);break;case f.TRIANGLE_FAN:for(l=1;l<i.length-1;l++)n.push([0,l]),n.push([l,l+1]);n.push([0,i.length-1]);break;case f.TRIANGLES:for(l=0;l<i.length-2;l+=3)n.push([l,l+1]),n.push([l+1,l+2]),n.push([l+2,l]);break;case f.LINES:for(l=0;l<i.length-1;l+=2)n.push([l,l+1]);break;case f.QUADS:for(l=0;l<i.length-5;l+=6)n.push([l,l+1]),n.push([l+1,l+2]),n.push([l+3,l+5]),n.push([l+4,l+5]);break;case f.QUAD_STRIP:for(l=0;l<i.length-2;l+=2)n.push([l,l+1]),n.push([l,l+2]),n.push([l+1,l+3]);n.push([l,l+1]);break;default:for(l=0;l<i.length;l++)l+1<i.length&&l+1!==c[0]?n.push([l,l+1]):((s||d)&&n.push([l,d]),0<c.length&&(d=c.shift()))}return r!==f.TESS&&s&&n.push([i.length-1,0]),n},u.default.RendererGL.prototype._tesselateShape=function(){for(var r=this,i=(this.immediateMode.shapeMode=f.TRIANGLES,[[]]),s=0;s<this.immediateMode.geometry.vertices.length;s++)0<this.immediateMode.contourIndices.length&&this.immediateMode.contourIndices[0]===s&&(this.immediateMode.contourIndices.shift(),i.push([])),i[i.length-1].push(this.immediateMode.geometry.vertices[s].x,this.immediateMode.geometry.vertices[s].y,this.immediateMode.geometry.vertices[s].z,this.immediateMode.geometry.uvs[2*s],this.immediateMode.geometry.uvs[2*s+1],this.immediateMode.geometry.vertexColors[4*s],this.immediateMode.geometry.vertexColors[4*s+1],this.immediateMode.geometry.vertexColors[4*s+2],this.immediateMode.geometry.vertexColors[4*s+3],this.immediateMode.geometry.vertexNormals[s].x,this.immediateMode.geometry.vertexNormals[s].y,this.immediateMode.geometry.vertexNormals[s].z);for(var n,l=this._triangulate(i),c=this.immediateMode.geometry.vertices,d=(this.immediateMode.geometry.vertices=[],this.immediateMode.geometry.vertexNormals=[],this.immediateMode.geometry.uvs=[],[]),v=0,S=l.length;v<S;v+=u.default.RendererGL.prototype.tessyVertexSize)d.push.apply(d,y(l.slice(v+5,v+9))),this.normal.apply(this,y(l.slice(v+9,v+12))),this.vertex.apply(this,y(l.slice(v,v+5)));this.geometryBuilder&&(n=new Map,this.immediateMode.geometry.edges=this.immediateMode.geometry.edges.map(function(E){return E.map(function(_){if(!n.has(_)){var x=c[_],O=r.immediateMode.geometry.vertices.findIndex(function(z){return x.x===z.x&&x.y===z.y&&x.z===z.z});if(O===-1){for(var T=1/0,P=0,M=0;M<r.immediateMode.geometry.vertices.length;M++){var D=r.immediateMode.geometry.vertices[M],A=x.x-D.x,F=x.y-D.y,D=x.z-D.z,A=A*A+F*F+D*D;A<T&&(T=A,P=M)}O=P}n.set(_,O)}return n.get(_)})})),this.immediateMode.geometry.vertexColors=d},u.default.RendererGL.prototype._drawImmediateFill=function(){var r,i=0<arguments.length&&arguments[0]!==void 0?arguments[0]:1,s=this.GL,n=(this._useVertexColor=0<this.immediateMode.geometry.vertexColors.length,r=this._getImmediateFillShader(),this._setFillUniforms(r),!0),l=!1,c=void 0;try{for(var d,v=this.immediateMode.buffers.fill[Symbol.iterator]();!(n=(d=v.next()).done);n=!0)d.value._prepareBuffer(this.immediateMode.geometry,r)}catch(S){l=!0,c=S}finally{try{n||v.return==null||v.return()}finally{if(l)throw c}}if(r.disableRemainingAttributes(),this._applyColorBlend(this.curFillColor,this.immediateMode.geometry.hasFillTransparency()),i===1)s.drawArrays(this.immediateMode.shapeMode,0,this.immediateMode.geometry.vertices.length);else try{s.drawArraysInstanced(this.immediateMode.shapeMode,0,this.immediateMode.geometry.vertices.length,i)}catch{console.log("\u{1F338} p5.js says: Instancing is only supported in WebGL2 mode")}r.unbindShader()},u.default.RendererGL.prototype._drawImmediateStroke=function(){var r=this.GL,i=(this._useLineColor=0<this.immediateMode.geometry.vertexStrokeColors.length,this._getImmediateStrokeShader()),s=(this._setStrokeUniforms(i),!0),n=!1,l=void 0;try{for(var c,d=this.immediateMode.buffers.stroke[Symbol.iterator]();!(s=(c=d.next()).done);s=!0)c.value._prepareBuffer(this.immediateMode.geometry,i)}catch(v){n=!0,l=v}finally{try{s||d.return==null||d.return()}finally{if(n)throw l}}i.disableRemainingAttributes(),this._applyColorBlend(this.curStrokeColor,this.immediateMode.geometry.hasFillTransparency()),r.drawArrays(r.TRIANGLES,0,this.immediateMode.geometry.lineVertices.length/3),i.unbindShader()},u.default.RendererGL);C.default=a},{"../core/constants":272,"../core/main":283,"./p5.RenderBuffer":338,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.find-index":158,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.map":175,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],340:[function(t,W,C){"use strict";function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function m(o){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(a){return p(a)}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":p(a)})(o)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.some"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.uint16-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.some"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.uint16-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var u=(y=t("../core/main"))&&y.__esModule?y:{default:y},f=(t("./p5.RendererGL"),t("./p5.RenderBuffer"),(function(o){if(o&&o.__esModule)return o;if(o===null||m(o)!=="object"&&typeof o!="function")return{default:o};var a=g();if(a&&a.has(o))return a.get(o);var r,i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in o){var n;Object.prototype.hasOwnProperty.call(o,r)&&((n=s?Object.getOwnPropertyDescriptor(o,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=o[r])}return i.default=o,a&&a.set(o,i),i})(t("../core/constants")));function g(){var o;return typeof WeakMap!="function"?null:(o=new WeakMap,g=function(){return o},o)}u.default.RendererGL.prototype.freeGeometry=function(o){o.gid?this._freeBuffers(o.gid):console.warn("The model you passed to freeGeometry does not have an id!")},u.default.RendererGL.prototype._initBufferDefaults=function(o){var a;return this._freeBuffers(o),1e3<Object.keys(this.retainedMode.geometry).length&&(a=Object.keys(this.retainedMode.geometry)[0],this._freeBuffers(a)),this.retainedMode.geometry[o]={}},u.default.RendererGL.prototype._freeBuffers=function(o){var a,r=this.retainedMode.geometry[o];function i(s){var n=!0,l=!1,c=void 0;try{for(var d,v=s[Symbol.iterator]();!(n=(d=v.next()).done);n=!0){var S=d.value;r[S.dst]&&(a.deleteBuffer(r[S.dst]),r[S.dst]=null)}}catch(E){l=!0,c=E}finally{try{n||v.return==null||v.return()}finally{if(l)throw c}}}r&&(delete this.retainedMode.geometry[o],a=this.GL,r.indexBuffer&&a.deleteBuffer(r.indexBuffer),i(this.retainedMode.buffers.stroke),i(this.retainedMode.buffers.fill))},u.default.RendererGL.prototype.createBuffers=function(l,a){var r,i,s,n=this.GL,l=this._initBufferDefaults(l),c=(l.model=a,l.indexBuffer);return a.faces.length?(c=c||(l.indexBuffer=n.createBuffer()),s=(i=(r=u.default.RendererGL.prototype._flatten(a.faces)).some(function(d){return 65535<d}))?Uint32Array:Uint16Array,this._bindBuffer(c,n.ELEMENT_ARRAY_BUFFER,r,s),l.indexBufferType=i?n.UNSIGNED_INT:n.UNSIGNED_SHORT,l.vertexCount=3*a.faces.length):(c&&(n.deleteBuffer(c),l.indexBuffer=null),l.vertexCount=a.vertices?a.vertices.length:0),l.lineVertexCount=a.lineVertices?a.lineVertices.length/3:0,l},u.default.RendererGL.prototype.drawBuffers=function(o){var a=this.GL,r=this.retainedMode.geometry[o];if(!this.geometryBuilder&&this._doFill&&0<this.retainedMode.geometry[o].vertexCount){this._useVertexColor=0<r.model.vertexColors.length;var i=this._getRetainedFillShader(),s=(this._setFillUniforms(i),!0),n=!1,l=void 0;try{for(var c,d=this.retainedMode.buffers.fill[Symbol.iterator]();!(s=(c=d.next()).done);s=!0)c.value._prepareBuffer(r,i)}catch(x){n=!0,l=x}finally{try{s||d.return==null||d.return()}finally{if(n)throw l}}i.disableRemainingAttributes(),r.indexBuffer&&this._bindBuffer(r.indexBuffer,a.ELEMENT_ARRAY_BUFFER),this._applyColorBlend(this.curFillColor,r.model.hasFillTransparency()),this._drawElements(a.TRIANGLES,o),i.unbindShader()}if(!this.geometryBuilder&&this._doStroke&&0<r.lineVertexCount){this._useLineColor=0<r.model.vertexStrokeColors.length;var v=this._getRetainedStrokeShader(),S=(this._setStrokeUniforms(v),!0),n=!1,l=void 0;try{for(var E,_=this.retainedMode.buffers.stroke[Symbol.iterator]();!(S=(E=_.next()).done);S=!0)E.value._prepareBuffer(r,v)}catch(T){n=!0,l=T}finally{try{S||_.return==null||_.return()}finally{if(n)throw l}}v.disableRemainingAttributes(),this._applyColorBlend(this.curStrokeColor,r.model.hasStrokeTransparency()),this._drawArrays(a.TRIANGLES,o),v.unbindShader()}return this.geometryBuilder&&this.geometryBuilder.addRetained(r),this},u.default.RendererGL.prototype.drawBuffersScaled=function(o,a,r,i){var s=this.uModelMatrix.copy();try{this.uModelMatrix.scale(a,r,i),this.drawBuffers(o)}finally{this.uModelMatrix=s}},u.default.RendererGL.prototype._drawArrays=function(o,a){return this.GL.drawArrays(o,0,this.retainedMode.geometry[a].lineVertexCount),this},u.default.RendererGL.prototype._drawElements=function(o,r){var r=this.retainedMode.geometry[r],i=this.GL;if(r.indexBuffer){if(this._pInst.webglVersion!==f.WEBGL2&&r.indexBufferType===i.UNSIGNED_INT&&!i.getExtension("OES_element_index_uint"))throw new Error("Unable to render a 3d model with > 65535 triangles. Your web browser does not support the WebGL Extension OES_element_index_uint.");i.drawElements(i.TRIANGLES,r.vertexCount,r.indexBufferType,0)}else i.drawArrays(o||i.TRIANGLES,0,r.vertexCount)},u.default.RendererGL.prototype._drawPoints=function(o,a){var r=this.GL,i=this._getImmediatePointShader();this._setPointUniforms(i),this._bindBuffer(a,r.ARRAY_BUFFER,this._vToNArray(o),Float32Array,r.STATIC_DRAW),i.enableAttrib(i.attributes.aPosition,3),this._applyColorBlend(this.curStrokeColor),r.drawArrays(r.Points,0,o.length),i.unbindShader()};var y=u.default.RendererGL;C.default=y},{"../core/constants":272,"../core/main":283,"./p5.RenderBuffer":338,"./p5.RendererGL":341,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.some":170,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint16-array":240,"core-js/modules/es.typed-array.uint32-array":241,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],341:[function(M,W,C){"use strict";function p(U){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H})(U)}function m(U){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(H){return p(H)}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":p(H)})(U)}M("core-js/modules/es.symbol"),M("core-js/modules/es.symbol.description"),M("core-js/modules/es.symbol.iterator"),M("core-js/modules/es.array.concat"),M("core-js/modules/es.array.copy-within"),M("core-js/modules/es.array.every"),M("core-js/modules/es.array.fill"),M("core-js/modules/es.array.flat"),M("core-js/modules/es.array.flat-map"),M("core-js/modules/es.array.from"),M("core-js/modules/es.array.includes"),M("core-js/modules/es.array.iterator"),M("core-js/modules/es.array.map"),M("core-js/modules/es.array.slice"),M("core-js/modules/es.array.some"),M("core-js/modules/es.array.unscopables.flat"),M("core-js/modules/es.array.unscopables.flat-map"),M("core-js/modules/es.map"),M("core-js/modules/es.object.assign"),M("core-js/modules/es.object.get-own-property-descriptor"),M("core-js/modules/es.object.get-prototype-of"),M("core-js/modules/es.object.to-string"),M("core-js/modules/es.reflect.construct"),M("core-js/modules/es.reflect.get"),M("core-js/modules/es.regexp.to-string"),M("core-js/modules/es.set"),M("core-js/modules/es.string.includes"),M("core-js/modules/es.string.iterator"),M("core-js/modules/es.typed-array.float32-array"),M("core-js/modules/es.typed-array.float64-array"),M("core-js/modules/es.typed-array.int16-array"),M("core-js/modules/es.typed-array.uint8-array"),M("core-js/modules/es.typed-array.uint16-array"),M("core-js/modules/es.typed-array.uint32-array"),M("core-js/modules/es.typed-array.copy-within"),M("core-js/modules/es.typed-array.every"),M("core-js/modules/es.typed-array.fill"),M("core-js/modules/es.typed-array.filter"),M("core-js/modules/es.typed-array.find"),M("core-js/modules/es.typed-array.find-index"),M("core-js/modules/es.typed-array.for-each"),M("core-js/modules/es.typed-array.includes"),M("core-js/modules/es.typed-array.index-of"),M("core-js/modules/es.typed-array.iterator"),M("core-js/modules/es.typed-array.join"),M("core-js/modules/es.typed-array.last-index-of"),M("core-js/modules/es.typed-array.map"),M("core-js/modules/es.typed-array.reduce"),M("core-js/modules/es.typed-array.reduce-right"),M("core-js/modules/es.typed-array.reverse"),M("core-js/modules/es.typed-array.set"),M("core-js/modules/es.typed-array.slice"),M("core-js/modules/es.typed-array.some"),M("core-js/modules/es.typed-array.sort"),M("core-js/modules/es.typed-array.subarray"),M("core-js/modules/es.typed-array.to-locale-string"),M("core-js/modules/es.typed-array.to-string"),M("core-js/modules/es.weak-map"),M("core-js/modules/web.dom-collections.iterator"),M("core-js/modules/es.symbol"),M("core-js/modules/es.symbol.description"),M("core-js/modules/es.symbol.iterator"),M("core-js/modules/es.array.concat"),M("core-js/modules/es.array.copy-within"),M("core-js/modules/es.array.every"),M("core-js/modules/es.array.fill"),M("core-js/modules/es.array.flat"),M("core-js/modules/es.array.flat-map"),M("core-js/modules/es.array.from"),M("core-js/modules/es.array.includes"),M("core-js/modules/es.array.iterator"),M("core-js/modules/es.array.map"),M("core-js/modules/es.array.slice"),M("core-js/modules/es.array.some"),M("core-js/modules/es.array.unscopables.flat"),M("core-js/modules/es.array.unscopables.flat-map"),M("core-js/modules/es.map"),M("core-js/modules/es.object.assign"),M("core-js/modules/es.object.to-string"),M("core-js/modules/es.set"),M("core-js/modules/es.string.includes"),M("core-js/modules/es.string.iterator"),M("core-js/modules/es.typed-array.float32-array"),M("core-js/modules/es.typed-array.float64-array"),M("core-js/modules/es.typed-array.int16-array"),M("core-js/modules/es.typed-array.uint8-array"),M("core-js/modules/es.typed-array.uint16-array"),M("core-js/modules/es.typed-array.uint32-array"),M("core-js/modules/es.typed-array.copy-within"),M("core-js/modules/es.typed-array.every"),M("core-js/modules/es.typed-array.fill"),M("core-js/modules/es.typed-array.filter"),M("core-js/modules/es.typed-array.find"),M("core-js/modules/es.typed-array.find-index"),M("core-js/modules/es.typed-array.for-each"),M("core-js/modules/es.typed-array.includes"),M("core-js/modules/es.typed-array.index-of"),M("core-js/modules/es.typed-array.iterator"),M("core-js/modules/es.typed-array.join"),M("core-js/modules/es.typed-array.last-index-of"),M("core-js/modules/es.typed-array.map"),M("core-js/modules/es.typed-array.reduce"),M("core-js/modules/es.typed-array.reduce-right"),M("core-js/modules/es.typed-array.reverse"),M("core-js/modules/es.typed-array.set"),M("core-js/modules/es.typed-array.slice"),M("core-js/modules/es.typed-array.some"),M("core-js/modules/es.typed-array.sort"),M("core-js/modules/es.typed-array.subarray"),M("core-js/modules/es.typed-array.to-locale-string"),M("core-js/modules/es.typed-array.to-string"),M("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.readPixelsWebGL=z,C.readPixelWebGL=G,C.default=void 0;var u=r(M("../core/main")),f=(function(U){if(U&&U.__esModule)return U;if(U===null||m(U)!=="object"&&typeof U!="function")return{default:U};var H=a();if(H&&H.has(U))return H.get(U);var Y,oe={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(Y in U){var j;Object.prototype.hasOwnProperty.call(U,Y)&&((j=L?Object.getOwnPropertyDescriptor(U,Y):null)&&(j.get||j.set)?Object.defineProperty(oe,Y,j):oe[Y]=U[Y])}return oe.default=U,H&&H.set(U,oe),oe})(M("../core/constants")),g=r(M("./GeometryBuilder")),y=r(M("libtess")),o=(M("./p5.Shader"),M("./p5.Camera"),M("../core/p5.Renderer"),M("./p5.Matrix"),M("./p5.Framebuffer"),M("path"),M("./p5.Texture"));function a(){var U;return typeof WeakMap!="function"?null:(U=new WeakMap,a=function(){return U},U)}function r(U){return U&&U.__esModule?U:{default:U}}function i(U){return(function(H){if(Array.isArray(H)){for(var Y=0,oe=new Array(H.length);Y<H.length;Y++)oe[Y]=H[Y];return oe}})(U)||(function(H){if(Symbol.iterator in Object(H)||Object.prototype.toString.call(H)==="[object Arguments]")return Array.from(H)})(U)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}function s(U,H){for(var Y=0;Y<H.length;Y++){var oe=H[Y];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(U,oe.key,oe)}}function n(U,H,Y){return(n=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(R,L,j){var R=(function(N,X){for(;!Object.prototype.hasOwnProperty.call(N,X)&&(N=v(N))!==null;);return N})(R,L);if(R)return(R=Object.getOwnPropertyDescriptor(R,L)).get?R.get.call(j):R.value})(U,H,Y||U)}function l(U,H){return(l=Object.setPrototypeOf||function(Y,oe){return Y.__proto__=oe,Y})(U,H)}function c(U){return function(){var H,Y,oe=v(U);return H=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(H=v(this).constructor,Reflect.construct(oe,arguments,H)):oe.apply(this,arguments),oe=this,!(Y=H)||m(Y)!=="object"&&typeof Y!="function"?d(oe):Y}}function d(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function v(U){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)})(U)}function S(U,H,Y){H in U?Object.defineProperty(U,H,{value:Y,enumerable:!0,configurable:!0,writable:!0}):U[H]=Y}function E(U,H){P+="#define STROKE_CAP_".concat(U," ").concat(H,`
`),O[f[U]]=H}function _(U,H){P+="#define STROKE_JOIN_".concat(U," ").concat(H,`
`),T[f[U]]=H}var x,O={},T={},P="",M=(E("ROUND",0),E("PROJECT",1),E("SQUARE",2),_("ROUND",0),_("MITER",1),_("BEVEL",2),`#define PI 3.141592

precision highp float;
precision highp int;

uniform mat4 uViewMatrix;

uniform bool uUseLighting;

uniform int uAmbientLightCount;
uniform vec3 uAmbientColor[5];
uniform mat3 uCameraRotation;
uniform int uDirectionalLightCount;
uniform vec3 uLightingDirection[5];
uniform vec3 uDirectionalDiffuseColors[5];
uniform vec3 uDirectionalSpecularColors[5];

uniform int uPointLightCount;
uniform vec3 uPointLightLocation[5];
uniform vec3 uPointLightDiffuseColors[5];	
uniform vec3 uPointLightSpecularColors[5];

uniform int uSpotLightCount;
uniform float uSpotLightAngle[5];
uniform float uSpotLightConc[5];
uniform vec3 uSpotLightDiffuseColors[5];
uniform vec3 uSpotLightSpecularColors[5];
uniform vec3 uSpotLightLocation[5];
uniform vec3 uSpotLightDirection[5];

uniform bool uSpecular;
uniform float uShininess;
uniform float uMetallic;

uniform float uConstantAttenuation;
uniform float uLinearAttenuation;
uniform float uQuadraticAttenuation;

// setting from  _setImageLightUniforms()
// boolean to initiate the calculateImageDiffuse and calculateImageSpecular
uniform bool uUseImageLight;
// texture for use in calculateImageDiffuse
uniform sampler2D environmentMapDiffused;
// texture for use in calculateImageSpecular
uniform sampler2D environmentMapSpecular;

const float specularFactor = 2.0;
const float diffuseFactor = 0.73;

struct LightResult {
  float specular;
  float diffuse;
};

float _phongSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float shininess) {

  vec3 R = reflect(lightDirection, surfaceNormal);
  return pow(max(0.0, dot(R, viewDirection)), shininess);
}

float _lambertDiffuse(vec3 lightDirection, vec3 surfaceNormal) {
  return max(0.0, dot(-lightDirection, surfaceNormal));
}

LightResult _light(vec3 viewDirection, vec3 normal, vec3 lightVector, float shininess, float metallic) {

  vec3 lightDir = normalize(lightVector);

  //compute our diffuse & specular terms
  LightResult lr;
  float specularIntensity = mix(1.0, 0.4, metallic);
  float diffuseIntensity = mix(1.0, 0.1, metallic);
  if (uSpecular)
    lr.specular = (_phongSpecular(lightDir, viewDirection, normal, shininess)) * specularIntensity;
    lr.diffuse = _lambertDiffuse(lightDir, normal) * diffuseIntensity;
  return lr;
}

// converts the range of "value" from [min1 to max1] to [min2 to max2]
float map(float value, float min1, float max1, float min2, float max2) {
  return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
}

vec2 mapTextureToNormal( vec3 v ){
  // x = r sin(phi) cos(theta)   
  // y = r cos(phi)  
  // z = r sin(phi) sin(theta)
  float phi = acos( v.y );
  // if phi is 0, then there are no x, z components
  float theta = 0.0;
  // else 
  theta = acos(v.x / sin(phi));
  float sinTheta = v.z / sin(phi);
  if (sinTheta < 0.0) {
    // Turn it into -theta, but in the 0-2PI range
    theta = 2.0 * PI - theta;
  }
  theta = theta / (2.0 * 3.14159);
  phi = phi / 3.14159 ;
  
  vec2 angles = vec2( fract(theta + 0.25), 1.0 - phi );
  return angles;
}


vec3 calculateImageDiffuse(vec3 vNormal, vec3 vViewPosition, float metallic){
  // make 2 separate builds 
  vec3 worldCameraPosition =  vec3(0.0, 0.0, 0.0);  // hardcoded world camera position
  vec3 worldNormal = normalize(vNormal * uCameraRotation);
  vec2 newTexCoor = mapTextureToNormal( worldNormal );
  vec4 texture = TEXTURE( environmentMapDiffused, newTexCoor );
  // this is to make the darker sections more dark
  // png and jpg usually flatten the brightness so it is to reverse that
  return mix(smoothstep(vec3(0.0), vec3(1.0), texture.xyz), vec3(0.0), metallic);
}

vec3 calculateImageSpecular(vec3 vNormal, vec3 vViewPosition, float shininess, float metallic){
  vec3 worldCameraPosition =  vec3(0.0, 0.0, 0.0);
  vec3 worldNormal = normalize(vNormal);
  vec3 lightDirection = normalize( vViewPosition - worldCameraPosition );
  vec3 R = reflect(lightDirection, worldNormal) * uCameraRotation;
  vec2 newTexCoor = mapTextureToNormal( R );
#ifdef WEBGL2
  // In p5js the range of shininess is >= 1,
  // Therefore roughness range will be ([0,1]*8)*20 or [0, 160]
  // The factor of 8 is because currently the getSpecularTexture
  // only calculated 8 different levels of roughness
  // The factor of 20 is just to spread up this range so that,
  // [1, max] of shininess is converted to [0,160] of roughness
  float roughness = 20. / shininess;
  vec4 outColor = textureLod(environmentMapSpecular, newTexCoor, roughness * 8.);
#else
  vec4 outColor = TEXTURE(environmentMapSpecular, newTexCoor);
#endif
  // this is to make the darker sections more dark
  // png and jpg usually flatten the brightness so it is to reverse that
  return mix(
    pow(outColor.xyz, vec3(10)),
    pow(outColor.xyz, vec3(1.2)),
    metallic 
  );
}

void totalLight(
  vec3 modelPosition,
  vec3 normal,
  float shininess,
  float metallic,
  out vec3 totalDiffuse,
  out vec3 totalSpecular
) {

  totalSpecular = vec3(0.0);

  if (!uUseLighting) {
    totalDiffuse = vec3(1.0);
    return;
  }

  totalDiffuse = vec3(0.0);

  vec3 viewDirection = normalize(-modelPosition);

  for (int j = 0; j < 5; j++) {
    if (j < uDirectionalLightCount) {
      vec3 lightVector = (uViewMatrix * vec4(uLightingDirection[j], 0.0)).xyz;
      vec3 lightColor = uDirectionalDiffuseColors[j];
      vec3 specularColor = uDirectionalSpecularColors[j];
      LightResult result = _light(viewDirection, normal, lightVector, shininess, metallic);
      totalDiffuse += result.diffuse * lightColor;
      totalSpecular += result.specular * lightColor * specularColor;
    }

    if (j < uPointLightCount) {
      vec3 lightPosition = (uViewMatrix * vec4(uPointLightLocation[j], 1.0)).xyz;
      vec3 lightVector = modelPosition - lightPosition;
      //calculate attenuation
      float lightDistance = length(lightVector);
      float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);
      vec3 lightColor = lightFalloff * uPointLightDiffuseColors[j];
      vec3 specularColor = lightFalloff * uPointLightSpecularColors[j];

      LightResult result = _light(viewDirection, normal, lightVector, shininess, metallic);
      totalDiffuse += result.diffuse * lightColor;
      totalSpecular += result.specular * lightColor * specularColor;
    }

    if(j < uSpotLightCount) {
      vec3 lightPosition = (uViewMatrix * vec4(uSpotLightLocation[j], 1.0)).xyz;
      vec3 lightVector = modelPosition - lightPosition;
    
      float lightDistance = length(lightVector);
      float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);

      vec3 lightDirection = (uViewMatrix * vec4(uSpotLightDirection[j], 0.0)).xyz;
      float spotDot = dot(normalize(lightVector), normalize(lightDirection));
      float spotFalloff;
      if(spotDot < uSpotLightAngle[j]) {
        spotFalloff = 0.0;
      }
      else {
        spotFalloff = pow(spotDot, uSpotLightConc[j]);
      }
      lightFalloff *= spotFalloff;

      vec3 lightColor = uSpotLightDiffuseColors[j];
      vec3 specularColor = uSpotLightSpecularColors[j];
     
      LightResult result = _light(viewDirection, normal, lightVector, shininess, metallic);
      
      totalDiffuse += result.diffuse * lightColor * lightFalloff;
      totalSpecular += result.specular * lightColor * specularColor * lightFalloff;
    }
  }

  if( uUseImageLight ){
    totalDiffuse += calculateImageDiffuse(normal, modelPosition, metallic);
    totalSpecular += calculateImageSpecular(normal, modelPosition, shininess, metallic);
  }

  totalDiffuse *= diffuseFactor;
  totalSpecular *= specularFactor;
}
`),F={sphereMappingFrag:`#define PI 3.141592

precision highp float;
  
uniform sampler2D uSampler;
uniform mat3 uNewNormalMatrix;
uniform float uFovY;
uniform float uAspect;

varying vec2 vTexCoord;
  
void main() {
    float uFovX = uFovY * uAspect; 
    vec4 newTexColor = texture2D(uSampler, vTexCoord);
    float angleY = mix(uFovY/2.0,  -uFovY/2.0, vTexCoord.y);
    float angleX = mix(uFovX/2.0, -uFovX/2.0, vTexCoord.x);
    vec3 rotatedNormal = vec3( angleX, angleY, 1.0 );
    rotatedNormal = uNewNormalMatrix * normalize(rotatedNormal);
    float temp = rotatedNormal.z;
    rotatedNormal.z = rotatedNormal.x;
    rotatedNormal.x = -temp;
    vec2 suv;
    suv.y = 0.5 + 0.5 * (-rotatedNormal.y);
    suv.x = atan(rotatedNormal.z, rotatedNormal.x) / (2.0 * PI) + 0.5;
    newTexColor = texture2D(uSampler, suv.xy);
    gl_FragColor = newTexColor;
}
`,immediateVert:`IN vec3 aPosition;
IN vec4 aVertexColor;

uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform float uResolution;
uniform float uPointSize;

OUT vec4 vColor;
void main(void) {
  vec4 positionVec4 = vec4(aPosition, 1.0);
  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;
  vColor = aVertexColor;
  gl_PointSize = uPointSize;
}
`,vertexColorVert:`IN vec3 aPosition;
IN vec4 aVertexColor;

uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;

OUT vec4 vColor;

void main(void) {
  vec4 positionVec4 = vec4(aPosition, 1.0);
  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;
  vColor = aVertexColor;
}
`,vertexColorFrag:`IN vec4 vColor;
void main(void) {
  OUT_COLOR = vec4(vColor.rgb, 1.) * vColor.a;
}
`,normalVert:`IN vec3 aPosition;
IN vec3 aNormal;
IN vec2 aTexCoord;
IN vec4 aVertexColor;

uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform mat3 uNormalMatrix;

uniform vec4 uMaterialColor;
uniform bool uUseVertexColor;

OUT vec3 vVertexNormal;
OUT highp vec2 vVertTexCoord;
OUT vec4 vColor;

void main(void) {
  HOOK_beforeVertex();
  vec4 positionVec4 = vec4(HOOK_getWorldPosition(
    (uModelViewMatrix * vec4(HOOK_getLocalPosition(aPosition), 1.0)).xyz
  ), 1.);

  gl_Position = uProjectionMatrix * positionVec4;

  vVertexNormal = HOOK_getWorldNormal(normalize(uNormalMatrix * HOOK_getLocalNormal(aNormal)));
  vVertTexCoord = HOOK_getUV(aTexCoord);
  vColor = HOOK_getVertexColor(uUseVertexColor ? aVertexColor : uMaterialColor);
  HOOK_afterVertex();
}
`,normalFrag:`IN vec3 vVertexNormal;
void main(void) {
  HOOK_beforeFragment();
  OUT_COLOR = HOOK_getFinalColor(vec4(vVertexNormal, 1.0));
  HOOK_afterFragment();
}
`,basicFrag:`IN vec4 vColor;
void main(void) {
  HOOK_beforeFragment();
  OUT_COLOR = HOOK_getFinalColor(vec4(vColor.rgb, 1.) * vColor.a);
  HOOK_afterFragment();
}
`,lightVert:M+`// include lighting.glgl

IN vec3 aPosition;
IN vec3 aNormal;
IN vec2 aTexCoord;
IN vec4 aVertexColor;

uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform mat3 uNormalMatrix;

uniform bool uUseVertexColor;
uniform vec4 uMaterialColor;

OUT highp vec2 vVertTexCoord;
OUT vec3 vDiffuseColor;
OUT vec3 vSpecularColor;
OUT vec4 vColor;

void main(void) {

  vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);
  gl_Position = uProjectionMatrix * viewModelPosition;

  vec3 vertexNormal = normalize(uNormalMatrix * aNormal);
  vVertTexCoord = aTexCoord;

  totalLight(viewModelPosition.xyz, vertexNormal, vDiffuseColor, vSpecularColor);

  for (int i = 0; i < 8; i++) {
    if (i < uAmbientLightCount) {
      vDiffuseColor += uAmbientColor[i];
    }
  }
  
  vColor = (uUseVertexColor ? aVertexColor : uMaterialColor);
}
`,lightTextureFrag:`uniform vec4 uTint;
uniform sampler2D uSampler;
uniform bool isTexture;
uniform bool uEmissive;

IN highp vec2 vVertTexCoord;
IN vec3 vDiffuseColor;
IN vec3 vSpecularColor;
IN vec4 vColor;

void main(void) {
  if(uEmissive && !isTexture) {
    OUT_COLOR = vColor;
  }
  else {
    vec4 baseColor = isTexture
      // Textures come in with premultiplied alpha. To apply tint and still have
      // premultiplied alpha output, we need to multiply the RGB channels by the
      // tint RGB, and all channels by the tint alpha.
      ? TEXTURE(uSampler, vVertTexCoord) * vec4(uTint.rgb/255., 1.) * (uTint.a/255.)
      // Colors come in with unmultiplied alpha, so we need to multiply the RGB
      // channels by alpha to convert it to premultiplied alpha.
      : vec4(vColor.rgb * vColor.a, vColor.a);
    OUT_COLOR = vec4(baseColor.rgb * vDiffuseColor + vSpecularColor, baseColor.a);
  }
}
`,phongVert:`precision highp int;

IN vec3 aPosition;
IN vec3 aNormal;
IN vec2 aTexCoord;
IN vec4 aVertexColor;

uniform vec3 uAmbientColor[5];

uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform mat3 uNormalMatrix;
uniform int uAmbientLightCount;

uniform bool uUseVertexColor;
uniform vec4 uMaterialColor;

OUT vec3 vNormal;
OUT vec2 vTexCoord;
OUT vec3 vViewPosition;
OUT vec3 vAmbientColor;
OUT vec4 vColor;

void main(void) {
  HOOK_beforeVertex();
  vec4 viewModelPosition = vec4(HOOK_getWorldPosition(
    (uModelViewMatrix * vec4(HOOK_getLocalPosition(aPosition), 1.0)).xyz
  ), 1.);

  // Pass varyings to fragment shader
  vViewPosition = viewModelPosition.xyz;
  gl_Position = uProjectionMatrix * viewModelPosition;  

  vNormal = HOOK_getWorldNormal(uNormalMatrix * HOOK_getLocalNormal(aNormal));
  vTexCoord = HOOK_getUV(aTexCoord);

  // TODO: this should be a uniform
  vAmbientColor = vec3(0.0);
  for (int i = 0; i < 5; i++) {
    if (i < uAmbientLightCount) {
      vAmbientColor += uAmbientColor[i];
    }
  }
  
  vColor = HOOK_getVertexColor((uUseVertexColor ? aVertexColor : uMaterialColor));
  HOOK_afterVertex();
}
`,phongFrag:M+`// include lighting.glsl
precision highp int;

uniform bool uHasSetAmbient;
uniform vec4 uSpecularMatColor;
uniform vec4 uAmbientMatColor;
uniform vec4 uEmissiveMatColor;

uniform vec4 uTint;
uniform sampler2D uSampler;
uniform bool isTexture;

IN vec3 vNormal;
IN vec2 vTexCoord;
IN vec3 vViewPosition;
IN vec3 vAmbientColor;
IN vec4 vColor;

struct ColorComponents {
  vec3 baseColor;
  float opacity;
  vec3 ambientColor;
  vec3 specularColor;
  vec3 diffuse;
  vec3 ambient;
  vec3 specular;
  vec3 emissive;
};

struct Inputs {
  vec3 normal;
  vec2 texCoord;
  vec3 ambientLight;
  vec3 ambientMaterial;
  vec3 specularMaterial;
  vec3 emissiveMaterial;
  vec4 color;
  float shininess;
  float metalness;
};

void main(void) {
  HOOK_beforeFragment();

  Inputs inputs;
  inputs.normal = normalize(vNormal);
  inputs.texCoord = vTexCoord;
  inputs.ambientLight = vAmbientColor;
  inputs.color = isTexture
      // Textures come in with premultiplied alpha. To apply tint and still have
      // premultiplied alpha output, we need to multiply the RGB channels by the
      // tint RGB, and all channels by the tint alpha.
      ? TEXTURE(uSampler, vTexCoord) * vec4(uTint.rgb/255., 1.) * (uTint.a/255.)
      // Colors come in with unmultiplied alpha, so we need to multiply the RGB
      // channels by alpha to convert it to premultiplied alpha.
      : vec4(vColor.rgb * vColor.a, vColor.a);
  inputs.shininess = uShininess;
  inputs.metalness = uMetallic;
  inputs.ambientMaterial = uHasSetAmbient ? uAmbientMatColor.rgb : inputs.color.rgb;
  inputs.specularMaterial = uSpecularMatColor.rgb;
  inputs.emissiveMaterial = uEmissiveMatColor.rgb;
  inputs = HOOK_getPixelInputs(inputs);

  vec3 diffuse;
  vec3 specular;
  totalLight(vViewPosition, inputs.normal, inputs.shininess, inputs.metalness, diffuse, specular);

  // Calculating final color as result of all lights (plus emissive term).

  vec2 texCoord = inputs.texCoord;
  vec4 baseColor = inputs.color;
  ColorComponents c;
  c.opacity = baseColor.a;
  c.baseColor = baseColor.rgb;
  c.ambientColor = inputs.ambientMaterial;
  c.specularColor = inputs.specularMaterial;
  c.diffuse = diffuse;
  c.ambient = inputs.ambientLight;
  c.specular = specular;
  c.emissive = inputs.emissiveMaterial;
  OUT_COLOR = HOOK_getFinalColor(HOOK_combineColors(c));
  HOOK_afterFragment();
}
`,fontVert:`IN vec3 aPosition;
IN vec2 aTexCoord;
uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;

uniform vec4 uGlyphRect;
uniform float uGlyphOffset;

OUT vec2 vTexCoord;
OUT float w;

void main() {
  vec4 positionVec4 = vec4(aPosition, 1.0);

  // scale by the size of the glyph's rectangle
  positionVec4.xy *= uGlyphRect.zw - uGlyphRect.xy;

  // Expand glyph bounding boxes by 1px on each side to give a bit of room
  // for antialiasing
  vec3 newOrigin = (uModelViewMatrix * vec4(0., 0., 0., 1.)).xyz;
  vec3 newDX = (uModelViewMatrix * vec4(1., 0., 0., 1.)).xyz;
  vec3 newDY = (uModelViewMatrix * vec4(0., 1., 0., 1.)).xyz;
  vec2 pixelScale = vec2(
    1. / length(newOrigin - newDX),
    1. / length(newOrigin - newDY)
  );
  vec2 offset = pixelScale * normalize(aTexCoord - vec2(0.5, 0.5)) * vec2(1., -1.);
  vec2 textureOffset = offset * (1. / vec2(
    uGlyphRect.z - uGlyphRect.x,
    uGlyphRect.w - uGlyphRect.y
  ));

  // move to the corner of the glyph
  positionVec4.xy += uGlyphRect.xy;

  // move to the letter's line offset
  positionVec4.x += uGlyphOffset;

  positionVec4.xy += offset;
  
  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;
  vTexCoord = aTexCoord + textureOffset;
  w = gl_Position.w;
}
`,fontFrag:`#ifndef WEBGL2
#extension GL_OES_standard_derivatives : enable
#endif

#if 0
  // simulate integer math using floats
	#define int float
	#define ivec2 vec2
	#define INT(x) float(x)

	int ifloor(float v) { return floor(v); }
	ivec2 ifloor(vec2 v) { return floor(v); }

#else
  // use native integer math
	precision highp int;
	#define INT(x) x

	int ifloor(float v) { return int(v); }
	int ifloor(int v) { return v; }
	ivec2 ifloor(vec2 v) { return ivec2(v); }

#endif

uniform sampler2D uSamplerStrokes;
uniform sampler2D uSamplerRowStrokes;
uniform sampler2D uSamplerRows;
uniform sampler2D uSamplerColStrokes;
uniform sampler2D uSamplerCols;

uniform ivec2 uStrokeImageSize;
uniform ivec2 uCellsImageSize;
uniform ivec2 uGridImageSize;

uniform ivec2 uGridOffset;
uniform ivec2 uGridSize;
uniform vec4 uMaterialColor;

IN vec2 vTexCoord;

// some helper functions
int ROUND(float v) { return ifloor(v + 0.5); }
ivec2 ROUND(vec2 v) { return ifloor(v + 0.5); }
float saturate(float v) { return clamp(v, 0.0, 1.0); }
vec2 saturate(vec2 v) { return clamp(v, 0.0, 1.0); }

int mul(float v1, int v2) {
  return ifloor(v1 * float(v2));
}

ivec2 mul(vec2 v1, ivec2 v2) {
  return ifloor(v1 * vec2(v2) + 0.5);
}

// unpack a 16-bit integer from a float vec2
int getInt16(vec2 v) {
  ivec2 iv = ROUND(v * 255.0);
  return iv.x * INT(128) + iv.y;
}

vec2 pixelScale;
vec2 coverage = vec2(0.0);
vec2 weight = vec2(0.5);
const float minDistance = 1.0/8192.0;
const float hardness = 1.05; // amount of antialias

// the maximum number of curves in a glyph
const int N = INT(250);

// retrieves an indexed pixel from a sampler
vec4 getTexel(sampler2D sampler, int pos, ivec2 size) {
  int width = size.x;
  int y = ifloor(pos / width);
  int x = pos - y * width;  // pos % width

  return TEXTURE(sampler, (vec2(x, y) + 0.5) / vec2(size));
}

void calulateCrossings(vec2 p0, vec2 p1, vec2 p2, out vec2 C1, out vec2 C2) {

  // get the coefficients of the quadratic in t
  vec2 a = p0 - p1 * 2.0 + p2;
  vec2 b = p0 - p1;
  vec2 c = p0 - vTexCoord;

  // found out which values of 't' it crosses the axes
  vec2 surd = sqrt(max(vec2(0.0), b * b - a * c));
  vec2 t1 = ((b - surd) / a).yx;
  vec2 t2 = ((b + surd) / a).yx;

  // approximate straight lines to avoid rounding errors
  if (abs(a.y) < 0.001)
    t1.x = t2.x = c.y / (2.0 * b.y);

  if (abs(a.x) < 0.001)
    t1.y = t2.y = c.x / (2.0 * b.x);

  // plug into quadratic formula to find the corrdinates of the crossings
  C1 = ((a * t1 - b * 2.0) * t1 + c) * pixelScale;
  C2 = ((a * t2 - b * 2.0) * t2 + c) * pixelScale;
}

void coverageX(vec2 p0, vec2 p1, vec2 p2) {

  vec2 C1, C2;
  calulateCrossings(p0, p1, p2, C1, C2);

  // determine on which side of the x-axis the points lie
  bool y0 = p0.y > vTexCoord.y;
  bool y1 = p1.y > vTexCoord.y;
  bool y2 = p2.y > vTexCoord.y;

  // could web be under the curve (after t1)?
  if (y1 ? !y2 : y0) {
    // add the coverage for t1
    coverage.x += saturate(C1.x + 0.5);
    // calculate the anti-aliasing for t1
    weight.x = min(weight.x, abs(C1.x));
  }

  // are we outside the curve (after t2)?
  if (y1 ? !y0 : y2) {
    // subtract the coverage for t2
    coverage.x -= saturate(C2.x + 0.5);
    // calculate the anti-aliasing for t2
    weight.x = min(weight.x, abs(C2.x));
  }
}

// this is essentially the same as coverageX, but with the axes swapped
void coverageY(vec2 p0, vec2 p1, vec2 p2) {

  vec2 C1, C2;
  calulateCrossings(p0, p1, p2, C1, C2);

  bool x0 = p0.x > vTexCoord.x;
  bool x1 = p1.x > vTexCoord.x;
  bool x2 = p2.x > vTexCoord.x;

  if (x1 ? !x2 : x0) {
    coverage.y -= saturate(C1.y + 0.5);
    weight.y = min(weight.y, abs(C1.y));
  }

  if (x1 ? !x0 : x2) {
    coverage.y += saturate(C2.y + 0.5);
    weight.y = min(weight.y, abs(C2.y));
  }
}

void main() {

  // calculate the pixel scale based on screen-coordinates
  pixelScale = hardness / fwidth(vTexCoord);

  // which grid cell is this pixel in?
  ivec2 gridCoord = ifloor(vTexCoord * vec2(uGridSize));

  // intersect curves in this row
  {
    // the index into the row info bitmap
    int rowIndex = gridCoord.y + uGridOffset.y;
    // fetch the info texel
    vec4 rowInfo = getTexel(uSamplerRows, rowIndex, uGridImageSize);
    // unpack the rowInfo
    int rowStrokeIndex = getInt16(rowInfo.xy);
    int rowStrokeCount = getInt16(rowInfo.zw);

    for (int iRowStroke = INT(0); iRowStroke < N; iRowStroke++) {
      if (iRowStroke >= rowStrokeCount)
        break;

      // each stroke is made up of 3 points: the start and control point
      // and the start of the next curve.
      // fetch the indices of this pair of strokes:
      vec4 strokeIndices = getTexel(uSamplerRowStrokes, rowStrokeIndex++, uCellsImageSize);

      // unpack the stroke index
      int strokePos = getInt16(strokeIndices.xy);

      // fetch the two strokes
      vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);
      vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);

      // calculate the coverage
      coverageX(stroke0.xy, stroke0.zw, stroke1.xy);
    }
  }

  // intersect curves in this column
  {
    int colIndex = gridCoord.x + uGridOffset.x;
    vec4 colInfo = getTexel(uSamplerCols, colIndex, uGridImageSize);
    int colStrokeIndex = getInt16(colInfo.xy);
    int colStrokeCount = getInt16(colInfo.zw);
    
    for (int iColStroke = INT(0); iColStroke < N; iColStroke++) {
      if (iColStroke >= colStrokeCount)
        break;

      vec4 strokeIndices = getTexel(uSamplerColStrokes, colStrokeIndex++, uCellsImageSize);

      int strokePos = getInt16(strokeIndices.xy);
      vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);
      vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);
      coverageY(stroke0.xy, stroke0.zw, stroke1.xy);
    }
  }

  weight = saturate(1.0 - weight * 2.0);
  float distance = max(weight.x + weight.y, minDistance); // manhattan approx.
  float antialias = abs(dot(coverage, weight) / distance);
  float cover = min(abs(coverage.x), abs(coverage.y));
  OUT_COLOR = vec4(uMaterialColor.rgb, 1.) * uMaterialColor.a;
  OUT_COLOR *= saturate(max(antialias, cover));
}
`,lineVert:P+`/*
  Part of the Processing project - http://processing.org
  Copyright (c) 2012-15 The Processing Foundation
  Copyright (c) 2004-12 Ben Fry and Casey Reas
  Copyright (c) 2001-04 Massachusetts Institute of Technology
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation, version 2.1.
  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General
  Public License along with this library; if not, write to the
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA  02111-1307  USA
*/

#define PROCESSING_LINE_SHADER

precision highp int;
precision highp float;

uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform float uStrokeWeight;

uniform bool uUseLineColor;
uniform vec4 uMaterialColor;

uniform vec4 uViewport;
uniform int uPerspective;
uniform int uStrokeJoin;

IN vec4 aPosition;
IN vec3 aTangentIn;
IN vec3 aTangentOut;
IN float aSide;
IN vec4 aVertexColor;

OUT vec4 vColor;
OUT vec2 vTangent;
OUT vec2 vCenter;
OUT vec2 vPosition;
OUT float vMaxDist;
OUT float vCap;
OUT float vJoin;
OUT float vStrokeWeight;

vec2 lineIntersection(vec2 aPoint, vec2 aDir, vec2 bPoint, vec2 bDir) {
  // Rotate and translate so a starts at the origin and goes out to the right
  bPoint -= aPoint;
  vec2 rotatedBFrom = vec2(
    bPoint.x*aDir.x + bPoint.y*aDir.y,
    bPoint.y*aDir.x - bPoint.x*aDir.y
  );
  vec2 bTo = bPoint + bDir;
  vec2 rotatedBTo = vec2(
    bTo.x*aDir.x + bTo.y*aDir.y,
    bTo.y*aDir.x - bTo.x*aDir.y
  );
  float intersectionDistance =
    rotatedBTo.x + (rotatedBFrom.x - rotatedBTo.x) * rotatedBTo.y /
    (rotatedBTo.y - rotatedBFrom.y);
  return aPoint + aDir * intersectionDistance;
}

void main() {
  HOOK_beforeVertex();
  // Caps have one of either the in or out tangent set to 0
  vCap = (aTangentIn == vec3(0.)) != (aTangentOut == (vec3(0.)))
    ? 1. : 0.;

  // Joins have two unique, defined tangents
  vJoin = (
    aTangentIn != vec3(0.) &&
    aTangentOut != vec3(0.) &&
    aTangentIn != aTangentOut
  ) ? 1. : 0.;

  vec4 localPosition = vec4(HOOK_getLocalPosition(aPosition.xyz), 1.);
  vec4 posp = vec4(HOOK_getWorldPosition((uModelViewMatrix * localPosition).xyz), 1.);
  vec4 posqIn = posp + uModelViewMatrix * vec4(aTangentIn, 0);
  vec4 posqOut = posp + uModelViewMatrix * vec4(aTangentOut, 0);
  float strokeWeight = HOOK_getStrokeWeight(uStrokeWeight);
  vStrokeWeight = strokeWeight;

  float facingCamera = pow(
    // The word space tangent's z value is 0 if it's facing the camera
    abs(normalize(posqIn-posp).z),

    // Using pow() here to ramp \`facingCamera\` up from 0 to 1 really quickly
    // so most lines get scaled and don't get clipped
    0.25
  );

  // Moving vertices slightly toward the camera
  // to avoid depth-fighting with the fill triangles.
  // A mix of scaling and offsetting is used based on distance
  // Discussion here:
  // https://github.com/processing/p5.js/issues/7200 

  // using a scale <1 moves the lines towards nearby camera
  // in order to prevent popping effects due to half of
  // the line disappearing behind the geometry faces.
  float zDistance = -posp.z; 
  float distanceFactor = smoothstep(0.0, 800.0, zDistance); 
  
  // Discussed here:
  // http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=252848  
  float scale = mix(1., 0.995, facingCamera);
  float dynamicScale = mix(scale, 1.0, distanceFactor); // Closer = more scale, farther = less

  posp.xyz = posp.xyz * dynamicScale;
  posqIn.xyz = posqIn.xyz * dynamicScale;
  posqOut.xyz = posqOut.xyz * dynamicScale;

  // Moving vertices slightly toward camera when far away 
  // https://github.com/processing/p5.js/issues/6956 
  float zOffset = mix(0., -1., facingCamera);
  float dynamicZAdjustment = mix(0.0, zOffset, distanceFactor); // Closer = less zAdjustment, farther = more

  posp.z -= dynamicZAdjustment;
  posqIn.z -= dynamicZAdjustment;
  posqOut.z -= dynamicZAdjustment;
  
  vec4 p = uProjectionMatrix * posp;
  vec4 qIn = uProjectionMatrix * posqIn;
  vec4 qOut = uProjectionMatrix * posqOut;
  vCenter = HOOK_getLineCenter(p.xy);

  // formula to convert from clip space (range -1..1) to screen space (range 0..[width or height])
  // screen_p = (p.xy/p.w + <1,1>) * 0.5 * uViewport.zw

  // prevent division by W by transforming the tangent formula (div by 0 causes
  // the line to disappear, see https://github.com/processing/processing/issues/5183)
  // t = screen_q - screen_p
  //
  // tangent is normalized and we don't care which aDirection it points to (+-)
  // t = +- normalize( screen_q - screen_p )
  // t = +- normalize( (q.xy/q.w+<1,1>)*0.5*uViewport.zw - (p.xy/p.w+<1,1>)*0.5*uViewport.zw )
  //
  // extract common factor, <1,1> - <1,1> cancels out
  // t = +- normalize( (q.xy/q.w - p.xy/p.w) * 0.5 * uViewport.zw )
  //
  // convert to common divisor
  // t = +- normalize( ((q.xy*p.w - p.xy*q.w) / (p.w*q.w)) * 0.5 * uViewport.zw )
  //
  // remove the common scalar divisor/factor, not needed due to normalize and +-
  // (keep uViewport - can't remove because it has different components for x and y
  //  and corrects for aspect ratio, see https://github.com/processing/processing/issues/5181)
  // t = +- normalize( (q.xy*p.w - p.xy*q.w) * uViewport.zw )

  vec2 tangentIn = normalize((qIn.xy*p.w - p.xy*qIn.w) * uViewport.zw);
  vec2 tangentOut = normalize((qOut.xy*p.w - p.xy*qOut.w) * uViewport.zw);

  vec2 curPerspScale;
  if(uPerspective == 1) {
    // Perspective ---
    // convert from world to clip by multiplying with projection scaling factor
    // to get the right thickness (see https://github.com/processing/processing/issues/5182)

    // The y value of the projection matrix may be flipped if rendering to a Framebuffer.
    // Multiplying again by its sign here negates the flip to get just the scale.
    curPerspScale = (uProjectionMatrix * vec4(1, sign(uProjectionMatrix[1][1]), 0, 0)).xy;
  } else {
    // No Perspective ---
    // multiply by W (to cancel out division by W later in the pipeline) and
    // convert from screen to clip (derived from clip to screen above)
    curPerspScale = p.w / (0.5 * uViewport.zw);
  }

  vec2 offset;
  if (vJoin == 1.) {
    vTangent = normalize(tangentIn + tangentOut);
    vec2 normalIn = vec2(-tangentIn.y, tangentIn.x);
    vec2 normalOut = vec2(-tangentOut.y, tangentOut.x);
    float side = sign(aSide);
    float sideEnum = abs(aSide);

    // We generate vertices for joins on either side of the centerline, but
    // the "elbow" side is the only one needing a join. By not setting the
    // offset for the other side, all its vertices will end up in the same
    // spot and not render, effectively discarding it.
    if (sign(dot(tangentOut, vec2(-tangentIn.y, tangentIn.x))) != side) {
      // Side enums:
      //   1: the side going into the join
      //   2: the middle of the join
      //   3: the side going out of the join
      if (sideEnum == 2.) {
        // Calculate the position + tangent on either side of the join, and
        // find where the lines intersect to find the elbow of the join
        vec2 c = (posp.xy/posp.w + vec2(1.,1.)) * 0.5 * uViewport.zw;
        vec2 intersection = lineIntersection(
          c + (side * normalIn * strokeWeight / 2.),
          tangentIn,
          c + (side * normalOut * strokeWeight / 2.),
          tangentOut
        );
        offset = (intersection - c);

        // When lines are thick and the angle of the join approaches 180, the
        // elbow might be really far from the center. We'll apply a limit to
        // the magnitude to avoid lines going across the whole screen when this
        // happens.
        float mag = length(offset);
        float maxMag = 3. * strokeWeight;
        if (mag > maxMag) {
          offset *= maxMag / mag;
        }
      } else if (sideEnum == 1.) {
        offset = side * normalIn * strokeWeight / 2.;
      } else if (sideEnum == 3.) {
        offset = side * normalOut * strokeWeight / 2.;
      }
    }
    if (uStrokeJoin == STROKE_JOIN_BEVEL) {
      vec2 avgNormal = vec2(-vTangent.y, vTangent.x);
      vMaxDist = abs(dot(avgNormal, normalIn * strokeWeight / 2.));
    } else {
      vMaxDist = strokeWeight / 2.;
    }
  } else {
    vec2 tangent = aTangentIn == vec3(0.) ? tangentOut : tangentIn;
    vTangent = tangent;
    vec2 normal = vec2(-tangent.y, tangent.x);

    float normalOffset = sign(aSide);
    // Caps will have side values of -2 or 2 on the edge of the cap that
    // extends out from the line
    float tangentOffset = abs(aSide) - 1.;
    offset = (normal * normalOffset + tangent * tangentOffset) *
      strokeWeight * 0.5;
    vMaxDist = strokeWeight / 2.;
  }
  vPosition = HOOK_getLinePosition(vCenter + offset);

  gl_Position.xy = p.xy + offset.xy * curPerspScale;
  gl_Position.zw = p.zw;
  
  vColor = HOOK_getVertexColor(uUseLineColor ? aVertexColor : uMaterialColor);
  HOOK_afterVertex();
}
`,lineFrag:P+`precision highp int;
precision highp float;

uniform vec4 uMaterialColor;
uniform int uStrokeCap;
uniform int uStrokeJoin;

IN vec4 vColor;
IN vec2 vTangent;
IN vec2 vCenter;
IN vec2 vPosition;
IN float vStrokeWeight;
IN float vMaxDist;
IN float vCap;
IN float vJoin;

float distSquared(vec2 a, vec2 b) {
  vec2 aToB = b - a;
  return dot(aToB, aToB);
}

struct Inputs {
  vec4 color;
  vec2 tangent;
  vec2 center;
  vec2 position;
  float strokeWeight;
};

void main() {
  HOOK_beforeFragment();

  Inputs inputs;
  inputs.color = vColor;
  inputs.tangent = vTangent;
  inputs.center = vCenter;
  inputs.position = vPosition;
  inputs.strokeWeight = vStrokeWeight;
  inputs = HOOK_getPixelInputs(inputs);

  if (vCap > 0.) {
    if (
      uStrokeCap == STROKE_CAP_ROUND &&
      HOOK_shouldDiscard(distSquared(inputs.position, inputs.center) > inputs.strokeWeight * inputs.strokeWeight * 0.25)
    ) {
      discard;
    } else if (
      uStrokeCap == STROKE_CAP_SQUARE &&
      HOOK_shouldDiscard(dot(inputs.position - inputs.center, inputs.tangent) > 0.)
    ) {
      discard;
    // Use full area for PROJECT
    } else if (HOOK_shouldDiscard(false)) {
      discard;
    }
  } else if (vJoin > 0.) {
    if (
      uStrokeJoin == STROKE_JOIN_ROUND &&
      HOOK_shouldDiscard(distSquared(inputs.position, inputs.center) > inputs.strokeWeight * inputs.strokeWeight * 0.25)
    ) {
      discard;
    } else if (uStrokeJoin == STROKE_JOIN_BEVEL) {
      vec2 normal = vec2(-inputs.tangent.y, inputs.tangent.x);
      if (HOOK_shouldDiscard(abs(dot(inputs.position - inputs.center, normal)) > vMaxDist)) {
        discard;
      }
    // Use full area for MITER
    } else if (HOOK_shouldDiscard(false)) {
      discard;
    }
  }
  OUT_COLOR = HOOK_getFinalColor(vec4(inputs.color.rgb, 1.) * inputs.color.a);
  HOOK_afterFragment();
}
`,pointVert:`IN vec3 aPosition;
uniform float uPointSize;
OUT float vStrokeWeight;
uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;

void main() {
  HOOK_beforeVertex();
  vec4 viewModelPosition = vec4(HOOK_getWorldPosition(
    (uModelViewMatrix * vec4(HOOK_getLocalPosition(aPosition), 1.0)).xyz
  ), 1.);
  gl_Position = uProjectionMatrix * viewModelPosition;  

  float pointSize = HOOK_getPointSize(uPointSize);

	gl_PointSize = pointSize;
	vStrokeWeight = pointSize;
  HOOK_afterVertex();
}
`,pointFrag:`precision mediump int;
uniform vec4 uMaterialColor;
IN float vStrokeWeight;

void main(){
  HOOK_beforeFragment();
  float mask = 0.0;

  // make a circular mask using the gl_PointCoord (goes from 0 - 1 on a point)
  // might be able to get a nicer edge on big strokeweights with smoothstep but slightly less performant

  mask = step(0.98, length(gl_PointCoord * 2.0 - 1.0));

  // if strokeWeight is 1 or less lets just draw a square
  // this prevents weird artifacting from carving circles when our points are really small
  // if strokeWeight is larger than 1, we just use it as is

  mask = mix(0.0, mask, clamp(floor(vStrokeWeight - 0.5),0.0,1.0));

  // throw away the borders of the mask
  // otherwise we get weird alpha blending issues

  if(HOOK_shouldDiscard(mask > 0.98)){
    discard;
  }

  OUT_COLOR = HOOK_getFinalColor(vec4(uMaterialColor.rgb, 1.) * uMaterialColor.a);
  HOOK_afterFragment();
}
`,imageLightVert:`precision highp float;
attribute vec3 aPosition;
attribute vec3 aNormal;
attribute vec2 aTexCoord;

varying vec3 localPos;
varying vec3 vWorldNormal;
varying vec3 vWorldPosition;
varying vec2 vTexCoord;

uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform mat3 uNormalMatrix;

void main() {
  // Multiply the position by the matrix.
  vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);
  gl_Position = uProjectionMatrix * viewModelPosition;  
  
  // orient the normals and pass to the fragment shader
  vWorldNormal = uNormalMatrix * aNormal;
  
  // send the view position to the fragment shader
  vWorldPosition = (uModelViewMatrix * vec4(aPosition, 1.0)).xyz;
  
  localPos = vWorldPosition;
  vTexCoord = aTexCoord;
}


/*
in the vertex shader we'll compute the world position and world oriented normal of the vertices and pass those to the fragment shader as varyings.
*/
`,imageLightDiffusedFrag:`precision highp float;
varying vec3 localPos;

// the HDR cubemap converted (can be from an equirectangular environment map.)
uniform sampler2D environmentMap;
varying vec2 vTexCoord;

const float PI = 3.14159265359;

vec2 nTOE( vec3 v ){
  // x = r sin(phi) cos(theta)   
  // y = r cos(phi)  
  // z = r sin(phi) sin(theta)
  float phi = acos( v.y );
  // if phi is 0, then there are no x, z components
  float theta = 0.0;
  // else 
  theta = acos(v.x / sin(phi));
  float sinTheta = v.z / sin(phi);
  if (sinTheta < 0.0) {
    // Turn it into -theta, but in the 0-2PI range
    theta = 2.0 * PI - theta;
  }
  theta = theta / (2.0 * 3.14159);
  phi = phi / 3.14159 ;
  
  vec2 angles = vec2( phi, theta );
  return angles;
}

float random(vec2 p) {
  vec3 p3  = fract(vec3(p.xyx) * .1031);
  p3 += dot(p3, p3.yzx + 33.33);
  return fract((p3.x + p3.y) * p3.z);
}

void main()
{   	 
	// the sample direction equals the hemisphere's orientation
  float phi = vTexCoord.x * 2.0 * PI;
  float theta = vTexCoord.y * PI;
  float x = sin(theta) * cos(phi);
  float y = sin(theta) * sin(phi);
  float z = cos(theta);
  vec3 normal = vec3( x, y, z);

	// Discretely sampling the hemisphere given the integral's
  // spherical coordinates translates to the following fragment code:
	vec3 irradiance = vec3(0.0);  
	vec3 up	= vec3(0.0, 1.0, 0.0);
	vec3 right = normalize(cross(up, normal));
	up = normalize(cross(normal, right));

	//  We specify a fixed sampleDelta delta value to traverse
  // the hemisphere; decreasing or increasing the sample delta
  // will increase or decrease the accuracy respectively.
	const float sampleDelta = 0.100;
	float nrSamples = 0.0;
  float randomOffset = random(gl_FragCoord.xy) * sampleDelta;
	for(float rawPhi = 0.0; rawPhi < 2.0 * PI; rawPhi += sampleDelta)
	{
    float phi = rawPhi + randomOffset;
    for(float rawTheta = 0.0; rawTheta < ( 0.5 ) * PI; rawTheta += sampleDelta)
    {
      float theta = rawTheta + randomOffset;
      // spherical to cartesian (in tangent space) // tangent space to world // add each sample result to irradiance
      float x = sin(theta) * cos(phi);
      float y = sin(theta) * sin(phi);
      float z = cos(theta);
      vec3 tangentSample = vec3( x, y, z);
      
      vec3 sampleVec = tangentSample.x * right + tangentSample.y * up + tangentSample.z * normal;
        irradiance += (texture2D(environmentMap, nTOE(sampleVec)).xyz) * cos(theta) * sin(theta);
      nrSamples++;
    }
	}
	// divide by the total number of samples taken, giving us the average sampled irradiance.
	irradiance = PI * irradiance * (1.0 / float(nrSamples )) ;
  
 
	gl_FragColor = vec4(irradiance, 1.0);
}`,imageLightSpecularFrag:`precision highp float;\r
varying vec3 localPos;\r
varying vec2 vTexCoord;\r
\r
// our texture\r
uniform sampler2D environmentMap;\r
uniform float roughness;\r
\r
const float PI = 3.14159265359;\r
\r
float VanDerCorput(int bits);\r
vec2 HammersleyNoBitOps(int i, int N);\r
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness);\r
\r
\r
vec2 nTOE( vec3 v ){\r
  // x = r sin(phi) cos(theta)   \r
  // y = r cos(phi)  \r
  // z = r sin(phi) sin(theta)\r
  float phi = acos( v.y );\r
  // if phi is 0, then there are no x, z components\r
  float theta = 0.0;\r
  // else \r
  theta = acos(v.x / sin(phi));\r
  float sinTheta = v.z / sin(phi);\r
  if (sinTheta < 0.0) {\r
    // Turn it into -theta, but in the 0-2PI range\r
    theta = 2.0 * PI - theta;\r
  }\r
  theta = theta / (2.0 * 3.14159);\r
  phi = phi / 3.14159 ;\r
  \r
  vec2 angles = vec2( phi, theta );\r
  return angles;\r
}\r
\r
\r
void main(){\r
  const int SAMPLE_COUNT = 400; // 4096\r
  int lowRoughnessLimit = int(pow(2.0,(roughness+0.1)*20.0));\r
  float totalWeight = 0.0;\r
  vec3 prefilteredColor = vec3(0.0);\r
  float phi = vTexCoord.x * 2.0 * PI;\r
  float theta = vTexCoord.y * PI;\r
  float x = sin(theta) * cos(phi);\r
  float y = sin(theta) * sin(phi);\r
  float z = cos(theta);\r
  vec3 N = vec3(x,y,z);\r
  vec3 V = N;\r
  for (int i = 0; i < SAMPLE_COUNT; ++i)\r
  {\r
    // break at smaller sample numbers for low roughness levels\r
    if(i == lowRoughnessLimit)\r
    {\r
      break;\r
    }\r
    vec2 Xi = HammersleyNoBitOps(i, SAMPLE_COUNT);\r
    vec3 H = ImportanceSampleGGX(Xi, N, roughness);\r
    vec3 L = normalize(2.0 * dot(V, H) * H - V);\r
\r
    float NdotL = max(dot(N, L), 0.0);\r
    if (NdotL > 0.0)\r
    {\r
      prefilteredColor += texture2D(environmentMap, nTOE(L)).xyz * NdotL;\r
      totalWeight += NdotL;\r
    }\r
  }\r
  prefilteredColor = prefilteredColor / totalWeight;\r
\r
  gl_FragColor = vec4(prefilteredColor, 1.0);\r
}\r
\r
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness){\r
  float a = roughness * roughness;\r
\r
  float phi = 2.0 * PI * Xi.x;\r
  float cosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a * a - 1.0) * Xi.y));\r
  float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\r
  // from spherical coordinates to cartesian coordinates\r
  vec3 H;\r
  H.x = cos(phi) * sinTheta;\r
  H.y = sin(phi) * sinTheta;\r
  H.z = cosTheta;\r
\r
  // from tangent-space vector to world-space sample vector\r
  vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\r
  vec3 tangent = normalize(cross(up, N));\r
  vec3 bitangent = cross(N, tangent);\r
\r
  vec3 sampleVec = tangent * H.x + bitangent * H.y + N * H.z;\r
  return normalize(sampleVec);\r
}\r
\r
\r
float VanDerCorput(int n, int base)\r
{\r
#ifdef WEBGL2\r
\r
    uint bits = uint(n);\r
    bits = (bits << 16u) | (bits >> 16u);\r
    bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);\r
    bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);\r
    bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);\r
    bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);\r
    return float(bits) * 2.3283064365386963e-10; // / 0x100000000\r
\r
#else\r
\r
  float invBase = 1.0 / float(base);\r
  float denom = 1.0;\r
  float result = 0.0;\r
\r
\r
  for (int i = 0; i < 32; ++i)\r
  {\r
        if (n > 0)\r
        {\r
        denom = mod(float(n), 2.0);\r
        result += denom * invBase;\r
        invBase = invBase / 2.0;\r
        n = int(float(n) / 2.0);\r
        }\r
  }\r
\r
\r
  return result;\r
\r
#endif\r
}\r
\r
vec2 HammersleyNoBitOps(int i, int N)\r
{\r
  return vec2(float(i) / float(N), VanDerCorput(i, 2));\r
}\r
`},D=F.sphereMappingFrag;for(x in F)F[x]=`#ifdef WEBGL2

#define IN in
#define OUT out

#ifdef FRAGMENT_SHADER
out vec4 outColor;
#define OUT_COLOR outColor
#endif
#define TEXTURE texture

#else

#ifdef FRAGMENT_SHADER
#define IN varying
#else
#define IN attribute
#endif
#define OUT varying
#define TEXTURE texture2D

#ifdef FRAGMENT_SHADER
#define OUT_COLOR gl_FragColor
#endif

#endif
`+F[x];S(M={},f.GRAY,`precision highp float;

varying vec2 vTexCoord;

uniform sampler2D tex0;

float luma(vec3 color) {
  // weighted grayscale with luminance values
  return dot(color, vec3(0.2126, 0.7152, 0.0722));
}

void main() {
  vec4 tex = texture2D(tex0, vTexCoord);
  float gray = luma(tex.rgb);
  gl_FragColor = vec4(gray, gray, gray, tex.a);
}
`),S(M,f.ERODE,`// Reduces the bright areas in an image

precision highp float;

varying vec2 vTexCoord;

uniform sampler2D tex0;
uniform vec2 texelSize;

float luma(vec3 color) {
  // weighted grayscale with luminance values
  // weights 77, 151, 28 taken from src/image/filters.js
  return dot(color, vec3(0.300781, 0.589844, 0.109375));
}

void main() {
  vec4 color = texture2D(tex0, vTexCoord);
  float lum = luma(color.rgb);

  // set current color as the darkest neighbor color

  vec4 neighbors[4];
  neighbors[0] = texture2D(tex0, vTexCoord + vec2( texelSize.x, 0.0));
  neighbors[1] = texture2D(tex0, vTexCoord + vec2(-texelSize.x, 0.0));
  neighbors[2] = texture2D(tex0, vTexCoord + vec2(0.0,  texelSize.y));
  neighbors[3] = texture2D(tex0, vTexCoord + vec2(0.0, -texelSize.y));

  for (int i = 0; i < 4; i++) {
    vec4 neighborColor = neighbors[i];
    float neighborLum = luma(neighborColor.rgb);

    if (neighborLum < lum) {
      color = neighborColor;
      lum = neighborLum;
    }
  }

  gl_FragColor = color;
}
`),S(M,f.DILATE,`// Increase the bright areas in an image

precision highp float;

varying vec2 vTexCoord;

uniform sampler2D tex0;
uniform vec2 texelSize;

float luma(vec3 color) {
  // weighted grayscale with luminance values
  // weights 77, 151, 28 taken from src/image/filters.js
  return dot(color, vec3(0.300781, 0.589844, 0.109375));
}

void main() {
  vec4 color = texture2D(tex0, vTexCoord);
  float lum = luma(color.rgb);

  // set current color as the brightest neighbor color

  vec4 neighbors[4];
  neighbors[0] = texture2D(tex0, vTexCoord + vec2( texelSize.x, 0.0));
  neighbors[1] = texture2D(tex0, vTexCoord + vec2(-texelSize.x, 0.0));
  neighbors[2] = texture2D(tex0, vTexCoord + vec2(0.0,  texelSize.y));
  neighbors[3] = texture2D(tex0, vTexCoord + vec2(0.0, -texelSize.y));

  for (int i = 0; i < 4; i++) {
    vec4 neighborColor = neighbors[i];
    float neighborLum = luma(neighborColor.rgb);

    if (neighborLum > lum) {
      color = neighborColor;
      lum = neighborLum;
    }
  }

  gl_FragColor = color;
}
`),S(M,f.BLUR,`precision highp float;

// Two-pass blur filter, unweighted kernel.
// See also a similar blur at Adam Ferriss' repo of shader examples:
// https://github.com/aferriss/p5jsShaderExamples/blob/gh-pages/4_image-effects/4-9_single-pass-blur/effect.frag


uniform sampler2D tex0;
varying vec2 vTexCoord;
uniform vec2 direction;
uniform vec2 canvasSize;
uniform float radius;

float random(vec2 p) {
  vec3 p3  = fract(vec3(p.xyx) * .1031);
  p3 += dot(p3, p3.yzx + 33.33);
  return fract((p3.x + p3.y) * p3.z);
}

// This isn't a real Gaussian weight, it's a quadratic weight. It's what the
// CPU mode's blur uses though, so we also use it here to match.
float quadWeight(float x, float e) {
  return pow(e-abs(x), 2.);
}

void main(){
  vec2 uv = vTexCoord;

  // A reasonable maximum number of samples
  const float maxSamples = 64.0;

  float numSamples = floor(7. * radius);
  if (fract(numSamples / 2.) == 0.) {
    numSamples++;
  }
  vec4 avg = vec4(0.0);
  float total = 0.0;

  // Calculate the spacing to avoid skewing if numSamples > maxSamples
  float spacing = 1.0;
  if (numSamples > maxSamples) {
    spacing = numSamples / maxSamples;
    numSamples = maxSamples;
  }

  float randomOffset = (spacing - 1.0) * mix(-0.5, 0.5, random(gl_FragCoord.xy));
  for (float i = 0.0; i < maxSamples; i++) {
    if (i >= numSamples) break;

    float sample = i * spacing - (numSamples - 1.0) * 0.5 * spacing + randomOffset;
    vec2 sampleCoord = uv + vec2(sample, sample) / canvasSize * direction;
    float weight = quadWeight(sample, (numSamples - 1.0) * 0.5 * spacing);

    avg += weight * texture2D(tex0, sampleCoord);
    total += weight;
  }

  avg /= total;
  gl_FragColor = avg;
}
`),S(M,f.POSTERIZE,`// Limit color space for a stylized cartoon / poster effect

precision highp float;

varying vec2 vTexCoord;

uniform sampler2D tex0;
uniform float filterParameter;

vec3 quantize(vec3 color, float n) {
  // restrict values to N options/bins
  // and floor each channel to nearest value
  //
  // eg. when N = 5, values = 0.0, 0.25, 0.50, 0.75, 1.0
  // then quantize (0.1, 0.7, 0.9) -> (0.0, 0.5, 1.0)

  color = color * n;
  color = floor(color);
  color = color / (n - 1.0);
  return color;
}

void main() {
  vec4 color = texture2D(tex0, vTexCoord);

  vec3 restrictedColor = quantize(color.rgb / color.a, filterParameter);

  gl_FragColor = vec4(restrictedColor.rgb * color.a, color.a);
}
`),S(M,f.OPAQUE,`// Set alpha channel to entirely opaque

precision highp float;

varying vec2 vTexCoord;

uniform sampler2D tex0;

void main() {
  vec4 color = texture2D(tex0, vTexCoord);
  gl_FragColor = vec4(color.rgb / color.a, 1.0);
}
`),S(M,f.INVERT,`// Set each pixel to inverse value
// Note that original INVERT does not change the opacity, so this follows suit

precision highp float;

varying vec2 vTexCoord;

uniform sampler2D tex0;

void main() {
vec4 color = texture2D(tex0, vTexCoord);
vec3 origColor = color.rgb / color.a;
vec3 invertedColor = vec3(1.0) - origColor;
gl_FragColor = vec4(invertedColor * color.a, color.a);
}
`),S(M,f.THRESHOLD,`// Convert pixels to either white or black, 
// depending on if their luma is above or below filterParameter

precision highp float;

varying vec2 vTexCoord;

uniform sampler2D tex0;
uniform float filterParameter;

float luma(vec3 color) {
  // weighted grayscale with luminance values
  return dot(color, vec3(0.2126, 0.7152, 0.0722));
}

void main() {
  vec4 color = texture2D(tex0, vTexCoord);
  float gray = luma(color.rgb / color.a);
  // floor() used to match src/image/filters.js
  float threshold = floor(filterParameter * 255.0) / 255.0;
  float blackOrWhite = step(threshold, gray);
  gl_FragColor = vec4(vec3(blackOrWhite) * color.a, color.a);
}
`);var A=M;function z(U,H,ie,oe,L,j,R,N,X,K){var re=H.getParameter(H.FRAMEBUFFER_BINDING),ie=(H.bindFramebuffer(H.FRAMEBUFFER,ie),N===H.RGBA?4:3),ee=j*R*ie,ae=X===H.UNSIGNED_BYTE?Uint8Array:Float32Array;if(U instanceof ae&&U.length===ee||(U=new ae(ee)),H.readPixels(oe,K?K-L-R:L,j,R,N,X,U),H.bindFramebuffer(H.FRAMEBUFFER,re),K)for(var ue=Math.floor(R/2),Q=new ae(j*ie),le=0;le<ue;le++){var fe=le*j*4,ve=(R-le-1)*j*4;Q.set(U.subarray(fe,fe+4*j)),U.copyWithin(fe,ve,ve+4*j),U.set(Q,ve)}return U}function G(U,X,Y,oe,L,j,R){var N=U.getParameter(U.FRAMEBUFFER_BINDING),X=(U.bindFramebuffer(U.FRAMEBUFFER,X),L===U.RGBA?4:3),X=new(j===U.UNSIGNED_BYTE?Uint8Array:Float32Array)(X);return U.readPixels(Y,R?R-oe-1:oe,1,1,L,j,X),U.bindFramebuffer(U.FRAMEBUFFER,N),Array.from(X)}u.default.prototype.setAttributes=function(U,H){if(this._glAttributes===void 0)console.log("You are trying to use setAttributes on a p5.Graphics object that does not use a WEBGL renderer.");else{var Y=!0;if(H!==void 0?(this._glAttributes===null&&(this._glAttributes={}),this._glAttributes[U]!==H&&(this._glAttributes[U]=H,Y=!1)):U instanceof Object&&this._glAttributes!==U&&(this._glAttributes=U,Y=!1),this._renderer.isP3D&&!Y){if(!this._setupDone){for(var oe in this._renderer.retainedMode.geometry)if(this._renderer.retainedMode.geometry.hasOwnProperty(oe))return void u.default._friendlyError("Sorry, Could not set the attributes, you need to call setAttributes() before calling the other drawing methods in setup()")}this.push(),this._renderer._resetContext(),this.pop(),this._renderer._curCamera&&(this._renderer._curCamera._renderer=this._renderer)}}},u.default.RendererGL=(function(U){var H=L;if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(U&&U.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),U&&l(H,U);var Y,oe=c(L);function L(j,R,N,X){if(this instanceof L)return(j=oe.call(this,j,R,N))._setAttributeDefaults(R),j._initContext(),j.isP3D=!0,j.geometryBuilder=void 0,j.GL=j.drawingContext,j._pInst._setProperty("drawingContext",j.drawingContext),j._isErasing=!1,j._clipDepths=[],j._isClipApplied=!1,j._stencilTestOn=!1,j._enableLighting=!1,j.ambientLightColors=[],j.mixedAmbientLight=[],j.mixedSpecularColor=[],j.specularColors=[1,1,1],j.directionalLightDirections=[],j.directionalLightDiffuseColors=[],j.directionalLightSpecularColors=[],j.pointLightPositions=[],j.pointLightDiffuseColors=[],j.pointLightSpecularColors=[],j.spotLightPositions=[],j.spotLightDirections=[],j.spotLightDiffuseColors=[],j.spotLightSpecularColors=[],j.spotLightAngle=[],j.spotLightConc=[],j.activeImageLight=null,j.diffusedTextures=new Map,j.specularTextures=new Map,j.drawMode=f.FILL,j.curFillColor=j._cachedFillStyle=[1,1,1,1],j.curAmbientColor=j._cachedFillStyle=[1,1,1,1],j.curSpecularColor=j._cachedFillStyle=[0,0,0,0],j.curEmissiveColor=j._cachedFillStyle=[0,0,0,0],j.curStrokeColor=j._cachedStrokeStyle=[0,0,0,1],j.curBlendMode=f.BLEND,j.preEraseBlend=void 0,j._cachedBlendMode=void 0,j.webglVersion===f.WEBGL2?j.blendExt=j.GL:j.blendExt=j.GL.getExtension("EXT_blend_minmax"),j._isBlending=!1,j._hasSetAmbient=!1,j._useSpecularMaterial=!1,j._useEmissiveMaterial=!1,j._useNormalMaterial=!1,j._useShininess=1,j._useMetalness=0,j._useLineColor=!1,j._useVertexColor=!1,j.registerEnabled=new Set,j._tint=[255,255,255,255],j.constantAttenuation=1,j.linearAttenuation=0,j.quadraticAttenuation=0,j.uModelMatrix=new u.default.Matrix,j.uViewMatrix=new u.default.Matrix,j.uMVMatrix=new u.default.Matrix,j.uPMatrix=new u.default.Matrix,j.uNMatrix=new u.default.Matrix("mat3"),j.curMatrix=new u.default.Matrix("mat3"),j._currentNormal=new u.default.Vector(0,0,1),j._curCamera=new u.default.Camera(d(j)),j._curCamera._computeCameraDefaultSettings(),j._curCamera._setDefaultCamera(),j.filterCamera=new u.default.Camera(d(j)),j.filterCamera._computeCameraDefaultSettings(),j.filterCamera._setDefaultCamera(),j.prevTouches=[],j.zoomVelocity=0,j.rotateVelocity=new u.default.Vector(0,0),j.moveVelocity=new u.default.Vector(0,0),j.executeZoom=!1,j.executeRotateAndMove=!1,j.specularShader=void 0,j.sphereMapping=void 0,j.diffusedShader=void 0,j._defaultLightShader=void 0,j._defaultImmediateModeShader=void 0,j._defaultNormalShader=void 0,j._defaultColorShader=void 0,j._defaultPointShader=void 0,j.userFillShader=void 0,j.userStrokeShader=void 0,j.userPointShader=void 0,j.retainedMode={geometry:{},buffers:{stroke:[new u.default.RenderBuffer(4,"lineVertexColors","lineColorBuffer","aVertexColor",d(j)),new u.default.RenderBuffer(3,"lineVertices","lineVerticesBuffer","aPosition",d(j)),new u.default.RenderBuffer(3,"lineTangentsIn","lineTangentsInBuffer","aTangentIn",d(j)),new u.default.RenderBuffer(3,"lineTangentsOut","lineTangentsOutBuffer","aTangentOut",d(j)),new u.default.RenderBuffer(1,"lineSides","lineSidesBuffer","aSide",d(j))],fill:[new u.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",d(j),j._vToNArray),new u.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",d(j),j._vToNArray),new u.default.RenderBuffer(4,"vertexColors","colorBuffer","aVertexColor",d(j)),new u.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",d(j)),new u.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",d(j),j._flatten)],text:[new u.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",d(j),j._vToNArray),new u.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",d(j),j._flatten)]}},j.immediateMode={geometry:new u.default.Geometry,shapeMode:f.TRIANGLE_FAN,contourIndices:[],_bezierVertex:[],_quadraticVertex:[],_curveVertex:[],buffers:{fill:[new u.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",d(j),j._vToNArray),new u.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",d(j),j._vToNArray),new u.default.RenderBuffer(4,"vertexColors","colorBuffer","aVertexColor",d(j)),new u.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",d(j)),new u.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",d(j),j._flatten)],stroke:[new u.default.RenderBuffer(4,"lineVertexColors","lineColorBuffer","aVertexColor",d(j)),new u.default.RenderBuffer(3,"lineVertices","lineVerticesBuffer","aPosition",d(j)),new u.default.RenderBuffer(3,"lineTangentsIn","lineTangentsInBuffer","aTangentIn",d(j)),new u.default.RenderBuffer(3,"lineTangentsOut","lineTangentsOutBuffer","aTangentOut",d(j)),new u.default.RenderBuffer(1,"lineSides","lineSidesBuffer","aSide",d(j))],point:j.GL.createBuffer()}},j.pointSize=5,j.curStrokeWeight=1,j.curStrokeCap=f.ROUND,j.curStrokeJoin=f.ROUND,j.textures=new Map,j.framebuffers=new Set,j.activeFramebuffers=[],j.filterShader=void 0,j.filterLayer=void 0,j.filterLayerTemp=void 0,j.defaultFilterShaders={},j.textureMode=f.IMAGE,j.textureWrapX=f.CLAMP,j.textureWrapY=f.CLAMP,j._tex=null,j._curveTightness=6,j._lookUpTableBezier=[],j._lookUpTableQuadratic=[],j._lutBezierDetail=0,j._lutQuadraticDetail=0,j.isProcessingVertices=!1,j._tessy=j._initTessy(),j.fontInfos={},j._curShader=void 0,j;throw new TypeError("Cannot call a class as a function")}return H=L,(U=[{key:"beginGeometry",value:function(){if(this.geometryBuilder)throw new Error("It looks like `beginGeometry()` is being called while another p5.Geometry is already being build.");this.geometryBuilder=new g.default(this)}},{key:"endGeometry",value:function(){var j;if(this.geometryBuilder)return j=this.geometryBuilder.finish(),this.geometryBuilder=void 0,j;throw new Error("Make sure you call beginGeometry() before endGeometry()!")}},{key:"buildGeometry",value:function(j){return this.beginGeometry(),j(),this.endGeometry()}},{key:"_setAttributeDefaults",value:function(j){var R={alpha:!0,depth:!0,stencil:!0,antialias:navigator.userAgent.toLowerCase().includes("safari"),premultipliedAlpha:!0,preserveDrawingBuffer:!0,perPixelLighting:!0,version:2};j._glAttributes===null?j._glAttributes=R:j._glAttributes=Object.assign(R,j._glAttributes)}},{key:"_initContext",value:function(){if(this._pInst._glAttributes.version!==1&&(this.drawingContext=this.canvas.getContext("webgl2",this._pInst._glAttributes)),this.webglVersion=this.drawingContext?f.WEBGL2:f.WEBGL,this._pInst._setProperty("webglVersion",this.webglVersion),this.drawingContext||(this.drawingContext=this.canvas.getContext("webgl",this._pInst._glAttributes)||this.canvas.getContext("experimental-webgl",this._pInst._glAttributes)),this.drawingContext===null)throw new Error("Error creating webgl context");var j=this.drawingContext;j.enable(j.DEPTH_TEST),j.depthFunc(j.LEQUAL),j.viewport(0,0,j.drawingBufferWidth,j.drawingBufferHeight),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),this._viewport=this.drawingContext.getParameter(this.drawingContext.VIEWPORT)}},{key:"_getParam",value:function(){var j=this.drawingContext;return j.getParameter(j.MAX_TEXTURE_SIZE)}},{key:"_adjustDimensions",value:function(j,R){this._maxTextureSize||(this._maxTextureSize=this._getParam());var X=this._maxTextureSize,X=(u.default.prototype._maxAllowedPixelDimensions,Math.floor(X/this.pixelDensity())),N=Math.min(j,X),X=Math.min(R,X);return N===j&&X===R||console.warn("Warning: The requested width/height exceeds hardware limits. "+"Adjusting dimensions to width: ".concat(N,", height: ").concat(X,".")),{adjustedWidth:N,adjustedHeight:X}}},{key:"_resetContext",value:function(j,R){var N,X=this.width,K=this.height,ie=this.canvas.id,re=this._pInst instanceof u.default.Graphics,ie=(re?((N=this._pInst).canvas.parentNode.removeChild(N.canvas),N.canvas=document.createElement("canvas"),(N._pInst._userNode||document.body).appendChild(N.canvas),u.default.Element.call(N,N.canvas,N._pInst),N.width=X,N.height=K):((N=this.canvas)&&N.parentNode.removeChild(N),(N=document.createElement("canvas")).id=ie,(this._pInst._userNode||document.body).appendChild(N),this._pInst.canvas=N,this.canvas=N),new u.default.RendererGL(this._pInst.canvas,this._pInst,!re));this._pInst._setProperty("_renderer",ie),ie.resize(X,K),ie._applyDefaults(),re||this._pInst._elements.push(ie),typeof R=="function"&&setTimeout(function(){R.apply(window._renderer,j)},0)}},{key:"_update",value:function(){this.uModelMatrix.reset(),this.uViewMatrix.set(this._curCamera.cameraMatrix),this.ambientLightColors.length=0,this.specularColors=[1,1,1],this.directionalLightDirections.length=0,this.directionalLightDiffuseColors.length=0,this.directionalLightSpecularColors.length=0,this.pointLightPositions.length=0,this.pointLightDiffuseColors.length=0,this.pointLightSpecularColors.length=0,this.spotLightPositions.length=0,this.spotLightDirections.length=0,this.spotLightDiffuseColors.length=0,this.spotLightSpecularColors.length=0,this.spotLightAngle.length=0,this.spotLightConc.length=0,this._enableLighting=!1,this._tint=[255,255,255,255],this.GL.clearStencil(0),this.GL.clear(this.GL.DEPTH_BUFFER_BIT|this.GL.STENCIL_BUFFER_BIT),this.GL.disable(this.GL.STENCIL_TEST)}},{key:"background",value:function(){var X=(X=this._pInst).color.apply(X,arguments),j=X.levels[0]/255,R=X.levels[1]/255,N=X.levels[2]/255,X=X.levels[3]/255;this.clear(j,R,N,X)}},{key:"fill",value:function(j,R,N,X){var K=u.default.prototype.color.apply(this._pInst,arguments);this.curFillColor=K._array,this.drawMode=f.FILL,this._useNormalMaterial=!1,this._tex=null}},{key:"stroke",value:function(j,R,N,X){var K=u.default.prototype.color.apply(this._pInst,arguments);this.curStrokeColor=K._array}},{key:"strokeCap",value:function(j){this.curStrokeCap=j}},{key:"strokeJoin",value:function(j){this.curStrokeJoin=j}},{key:"getFilterLayer",value:function(){return this.filterLayer||(this.filterLayer=this._pInst.createFramebuffer()),this.filterLayer}},{key:"getFilterLayerTemp",value:function(){return this.filterLayerTemp||(this.filterLayerTemp=this._pInst.createFramebuffer()),this.filterLayerTemp}},{key:"matchSize",value:function(j,R){j.width===R.width&&j.height===R.height||j.resize(R.width,R.height),j.pixelDensity()!==R.pixelDensity()&&j.pixelDensity(R.pixelDensity())}},{key:"filter",value:function(){var j,R,N=this,X=this.getFilterLayer(),K=void 0,re=void 0,ie=(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(re=arguments.length<=0?void 0:arguments[0],S(j={},f.BLUR,3),S(j,f.POSTERIZE,4),S(j,f.THRESHOLD,.5),K=re in(j=j)&&(arguments.length<=1?void 0:arguments[1])===void 0?j[re]:arguments.length<=1?void 0:arguments[1],re in this.defaultFilterShaders||(this.defaultFilterShaders[re]=new u.default.Shader(X._renderer,`uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;

attribute vec3 aPosition;
// texcoords only come from p5 to vertex shader
// so pass texcoords on to the fragment shader in a varying variable
attribute vec2 aTexCoord;
varying vec2 vTexCoord;

void main() {
  // transferring texcoords for the frag shader
  vTexCoord = aTexCoord;

  // copy position with a fourth coordinate for projection (1.0 is normal)
  vec4 positionVec4 = vec4(aPosition, 1.0);

  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;
}
`,A[re])),this.filterShader=this.defaultFilterShaders[re]):this.filterShader=arguments.length<=0?void 0:arguments[0],this.activeFramebuffer()||this),ee=(this.matchSize(X,ie),X.draw(function(){return N._pInst.clear()}),[1/(ie.width*ie.pixelDensity()),1/(ie.height*ie.pixelDensity())]);re===f.BLUR?(R=this.getFilterLayerTemp(),this.matchSize(R,ie),this._pInst.push(),this._pInst.noStroke(),this._pInst.blendMode(f.BLEND),this._pInst.shader(this.filterShader),this.filterShader.setUniform("texelSize",ee),this.filterShader.setUniform("canvasSize",[ie.width,ie.height]),this.filterShader.setUniform("radius",Math.max(1,K)),R.draw(function(){N.filterShader.setUniform("direction",[1,0]),N.filterShader.setUniform("tex0",ie),N._pInst.clear(),N._pInst.shader(N.filterShader),N._pInst.noLights(),N._pInst.plane(ie.width,ie.height)}),X.draw(function(){N.filterShader.setUniform("direction",[0,1]),N.filterShader.setUniform("tex0",R),N._pInst.clear(),N._pInst.shader(N.filterShader),N._pInst.noLights(),N._pInst.plane(ie.width,ie.height)}),this._pInst.pop()):X.draw(function(){N._pInst.noStroke(),N._pInst.blendMode(f.BLEND),N._pInst.shader(N.filterShader),N.filterShader.setUniform("tex0",ie),N.filterShader.setUniform("texelSize",ee),N.filterShader.setUniform("canvasSize",[ie.width,ie.height]),N.filterShader.setUniform("filterParameter",K),N._pInst.noLights(),N._pInst.plane(ie.width,ie.height)}),this._pInst.push(),this._pInst.noStroke(),this.clear(),this._pInst.push(),this._pInst.imageMode(f.CORNER),this._pInst.blendMode(f.BLEND),ie.filterCamera._resize(),this._pInst.setCamera(ie.filterCamera),this._pInst.resetMatrix(),this._pInst.image(X,-ie.width/2,-ie.height/2,ie.width,ie.height),this._pInst.clearDepth(),this._pInst.pop(),this._pInst.pop()}},{key:"pixelDensity",value:function(j){return j?this._pInst.pixelDensity(j):this._pInst.pixelDensity()}},{key:"blendMode",value:function(j){j===f.DARKEST||j===f.LIGHTEST||j===f.ADD||j===f.BLEND||j===f.SUBTRACT||j===f.SCREEN||j===f.EXCLUSION||j===f.REPLACE||j===f.MULTIPLY||j===f.REMOVE?this.curBlendMode=j:j!==f.BURN&&j!==f.OVERLAY&&j!==f.HARD_LIGHT&&j!==f.SOFT_LIGHT&&j!==f.DODGE||console.warn("BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only work for blendMode in 2D mode.")}},{key:"erase",value:function(j,R){this._isErasing||(this.preEraseBlend=this.curBlendMode,this._isErasing=!0,this.blendMode(f.REMOVE),this._cachedFillStyle=this.curFillColor.slice(),this.curFillColor=[1,1,1,j/255],this._cachedStrokeStyle=this.curStrokeColor.slice(),this.curStrokeColor=[1,1,1,R/255])}},{key:"noErase",value:function(){this._isErasing&&(this.curFillColor=this._cachedFillStyle.slice(),this.curStrokeColor=this._cachedStrokeStyle.slice(),this.curBlendMode=this.preEraseBlend,this.blendMode(this.preEraseBlend),this._isErasing=!1,this._applyBlendMode())}},{key:"drawTarget",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||this}},{key:"beginClip",value:function(){var j=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},j=(n(v(L.prototype),"beginClip",this).call(this,j),this.drawTarget()._isClipApplied=!0,this.GL);j.clearStencil(0),j.clear(j.STENCIL_BUFFER_BIT),j.enable(j.STENCIL_TEST),this._stencilTestOn=!0,j.stencilFunc(j.ALWAYS,1,255),j.stencilOp(j.KEEP,j.KEEP,j.REPLACE),j.disable(j.DEPTH_TEST),this._pInst.push(),this._pInst.resetShader(),this._doFill&&this._pInst.fill(0,0),this._doStroke&&this._pInst.stroke(0,0)}},{key:"endClip",value:function(){this._pInst.pop();var j=this.GL;j.stencilOp(j.KEEP,j.KEEP,j.KEEP),j.stencilFunc(this._clipInvert?j.EQUAL:j.NOTEQUAL,0,255),j.enable(j.DEPTH_TEST),this._clipDepths.push(this._pushPopDepth),n(v(L.prototype),"endClip",this).call(this)}},{key:"_clearClip",value:function(){this.GL.clearStencil(1),this.GL.clear(this.GL.STENCIL_BUFFER_BIT),0<this._clipDepths.length&&this._clipDepths.pop(),this.drawTarget()._isClipApplied=!1}},{key:"strokeWeight",value:function(j){this.curStrokeWeight!==j&&(this.pointSize=j,this.curStrokeWeight=j)}},{key:"_getPixel",value:function(j,R){var N=this.GL;return G(N,null,j,R,N.RGBA,N.UNSIGNED_BYTE,this._pInst.height*this._pInst.pixelDensity())}},{key:"loadPixels",value:function(){var j,R,N=this._pixelsState;this._pInst._glAttributes.preserveDrawingBuffer!==!0?console.log("loadPixels only works in WebGL when preserveDrawingBuffer is true."):(j=this._pInst._pixelDensity,R=this.GL,N._setProperty("pixels",z(N.pixels,R,null,0,0,this.width*j,this.height*j,R.RGBA,R.UNSIGNED_BYTE,this.height*j)))}},{key:"updatePixels",value:function(){var j=this._getTempFramebuffer();j.pixels=this._pixelsState.pixels,j.updatePixels(),this._pInst.push(),this._pInst.resetMatrix(),this._pInst.clear(),this._pInst.imageMode(f.CENTER),this._pInst.image(j,0,0),this._pInst.pop(),this.GL.clearDepth(1),this.GL.clear(this.GL.DEPTH_BUFFER_BIT)}},{key:"_getTempFramebuffer",value:function(){return this._tempFramebuffer||(this._tempFramebuffer=this._pInst.createFramebuffer({format:f.UNSIGNED_BYTE,useDepth:this._pInst._glAttributes.depth,depthFormat:f.UNSIGNED_INT,antialias:this._pInst._glAttributes.antialias})),this._tempFramebuffer}},{key:"geometryInHash",value:function(j){return this.retainedMode.geometry[j]!==void 0}},{key:"viewport",value:function(j,R){this._viewport=[0,0,j,R],this.GL.viewport(0,0,j,R)}},{key:"resize",value:function(K,X){u.default.Renderer.prototype.resize.call(this,K,X),this._origViewport={width:this.GL.drawingBufferWidth,height:this.GL.drawingBufferHeight},this.viewport(this._origViewport.width,this._origViewport.height),this._curCamera._resize();var K=this._pixelsState,N=(K.pixels!==void 0&&K._setProperty("pixels",new Uint8Array(this.GL.drawingBufferWidth*this.GL.drawingBufferHeight*4)),!0),X=!1,K=void 0;try{for(var re,ie=this.framebuffers[Symbol.iterator]();!(N=(re=ie.next()).done);N=!0)re.value._canvasSizeChanged()}catch(ee){X=!0,K=ee}finally{try{N||ie.return==null||ie.return()}finally{if(X)throw K}}}},{key:"clear",value:function(){var j=(arguments.length<=0?void 0:arguments[0])||0,R=(arguments.length<=1?void 0:arguments[1])||0,N=(arguments.length<=2?void 0:arguments[2])||0,X=(arguments.length<=3?void 0:arguments[3])||0,K=this.activeFramebuffer();K&&K.format===f.UNSIGNED_BYTE&&!K.antialias&&X===0&&(X=1e-10),this.GL.clearColor(j*X,R*X,N*X,X),this.GL.clearDepth(1),this.GL.clear(this.GL.COLOR_BUFFER_BIT|this.GL.DEPTH_BUFFER_BIT)}},{key:"clearDepth",value:function(){this.GL.clearDepth(0<arguments.length&&arguments[0]!==void 0?arguments[0]:1),this.GL.clear(this.GL.DEPTH_BUFFER_BIT)}},{key:"applyMatrix",value:function(j,R,N,X,K,re){arguments.length===16?u.default.Matrix.prototype.apply.apply(this.uModelMatrix,arguments):this.uModelMatrix.apply([j,R,0,0,N,X,0,0,0,0,1,0,K,re,0,1])}},{key:"translate",value:function(j,R,N){return j instanceof u.default.Vector&&(N=j.z,R=j.y,j=j.x),this.uModelMatrix.translate([j,R,N]),this}},{key:"scale",value:function(j,R,N){return this.uModelMatrix.scale(j,R,N),this}},{key:"rotate",value:function(j,R){return R===void 0?this.rotateZ(j):(u.default.Matrix.prototype.rotate.apply(this.uModelMatrix,arguments),this)}},{key:"rotateX",value:function(j){return this.rotate(j,1,0,0),this}},{key:"rotateY",value:function(j){return this.rotate(j,0,1,0),this}},{key:"rotateZ",value:function(j){return this.rotate(j,0,0,1),this}},{key:"push",value:function(){var j=u.default.Renderer.prototype.push.apply(this),R=j.properties;return R.uModelMatrix=this.uModelMatrix.copy(),R.uViewMatrix=this.uViewMatrix.copy(),R.uPMatrix=this.uPMatrix.copy(),R._curCamera=this._curCamera,this._curCamera=this._curCamera.copy(),R.ambientLightColors=this.ambientLightColors.slice(),R.specularColors=this.specularColors.slice(),R.directionalLightDirections=this.directionalLightDirections.slice(),R.directionalLightDiffuseColors=this.directionalLightDiffuseColors.slice(),R.directionalLightSpecularColors=this.directionalLightSpecularColors.slice(),R.pointLightPositions=this.pointLightPositions.slice(),R.pointLightDiffuseColors=this.pointLightDiffuseColors.slice(),R.pointLightSpecularColors=this.pointLightSpecularColors.slice(),R.spotLightPositions=this.spotLightPositions.slice(),R.spotLightDirections=this.spotLightDirections.slice(),R.spotLightDiffuseColors=this.spotLightDiffuseColors.slice(),R.spotLightSpecularColors=this.spotLightSpecularColors.slice(),R.spotLightAngle=this.spotLightAngle.slice(),R.spotLightConc=this.spotLightConc.slice(),R.userFillShader=this.userFillShader,R.userStrokeShader=this.userStrokeShader,R.userPointShader=this.userPointShader,R.pointSize=this.pointSize,R.curStrokeWeight=this.curStrokeWeight,R.curStrokeColor=this.curStrokeColor,R.curFillColor=this.curFillColor,R.curAmbientColor=this.curAmbientColor,R.curSpecularColor=this.curSpecularColor,R.curEmissiveColor=this.curEmissiveColor,R._hasSetAmbient=this._hasSetAmbient,R._useSpecularMaterial=this._useSpecularMaterial,R._useEmissiveMaterial=this._useEmissiveMaterial,R._useShininess=this._useShininess,R._useMetalness=this._useMetalness,R.constantAttenuation=this.constantAttenuation,R.linearAttenuation=this.linearAttenuation,R.quadraticAttenuation=this.quadraticAttenuation,R._enableLighting=this._enableLighting,R._useNormalMaterial=this._useNormalMaterial,R._tex=this._tex,R.drawMode=this.drawMode,R._currentNormal=this._currentNormal,R.curBlendMode=this.curBlendMode,R.activeImageLight=this.activeImageLight,R.textureMode=this.textureMode,j}},{key:"pop",value:function(){var j;0<this._clipDepths.length&&this._pushPopDepth===this._clipDepths[this._clipDepths.length-1]&&this._clearClip();for(var R=arguments.length,N=new Array(R),X=0;X<R;X++)N[X]=arguments[X];(j=n(v(L.prototype),"pop",this)).call.apply(j,[this].concat(N)),this._applyStencilTestIfClipping()}},{key:"_applyStencilTestIfClipping",value:function(){var j=this.drawTarget();j._isClipApplied!==this._stencilTestOn&&(j._isClipApplied?(this.GL.enable(this.GL.STENCIL_TEST),this._stencilTestOn=!0):(this.GL.disable(this.GL.STENCIL_TEST),this._stencilTestOn=!1))}},{key:"resetMatrix",value:function(){return this.uModelMatrix.reset(),this.uViewMatrix.set(this._curCamera.cameraMatrix),this}},{key:"_getImmediateStrokeShader",value:function(){var j=this.userStrokeShader;return j&&j.isStrokeShader()?j:this._getLineShader()}},{key:"_getRetainedStrokeShader",value:function(){return this._getImmediateStrokeShader()}},{key:"_getSphereMapping",value:function(j){return this.sphereMapping||(this.sphereMapping=this._pInst.createFilterShader(D)),this.uNMatrix.inverseTranspose(this.uViewMatrix),this.uNMatrix.invert3x3(this.uNMatrix),this.sphereMapping.setUniform("uFovY",this._curCamera.cameraFOV),this.sphereMapping.setUniform("uAspect",this._curCamera.aspectRatio),this.sphereMapping.setUniform("uNewNormalMatrix",this.uNMatrix.mat3),this.sphereMapping.setUniform("uSampler",j),this.sphereMapping}},{key:"_getImmediateFillShader",value:function(){var j=this.userFillShader;if(this._useNormalMaterial&&(!j||!j.isNormalShader()))return this._getNormalShader();if(this._enableLighting){if(!j||!j.isLightShader())return this._getLightShader()}else if(this._tex){if(!j||!j.isTextureShader())return this._getLightShader()}else if(!j)return this._getImmediateModeShader();return j}},{key:"_getRetainedFillShader",value:function(){if(this._useNormalMaterial)return this._getNormalShader();var j=this.userFillShader;if(this._enableLighting){if(!j||!j.isLightShader())return this._getLightShader()}else if(this._tex){if(!j||!j.isTextureShader())return this._getLightShader()}else if(!j)return this._getColorShader();return j}},{key:"_getImmediatePointShader",value:function(){var j=this.userPointShader;return j&&j.isPointShader()?j:this._getPointShader()}},{key:"_getRetainedLineShader",value:function(){return this._getImmediateLineShader()}},{key:"baseMaterialShader",value:function(){if(this._pInst._glAttributes.perPixelLighting)return this._getLightShader();throw new Error("The material shader does not support hooks without perPixelLighting. Try turning it back on.")}},{key:"_getLightShader",value:function(){return this._defaultLightShader||(this._pInst._glAttributes.perPixelLighting?this._defaultLightShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+F.phongVert,this._webGL2CompatibilityPrefix("frag","highp")+F.phongFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","vec3 getLocalNormal":"(vec3 normal) { return normal; }","vec3 getWorldNormal":"(vec3 normal) { return normal; }","vec2 getUV":"(vec2 uv) { return uv; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","Inputs getPixelInputs":"(Inputs inputs) { return inputs; }","vec4 combineColors":`(ColorComponents components) {
                vec4 color = vec4(0.);
                color.rgb += components.diffuse * components.baseColor;
                color.rgb += components.ambient * components.ambientColor;
                color.rgb += components.specular * components.specularColor;
                color.rgb += components.emissive;
                color.a = components.opacity;
                return color;
              }`,"vec4 getFinalColor":"(vec4 color) { return color; }","void afterFragment":"() {}"}}):this._defaultLightShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+F.lightVert,this._webGL2CompatibilityPrefix("frag","highp")+F.lightTextureFrag)),this._defaultLightShader}},{key:"_getImmediateModeShader",value:function(){return this._defaultImmediateModeShader||(this._defaultImmediateModeShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+F.immediateVert,this._webGL2CompatibilityPrefix("frag","mediump")+F.vertexColorFrag)),this._defaultImmediateModeShader}},{key:"baseNormalShader",value:function(){return this._getNormalShader()}},{key:"_getNormalShader",value:function(){return this._defaultNormalShader||(this._defaultNormalShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+F.normalVert,this._webGL2CompatibilityPrefix("frag","mediump")+F.normalFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","vec3 getLocalNormal":"(vec3 normal) { return normal; }","vec3 getWorldNormal":"(vec3 normal) { return normal; }","vec2 getUV":"(vec2 uv) { return uv; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","vec4 getFinalColor":"(vec4 color) { return color; }","void afterFragment":"() {}"}})),this._defaultNormalShader}},{key:"baseColorShader",value:function(){return this._getColorShader()}},{key:"_getColorShader",value:function(){return this._defaultColorShader||(this._defaultColorShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+F.normalVert,this._webGL2CompatibilityPrefix("frag","mediump")+F.basicFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","vec3 getLocalNormal":"(vec3 normal) { return normal; }","vec3 getWorldNormal":"(vec3 normal) { return normal; }","vec2 getUV":"(vec2 uv) { return uv; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","vec4 getFinalColor":"(vec4 color) { return color; }","void afterFragment":"() {}"}})),this._defaultColorShader}},{key:"pointShader",value:function(){return this._getPointShader()}},{key:"_getPointShader",value:function(){return this._defaultPointShader||(this._defaultPointShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+F.pointVert,this._webGL2CompatibilityPrefix("frag","mediump")+F.pointFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","float getPointSize":"(float size) { return size; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","vec4 getFinalColor":"(vec4 color) { return color; }","bool shouldDiscard":"(bool outside) { return outside; }","void afterFragment":"() {}"}})),this._defaultPointShader}},{key:"baseStrokeShader",value:function(){return this._getLineShader()}},{key:"_getLineShader",value:function(){return this._defaultLineShader||(this._defaultLineShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+F.lineVert,this._webGL2CompatibilityPrefix("frag","mediump")+F.lineFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","float getStrokeWeight":"(float weight) { return weight; }","vec2 getLineCenter":"(vec2 center) { return center; }","vec2 getLinePosition":"(vec2 position) { return position; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","Inputs getPixelInputs":"(Inputs inputs) { return inputs; }","vec4 getFinalColor":"(vec4 color) { return color; }","bool shouldDiscard":"(bool outside) { return outside; }","void afterFragment":"() {}"}})),this._defaultLineShader}},{key:"_getFontShader",value:function(){return this._defaultFontShader||(this.webglVersion===f.WEBGL&&this.GL.getExtension("OES_standard_derivatives"),this._defaultFontShader=new u.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+F.fontVert,this._webGL2CompatibilityPrefix("frag","highp")+F.fontFrag)),this._defaultFontShader}},{key:"_webGL2CompatibilityPrefix",value:function(j,R){var N="";return this.webglVersion===f.WEBGL2&&(N+=`#version 300 es
#define WEBGL2
`),j==="vert"?N+=`#define VERTEX_SHADER
`:j==="frag"&&(N+=`#define FRAGMENT_SHADER
`),R&&(N+="precision ".concat(R,` float;
`)),N}},{key:"_getEmptyTexture",value:function(){var j;return this._emptyTexture||((j=new u.default.Image(1,1)).set(0,0,255),this._emptyTexture=new u.default.Texture(this,j)),this._emptyTexture}},{key:"getTexture",value:function(j){j instanceof u.default.Framebuffer&&(j=j.color);var R=this.textures.get(j);return R||(R=new u.default.Texture(this,j),this.textures.set(j,R),R)}},{key:"getDiffusedTexture",value:function(j){var R,N,X=this;return this.diffusedTextures.get(j)!=null?this.diffusedTextures.get(j):(R=Math.floor(j.height/j.width*200),N=this._pInst.createFramebuffer({width:200,height:R,density:1}),this.diffusedShader||(this.diffusedShader=this._pInst.createShader(F.imageLightVert,F.imageLightDiffusedFrag)),N.draw(function(){X._pInst.shader(X.diffusedShader),X.diffusedShader.setUniform("environmentMap",j),X._pInst.noStroke(),X._pInst.rectMode(f.CENTER),X._pInst.noLights(),X._pInst.rect(0,0,200,R)}),this.diffusedTextures.set(j,N),N)}},{key:"getSpecularTexture",value:function(j){var R=this;if(this.specularTextures.get(j)!=null)return this.specularTextures.get(j);for(var N,X=[],K=this._pInst.createFramebuffer({width:512,height:512,density:1}),re=Math.log(512)/Math.log(2),ie=(this.specularShader||(this.specularShader=this._pInst.createShader(F.imageLightVert,F.imageLightSpecularFrag)),512);1<=ie;ie/=2)(function(ee){K.resize(ee,ee);var ae=1-Math.log(ee)/Math.log(2)/re;K.draw(function(){R._pInst.shader(R.specularShader),R._pInst.clear(),R.specularShader.setUniform("environmentMap",j),R.specularShader.setUniform("roughness",ae),R._pInst.noStroke(),R._pInst.noLights(),R._pInst.plane(ee,ee)}),X.push(K.get().drawingContext.getImageData(0,0,ee,ee))})(ie);return K.remove(),N=new o.MipmapTexture(this,X,{}),this.specularTextures.set(j,N),N}},{key:"activeFramebuffer",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||null}},{key:"createFramebuffer",value:function(j){return new u.default.Framebuffer(this,j)}},{key:"_setStrokeUniforms",value:function(j){j.bindShader(),j.setUniform("uUseLineColor",this._useLineColor),j.setUniform("uMaterialColor",this.curStrokeColor),j.setUniform("uStrokeWeight",this.curStrokeWeight),j.setUniform("uStrokeCap",O[this.curStrokeCap]),j.setUniform("uStrokeJoin",T[this.curStrokeJoin])}},{key:"_setFillUniforms",value:function(j){var R=this,N=(j.bindShader(),this.mixedSpecularColor=i(this.curSpecularColor),0<this._useMetalness&&(this.mixedSpecularColor=this.mixedSpecularColor.map(function(X,K){return R.curFillColor[K]*R._useMetalness+X*(1-R._useMetalness)})),j.setUniform("uUseVertexColor",this._useVertexColor),j.setUniform("uMaterialColor",this.curFillColor),j.setUniform("isTexture",!!this._tex),this._tex&&j.setUniform("uSampler",this._tex),j.setUniform("uTint",this._tint),j.setUniform("uHasSetAmbient",this._hasSetAmbient),j.setUniform("uAmbientMatColor",this.curAmbientColor),j.setUniform("uSpecularMatColor",this.mixedSpecularColor),j.setUniform("uEmissiveMatColor",this.curEmissiveColor),j.setUniform("uSpecular",this._useSpecularMaterial),j.setUniform("uEmissive",this._useEmissiveMaterial),j.setUniform("uShininess",this._useShininess),j.setUniform("uMetallic",this._useMetalness),this._setImageLightUniforms(j),j.setUniform("uUseLighting",this._enableLighting),this.pointLightDiffuseColors.length/3),N=(j.setUniform("uPointLightCount",N),j.setUniform("uPointLightLocation",this.pointLightPositions),j.setUniform("uPointLightDiffuseColors",this.pointLightDiffuseColors),j.setUniform("uPointLightSpecularColors",this.pointLightSpecularColors),this.directionalLightDiffuseColors.length/3),N=(j.setUniform("uDirectionalLightCount",N),j.setUniform("uLightingDirection",this.directionalLightDirections),j.setUniform("uDirectionalDiffuseColors",this.directionalLightDiffuseColors),j.setUniform("uDirectionalSpecularColors",this.directionalLightSpecularColors),this.ambientLightColors.length/3),N=(this.mixedAmbientLight=i(this.ambientLightColors),0<this._useMetalness&&(this.mixedAmbientLight=this.mixedAmbientLight.map(function(X){return X-=R._useMetalness,Math.max(0,X)})),j.setUniform("uAmbientLightCount",N),j.setUniform("uAmbientColor",this.mixedAmbientLight),this.spotLightDiffuseColors.length/3);j.setUniform("uSpotLightCount",N),j.setUniform("uSpotLightAngle",this.spotLightAngle),j.setUniform("uSpotLightConc",this.spotLightConc),j.setUniform("uSpotLightDiffuseColors",this.spotLightDiffuseColors),j.setUniform("uSpotLightSpecularColors",this.spotLightSpecularColors),j.setUniform("uSpotLightLocation",this.spotLightPositions),j.setUniform("uSpotLightDirection",this.spotLightDirections),j.setUniform("uConstantAttenuation",this.constantAttenuation),j.setUniform("uLinearAttenuation",this.linearAttenuation),j.setUniform("uQuadraticAttenuation",this.quadraticAttenuation),j.bindTextures()}},{key:"_setImageLightUniforms",value:function(j){var R;j.setUniform("uUseImageLight",this.activeImageLight!=null),this.activeImageLight&&(R=this.getDiffusedTexture(this.activeImageLight),j.setUniform("environmentMapDiffused",R),R=this.getSpecularTexture(this.activeImageLight),j.setUniform("environmentMapSpecular",R))}},{key:"_setPointUniforms",value:function(j){j.bindShader(),j.setUniform("uMaterialColor",this.curStrokeColor),j.setUniform("uPointSize",this.pointSize*this._pInst._pixelDensity)}},{key:"_bindBuffer",value:function(j,R,N,X,K){R=R||this.GL.ARRAY_BUFFER,this.GL.bindBuffer(R,j),N!==void 0&&((j=N)instanceof u.default.DataArray?j=N.dataArray():j instanceof(X||Float32Array)||(j=new(X||Float32Array)(j)),this.GL.bufferData(R,j,K||this.GL.STATIC_DRAW))}},{key:"_arraysEqual",value:function(j,R){return j.length===R.length&&j.every(function(N,X){return N===R[X]})}},{key:"_isTypedArray",value:function(j){return[Float32Array,Float64Array,Int16Array,Uint16Array,Uint32Array].some(function(R){return j instanceof R})}},{key:"_flatten",value:function(j){return j.flat()}},{key:"_vToNArray",value:function(j){return j.flatMap(function(R){return[R.x,R.y,R.z]})}},{key:"_bezierCoefficients",value:function(j){var R=j*j,N=1-j,X=N*N;return[X*N,3*X*j,3*N*R,R*j]}},{key:"_quadraticCoefficients",value:function(j){var R=1-j;return[R*R,2*R*j,j*j]}},{key:"_bezierToCatmull",value:function(j){return[j[1],j[1]+(j[2]-j[0])/this._curveTightness,j[2]-(j[3]-j[1])/this._curveTightness,j[2]]}},{key:"_initTessy",value:function(){var j=new y.default.GluTesselator;return j.gluTessCallback(y.default.gluEnum.GLU_TESS_VERTEX_DATA,function(R,N){var X=!0,K=!1,re=void 0;try{for(var ie,ee=R[Symbol.iterator]();!(X=(ie=ee.next()).done);X=!0){var ae=ie.value;N.push(ae)}}catch(ue){K=!0,re=ue}finally{try{X||ee.return==null||ee.return()}finally{if(K)throw re}}}),j.gluTessCallback(y.default.gluEnum.GLU_TESS_BEGIN,function(R){R!==y.default.primitiveType.GL_TRIANGLES&&console.log("expected TRIANGLES but got type: ".concat(R))}),j.gluTessCallback(y.default.gluEnum.GLU_TESS_ERROR,function(R){console.log("error callback"),console.log("error number: ".concat(R))}),j.gluTessCallback(y.default.gluEnum.GLU_TESS_COMBINE,function(R,N,X){for(var K=new Array(u.default.RendererGL.prototype.tessyVertexSize).fill(0),re=0;re<X.length;re++)for(var ie=0;ie<K.length;ie++)X[re]!==0&&N[re]&&(K[ie]+=N[re][ie]*X[re]);return K}),j.gluTessCallback(y.default.gluEnum.GLU_TESS_EDGE_FLAG,function(R){}),j.gluTessProperty(y.default.gluEnum.GLU_TESS_WINDING_RULE,y.default.windingRule.GLU_TESS_WINDING_NONZERO),j}},{key:"_triangulate",value:function(j){var R=j[0]?j[0][2]:void 0,N=!0,X=!0,ae=!1,Q=void 0;try{for(var K,re=j[Symbol.iterator]();!(X=(K=re.next()).done);X=!0)for(var ie=K.value,ee=0;ee<ie.length;ee+=u.default.RendererGL.prototype.tessyVertexSize)if(ie[ee+2]!==R){N=!1;break}}catch(Ae){ae=!0,Q=Ae}finally{try{X||re.return==null||re.return()}finally{if(ae)throw Q}}N?this._tessy.gluTessNormal(0,0,1):this._tessy.gluTessNormal(0,0,0);var ae=[],ue=(this._tessy.gluTessBeginPolygon(ae),!0),Q=!1,le=void 0;try{for(var fe,ve=j[Symbol.iterator]();!(ue=(fe=ve.next()).done);ue=!0){var he=fe.value;this._tessy.gluTessBeginContour();for(var me=0;me<he.length;me+=u.default.RendererGL.prototype.tessyVertexSize){var _e=he.slice(me,me+u.default.RendererGL.prototype.tessyVertexSize);this._tessy.gluTessVertex(_e,_e)}this._tessy.gluTessEndContour()}}catch(Ae){Q=!0,le=Ae}finally{try{ue||ve.return==null||ve.return()}finally{if(Q)throw le}}return this._tessy.gluTessEndPolygon(),ae}}])&&s(H.prototype,U),Y&&s(H,Y),L})(u.default.Renderer),u.default.prototype._assert3d=function(U){if(!this._renderer.isP3D)throw new Error("".concat(U,"() is only supported in WEBGL mode. If you'd like to use 3D graphics and WebGL, see https://p5js.org/examples/3d-geometries/ for more information."))},u.default.RendererGL.prototype.tessyVertexSize=12,M=u.default.RendererGL,C.default=M},{"../core/constants":272,"../core/main":283,"../core/p5.Renderer":286,"./GeometryBuilder":327,"./p5.Camera":332,"./p5.Framebuffer":334,"./p5.Matrix":336,"./p5.Shader":342,"./p5.Texture":343,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.copy-within":154,"core-js/modules/es.array.every":155,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.flat":160,"core-js/modules/es.array.flat-map":159,"core-js/modules/es.array.from":162,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.some":170,"core-js/modules/es.array.unscopables.flat":173,"core-js/modules/es.array.unscopables.flat-map":172,"core-js/modules/es.map":175,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.reflect.get":193,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.float64-array":220,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.int16-array":224,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint16-array":240,"core-js/modules/es.typed-array.uint32-array":241,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246,libtess:255,path:258}],342:[function(t,W,C){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var p=(t=t("../core/main"))&&t.__esModule?t:{default:t};function m(f,g){return(function(y){if(Array.isArray(y))return y})(f)||(function(y,o){if(Symbol.iterator in Object(y)||Object.prototype.toString.call(y)==="[object Arguments]"){var a=[],r=!0,i=!1,s=void 0;try{for(var n,l=y[Symbol.iterator]();!(r=(n=l.next()).done)&&(a.push(n.value),!o||a.length!==o);r=!0);}catch(c){i=!0,s=c}finally{try{r||l.return==null||l.return()}finally{if(i)throw s}}return a}})(f,g)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")})()}function u(f,g){for(var y=0;y<g.length;y++){var o=g[y];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(f,o.key,o)}}p.default.Shader=(function(){function f(a,r,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:{},n=this,l=f;if(!(n instanceof l))throw new TypeError("Cannot call a class as a function");this._renderer=a,this._vertSrc=r,this._fragSrc=i,this._vertShader=-1,this._fragShader=-1,this._glProgram=0,this._loadedAttributes=!1,this.attributes={},this._loadedUniforms=!1,this.uniforms={},this._bound=!1,this.samplers=[],this.hooks={uniforms:s.uniforms||{},declarations:s.declarations,helpers:s.helpers||{},vertex:s.vertex||{},fragment:s.fragment||{},modified:{vertex:s.modified&&s.modified.vertex||{},fragment:s.modified&&s.modified.fragment||{}}}}var g,y,o;return g=f,(y=[{key:"shaderSrc",value:function(v,r){var i,s,n,l,c,v=m(v.split("void main"),2),d=v[0],v=v[1],S="";for(i in this.hooks.uniforms)S+="uniform ".concat(i,`;
`);for(s in this.hooks.declarations&&(S+=this.hooks.declarations+`
`),this.hooks[r].declarations&&(S+=this.hooks[r].declarations+`
`),this.hooks.helpers)S+="".concat(s).concat(this.hooks.helpers[s],`
`);for(n in this.hooks[r])n!=="declarations"&&(l=(c=m(n.split(" "),2))[0],c=c[1],this.hooks.modified[r][n]&&(S+="#define AUGMENTED_HOOK_"+c+`
`),S+=l+" HOOK_"+c+this.hooks[r][n]+`
`);return d+S+"void main"+v}},{key:"version",value:function(){var a=/#version (.+)$/.exec(this.vertSrc());return a?a[1]:"100 es"}},{key:"vertSrc",value:function(){return this.shaderSrc(this._vertSrc,"vertex")}},{key:"fragSrc",value:function(){return this.shaderSrc(this._fragSrc,"fragment")}},{key:"inspectHooks",value:function(){for(var a in console.log("==== Vertex shader hooks: ===="),this.hooks.vertex)console.log((this.hooks.modified.vertex[a]?"[MODIFIED] ":"")+a+this.hooks.vertex[a]);for(var r in console.log(""),console.log("==== Fragment shader hooks: ===="),this.hooks.fragment)console.log((this.hooks.modified.fragment[r]?"[MODIFIED] ":"")+r+this.hooks.fragment[r]);for(var i in console.log(""),console.log("==== Helper functions: ===="),this.hooks.helpers)console.log(i+this.hooks.helpers[i])}},{key:"modify",value:function(a){p.default._validateParameters("p5.Shader.modify",arguments);var r,i={vertex:{},fragment:{},helpers:{}};for(r in a)r!=="declarations"&&r!=="uniforms"&&(r==="vertexDeclarations"?i.vertex.declarations=(i.vertex.declarations||"")+`
`+a[r]:r==="fragmentDeclarations"?i.fragment.declarations=(i.fragment.declarations||"")+`
`+a[r]:this.hooks.vertex[r]?i.vertex[r]=a[r]:this.hooks.fragment[r]?i.fragment[r]=a[r]:i.helpers[r]=a[r]);var s,n,l=Object.assign({},this.hooks.modified.vertex),c=Object.assign({},this.hooks.modified.fragment);for(s in i.vertex||{})s!=="declarations"&&(l[s]=!0);for(n in i.fragment||{})n!=="declarations"&&(c[n]=!0);return new p.default.Shader(this._renderer,this._vertSrc,this._fragSrc,{declarations:(this.hooks.declarations||"")+`
`+(a.declarations||""),uniforms:Object.assign({},this.hooks.uniforms,a.uniforms||{}),fragment:Object.assign({},this.hooks.fragment,i.fragment||{}),vertex:Object.assign({},this.hooks.vertex,i.vertex||{}),helpers:Object.assign({},this.hooks.helpers,i.helpers||{}),modified:{vertex:l,fragment:c}})}},{key:"init",value:function(){if(this._glProgram===0){var a,r=this._renderer.GL;if(this._vertShader=r.createShader(r.VERTEX_SHADER),r.shaderSource(this._vertShader,this.vertSrc()),r.compileShader(this._vertShader),!r.getShaderParameter(this._vertShader,r.COMPILE_STATUS))return a=r.getShaderInfoLog(this._vertShader),console.error(a),null;if(this._fragShader=r.createShader(r.FRAGMENT_SHADER),r.shaderSource(this._fragShader,this.fragSrc()),r.compileShader(this._fragShader),!r.getShaderParameter(this._fragShader,r.COMPILE_STATUS))return a=r.getShaderInfoLog(this._fragShader),console.error(a),null;this._glProgram=r.createProgram(),r.attachShader(this._glProgram,this._vertShader),r.attachShader(this._glProgram,this._fragShader),r.linkProgram(this._glProgram),r.getProgramParameter(this._glProgram,r.LINK_STATUS)||p.default._friendlyError("Snap! Error linking shader program: ".concat(r.getProgramInfoLog(this._glProgram))),this._loadAttributes(),this._loadUniforms()}return this}},{key:"setDefaultUniforms",value:function(){for(var a in this.hooks.uniforms){var r=m(a.split(" "),2)[1],a=this.hooks.uniforms[a],i=void 0;(i=a instanceof Function?a():a)!=null&&this.setUniform(r,i)}}},{key:"copyToContext",value:function(a){var r=new p.default.Shader(a._renderer,this._vertSrc,this._fragSrc);return r.ensureCompiledOnContext(a),r}},{key:"ensureCompiledOnContext",value:function(a){if(this._glProgram!==0&&this._renderer!==a._renderer)throw new Error("The shader being run is attached to a different context. Do you need to copy it to this context first with .copyToContext()?");this._glProgram===0&&(this._renderer=a._renderer,this.init())}},{key:"_loadAttributes",value:function(){if(!this._loadedAttributes){this.attributes={};for(var a=this._renderer.GL,r=a.getProgramParameter(this._glProgram,a.ACTIVE_ATTRIBUTES),i=0;i<r;++i){var s=a.getActiveAttrib(this._glProgram,i),n=s.name,l=a.getAttribLocation(this._glProgram,n),c={};c.name=n,c.location=l,c.index=i,c.type=s.type,c.size=s.size,this.attributes[n]=c}this._loadedAttributes=!0}}},{key:"_loadUniforms",value:function(){if(!this._loadedUniforms){for(var a=this._renderer.GL,r=a.getProgramParameter(this._glProgram,a.ACTIVE_UNIFORMS),i=0,s=0;s<r;++s){var n=a.getActiveUniform(this._glProgram,s),l={},c=(l.location=a.getUniformLocation(this._glProgram,n.name),l.size=n.size,n.name);1<n.size&&(c=c.substring(0,c.indexOf("[0]"))),l.name=c,l.type=n.type,l._cachedData=void 0,l.type===a.SAMPLER_2D&&(l.samplerIndex=i,i++,this.samplers.push(l)),l.isArray=1<n.size||l.type===a.FLOAT_MAT3||l.type===a.FLOAT_MAT4||l.type===a.FLOAT_VEC2||l.type===a.FLOAT_VEC3||l.type===a.FLOAT_VEC4||l.type===a.INT_VEC2||l.type===a.INT_VEC4||l.type===a.INT_VEC3,this.uniforms[c]=l}this._loadedUniforms=!0}}},{key:"compile",value:function(){}},{key:"bindShader",value:function(){this.init(),this._bound||(this.useProgram(),this._bound=!0,this._setMatrixUniforms(),this.setUniform("uViewport",this._renderer._viewport))}},{key:"unbindShader",value:function(){return this._bound&&(this.unbindTextures(),this._bound=!1),this}},{key:"bindTextures",value:function(){var a=this._renderer.GL,r=!0,i=!1,s=void 0;try{for(var n,l=this.samplers[Symbol.iterator]();!(r=(n=l.next()).done);r=!0){var c=n.value,d=c.texture;d===void 0&&(d=this._renderer._getEmptyTexture()),a.activeTexture(a.TEXTURE0+c.samplerIndex),d.bindTexture(),d.update(),a.uniform1i(c.location,c.samplerIndex)}}catch(v){i=!0,s=v}finally{try{r||l.return==null||l.return()}finally{if(i)throw s}}}},{key:"updateTextures",value:function(){var a=!0,r=!1,i=void 0;try{for(var s,n=this.samplers[Symbol.iterator]();!(a=(s=n.next()).done);a=!0){var l=s.value.texture;l&&l.update()}}catch(c){r=!0,i=c}finally{try{a||n.return==null||n.return()}finally{if(r)throw i}}}},{key:"unbindTextures",value:function(){var a=!0,r=!1,i=void 0;try{for(var s,n=this.samplers[Symbol.iterator]();!(a=(s=n.next()).done);a=!0){var l=s.value;this.setUniform(l.name,this._renderer._getEmptyTexture())}}catch(c){r=!0,i=c}finally{try{a||n.return==null||n.return()}finally{if(r)throw i}}}},{key:"_setMatrixUniforms",value:function(){var a=this._renderer.uModelMatrix,r=this._renderer.uViewMatrix,i=this._renderer.uPMatrix,s=a.copy().mult(r),n=(this._renderer.uMVMatrix=s).copy();n.mult(i),this.isStrokeShader()&&this.setUniform("uPerspective",this._renderer._curCamera.useLinePerspective?1:0),this.setUniform("uViewMatrix",r.mat4),this.setUniform("uProjectionMatrix",i.mat4),this.setUniform("uModelMatrix",a.mat4),this.setUniform("uModelViewMatrix",s.mat4),this.setUniform("uModelViewProjectionMatrix",n.mat4),this.uniforms.uNormalMatrix&&(this._renderer.uNMatrix.inverseTranspose(this._renderer.uMVMatrix),this.setUniform("uNormalMatrix",this._renderer.uNMatrix.mat3)),this.uniforms.uCameraRotation&&(this._renderer.curMatrix.inverseTranspose(this._renderer.uViewMatrix),this.setUniform("uCameraRotation",this._renderer.curMatrix.mat3))}},{key:"useProgram",value:function(){var a=this._renderer.GL;return this._renderer._curShader!==this&&(a.useProgram(this._glProgram),this._renderer._curShader=this),this}},{key:"setUniform",value:function(a,r){var i=this.uniforms[a];if(i){var s=this._renderer.GL;if(i.isArray){if(i._cachedData&&this._renderer._arraysEqual(i._cachedData,r))return;i._cachedData=r.slice(0)}else{if(i._cachedData&&i._cachedData===r)return;Array.isArray(r)?i._cachedData=r.slice(0):i._cachedData=r}var n=i.location;switch(this.useProgram(),i.type){case s.BOOL:r===!0?s.uniform1i(n,1):s.uniform1i(n,0);break;case s.INT:1<i.size?r.length&&s.uniform1iv(n,r):s.uniform1i(n,r);break;case s.FLOAT:1<i.size?r.length&&s.uniform1fv(n,r):s.uniform1f(n,r);break;case s.FLOAT_MAT3:s.uniformMatrix3fv(n,!1,r);break;case s.FLOAT_MAT4:s.uniformMatrix4fv(n,!1,r);break;case s.FLOAT_VEC2:1<i.size?r.length&&s.uniform2fv(n,r):s.uniform2f(n,r[0],r[1]);break;case s.FLOAT_VEC3:1<i.size?r.length&&s.uniform3fv(n,r):s.uniform3f(n,r[0],r[1],r[2]);break;case s.FLOAT_VEC4:1<i.size?r.length&&s.uniform4fv(n,r):s.uniform4f(n,r[0],r[1],r[2],r[3]);break;case s.INT_VEC2:1<i.size?r.length&&s.uniform2iv(n,r):s.uniform2i(n,r[0],r[1]);break;case s.INT_VEC3:1<i.size?r.length&&s.uniform3iv(n,r):s.uniform3i(n,r[0],r[1],r[2]);break;case s.INT_VEC4:1<i.size?r.length&&s.uniform4iv(n,r):s.uniform4i(n,r[0],r[1],r[2],r[3]);break;case s.SAMPLER_2D:if(typeof r=="number"){if(r<s.TEXTURE0||r>s.TEXTURE31||r!==Math.ceil(r))return console.log("\u{1F338} p5.js says: You're trying to use a number as the data for a texture.Please use a texture."),this;s.activeTexture(r),s.uniform1i(n,r)}else s.activeTexture(s.TEXTURE0+i.samplerIndex),i.texture=r instanceof p.default.Texture?r:this._renderer.getTexture(r),s.uniform1i(n,i.samplerIndex),i.texture.src.gifProperties&&i.texture.src._animateGif(this._renderer._pInst);break;case s.SAMPLER_CUBE:case s.SAMPLER_3D:case s.SAMPLER_2D_SHADOW:case s.SAMPLER_2D_ARRAY:case s.SAMPLER_2D_ARRAY_SHADOW:case s.SAMPLER_CUBE_SHADOW:case s.INT_SAMPLER_2D:case s.INT_SAMPLER_3D:case s.INT_SAMPLER_CUBE:case s.INT_SAMPLER_2D_ARRAY:case s.UNSIGNED_INT_SAMPLER_2D:case s.UNSIGNED_INT_SAMPLER_3D:case s.UNSIGNED_INT_SAMPLER_CUBE:case s.UNSIGNED_INT_SAMPLER_2D_ARRAY:typeof r=="number"&&(r<s.TEXTURE0||r>s.TEXTURE31||r!==Math.ceil(r)?console.log("\u{1F338} p5.js says: You're trying to use a number as the data for a texture.Please use a texture."):(s.activeTexture(r),s.uniform1i(n,r)))}return this}}},{key:"isLightShader",value:function(){return[this.attributes.aNormal,this.uniforms.uUseLighting,this.uniforms.uAmbientLightCount,this.uniforms.uDirectionalLightCount,this.uniforms.uPointLightCount,this.uniforms.uAmbientColor,this.uniforms.uDirectionalDiffuseColors,this.uniforms.uDirectionalSpecularColors,this.uniforms.uPointLightLocation,this.uniforms.uPointLightDiffuseColors,this.uniforms.uPointLightSpecularColors,this.uniforms.uLightingDirection,this.uniforms.uSpecular].some(function(a){return a!==void 0})}},{key:"isNormalShader",value:function(){return this.attributes.aNormal!==void 0}},{key:"isTextureShader",value:function(){return 0<this.samplers.length}},{key:"isColorShader",value:function(){return this.attributes.aVertexColor!==void 0||this.uniforms.uMaterialColor!==void 0}},{key:"isTexLightShader",value:function(){return this.isLightShader()&&this.isTextureShader()}},{key:"isStrokeShader",value:function(){return this.uniforms.uStrokeWeight!==void 0}},{key:"enableAttrib",value:function(a,r,i,s,n,l){var c;return a&&(a=a.location)!==-1&&(c=this._renderer.GL,this._renderer.registerEnabled.has(a)||(c.enableVertexAttribArray(a),this._renderer.registerEnabled.add(a)),this._renderer.GL.vertexAttribPointer(a,r,i||c.FLOAT,s||!1,n||0,l||0)),this}},{key:"disableRemainingAttributes",value:function(){var a=this,r=!0,i=!1,s=void 0;try{for(var n,l=this._renderer.registerEnabled.values()[Symbol.iterator]();!(r=(n=l.next()).done);r=!0)(function(){var c=n.value;Object.keys(a.attributes).some(function(d){return a.attributes[d].location===c})||(a._renderer.GL.disableVertexAttribArray(c),a._renderer.registerEnabled.delete(c))})()}catch(c){i=!0,s=c}finally{try{r||l.return==null||l.return()}finally{if(i)throw s}}}}])&&u(g.prototype,y),o&&u(g,o),f})(),t=p.default.Shader,C.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.some":170,"core-js/modules/es.function.name":174,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],343:[function(t,W,C){"use strict";function p(c){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(c)}function m(c){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(d){return p(d)}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":p(d)})(c)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(C,"__esModule",{value:!0}),C.checkWebGLCapabilities=l,C.default=C.MipmapTexture=void 0;var u=(n=t("../core/main"))&&n.__esModule?n:{default:n},f=(function(c){if(c&&c.__esModule)return c;if(c===null||m(c)!=="object"&&typeof c!="function")return{default:c};var d=g();if(d&&d.has(c))return d.get(c);var v,S={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(v in c){var _;Object.prototype.hasOwnProperty.call(c,v)&&((_=E?Object.getOwnPropertyDescriptor(c,v):null)&&(_.get||_.set)?Object.defineProperty(S,v,_):S[v]=c[v])}return S.default=c,d&&d.set(c,S),S})(t("../core/constants"));function g(){var c;return typeof WeakMap!="function"?null:(c=new WeakMap,g=function(){return c},c)}function y(c,d){return(y=Object.setPrototypeOf||function(v,S){return v.__proto__=S,v})(c,d)}function o(c){return function(){var d,v=a(c),v=(d=(function(){if(typeof Reflect<"u"&&Reflect.construct&&!Reflect.construct.sham){if(typeof Proxy=="function")return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch{}}})()?(d=a(this).constructor,Reflect.construct(v,arguments,d)):v.apply(this,arguments),this);if(!d||m(d)!=="object"&&typeof d!="function"){if(v!==void 0)return v;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return d}}function a(c){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)})(c)}function r(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}function i(c,d){for(var v=0;v<d.length;v++){var S=d[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(c,S.key,S)}}function s(c,d,v){d&&i(c.prototype,d),v&&i(c,v)}u.default.Texture=(function(){function c(x,v,_){r(this,c),this._renderer=x;var E=this._renderer.GL,_=(_=_||{},this.src=v,this.glTex=void 0,this.glTarget=E.TEXTURE_2D,this.glFormat=_.format||E.RGBA,this.mipmaps=!1,this.glMinFilter=_.minFilter||E.LINEAR,this.glMagFilter=_.magFilter||E.LINEAR,this.glWrapS=_.wrapS||E.CLAMP_TO_EDGE,this.glWrapT=_.wrapT||E.CLAMP_TO_EDGE,this.glDataType=_.dataType||E.UNSIGNED_BYTE,l(x)),x=(this.glFormat!==E.HALF_FLOAT||_.halfFloat||(console.log("This device does not support dataType HALF_FLOAT. Falling back to FLOAT."),this.glDataType=E.FLOAT),this.glFormat!==E.HALF_FLOAT||this.glMinFilter!==E.LINEAR&&this.glMagFilter!==E.LINEAR||_.halfFloatLinear||(console.log("This device does not support linear filtering for dataType FLOAT. Falling back to NEAREST."),this.glMinFilter===E.LINEAR&&(this.glMinFilter=E.NEAREST),this.glMagFilter===E.LINEAR&&(this.glMagFilter=E.NEAREST)),this.glFormat!==E.FLOAT||_.float||(console.log("This device does not support dataType FLOAT. Falling back to UNSIGNED_BYTE."),this.glDataType=E.UNSIGNED_BYTE),this.glFormat!==E.FLOAT||this.glMinFilter!==E.LINEAR&&this.glMagFilter!==E.LINEAR||_.floatLinear||(console.log("This device does not support linear filtering for dataType FLOAT. Falling back to NEAREST."),this.glMinFilter===E.LINEAR&&(this.glMinFilter=E.NEAREST),this.glMagFilter===E.LINEAR&&(this.glMagFilter=E.NEAREST)),this.isSrcMediaElement=u.default.MediaElement!==void 0&&v instanceof u.default.MediaElement,this._videoPrevUpdateTime=0,this.isSrcHTMLElement=u.default.Element!==void 0&&v instanceof u.default.Element&&!(v instanceof u.default.Graphics)&&!(v instanceof u.default.Renderer),this.isSrcP5Image=v instanceof u.default.Image,this.isSrcP5Graphics=v instanceof u.default.Graphics,this.isSrcP5Renderer=v instanceof u.default.Renderer,this.isImageData=typeof ImageData<"u"&&v instanceof ImageData,this.isFramebufferTexture=v instanceof u.default.FramebufferTexture,this._getTextureDataFromSource());return this.width=x.width,this.height=x.height,this.init(x),this}return s(c,[{key:"_getTextureDataFromSource",value:function(){var d;return this.isFramebufferTexture?d=this.src.rawTexture():this.isSrcP5Image?d=this.src.canvas:this.isSrcMediaElement||this.isSrcP5Graphics||this.isSrcP5Renderer||this.isSrcHTMLElement?(this.src._ensureCanvas&&this.src._ensureCanvas(),d=this.src.canvas||this.src.elt):this.isImageData&&(d=this.src),d}},{key:"init",value:function(d){var v,S=this._renderer.GL;this.isFramebufferTexture||(this.glTex=S.createTexture()),this.glWrapS=this._renderer.textureWrapX,this.glWrapT=this._renderer.textureWrapY,this.setWrapMode(this.glWrapS,this.glWrapT),this.bindTexture(),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,this.glMagFilter),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,this.glMinFilter),this.isFramebufferTexture||(this.width===0||this.height===0||this.isSrcMediaElement&&!this.src.loadedmetadata?(v=new Uint8Array([1,1,1,1]),S.texImage2D(this.glTarget,0,S.RGBA,1,1,0,this.glFormat,this.glDataType,v)):S.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,this.glDataType,d))}},{key:"update",value:function(){var d,v,S,E=this.src;return E.width!==0&&E.height!==0&&!this.isFramebufferTexture&&(d=this._getTextureDataFromSource(),v=!1,S=this._renderer.GL,d.width!==this.width||d.height!==this.height?(v=!0,this.width=d.width||E.width,this.height=d.height||E.height,this.isSrcP5Image?E.setModified(!1):(this.isSrcMediaElement||this.isSrcHTMLElement)&&E.setModified(!0)):this.isSrcP5Image?E.isModified()&&E.setModified(!(v=!0)):this.isSrcMediaElement?E.isModified()?E.setModified(!(v=!0)):E.loadedmetadata&&this._videoPrevUpdateTime!==E.time()&&(this._videoPrevUpdateTime=E.time(),v=!0):this.isImageData?E._dirty&&(v=!(E._dirty=!1)):v=!0,v&&(this.bindTexture(),S.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,this.glDataType,d)),v)}},{key:"bindTexture",value:function(){return this._renderer.GL.bindTexture(this.glTarget,this.getTexture()),this}},{key:"unbindTexture",value:function(){this._renderer.GL.bindTexture(this.glTarget,null)}},{key:"getTexture",value:function(){return this.isFramebufferTexture?this.src.rawTexture():this.glTex}},{key:"setInterpolation",value:function(d,v){var S=this._renderer.GL;this.glMinFilter=this.glFilter(d),this.glMagFilter=this.glFilter(v),this.bindTexture(),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,this.glMinFilter),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,this.glMagFilter),this.unbindTexture()}},{key:"glFilter",value:function(d){var v=this._renderer.GL;return d===f.NEAREST?v.NEAREST:v.LINEAR}},{key:"setWrapMode",value:function(d,v){function S(O){return(O&O-1)==0}var E=this._renderer.GL,x=this._getTextureDataFromSource(),x=x.naturalWidth&&x.naturalHeight?(_=x.naturalWidth,x.naturalHeight):(_=this.width,this.height),_=S(_),x=S(x);d===f.REPEAT?this._renderer.webglVersion===f.WEBGL2||_&&x?this.glWrapS=E.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=E.CLAMP_TO_EDGE):d===f.MIRROR?this._renderer.webglVersion===f.WEBGL2||_&&x?this.glWrapS=E.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=E.CLAMP_TO_EDGE):this.glWrapS=E.CLAMP_TO_EDGE,v===f.REPEAT?this._renderer.webglVersion===f.WEBGL2||_&&x?this.glWrapT=E.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=E.CLAMP_TO_EDGE):v===f.MIRROR?this._renderer.webglVersion===f.WEBGL2||_&&x?this.glWrapT=E.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=E.CLAMP_TO_EDGE):this.glWrapT=E.CLAMP_TO_EDGE,this.bindTexture(),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,this.glWrapS),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,this.glWrapT),this.unbindTexture()}}]),c})();var n=(function(c){var d=S;if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(c&&c.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),c&&y(d,c);var v=o(S);function S(E,_,x){return r(this,S),_=(E=v.call(this,E,_,x))._renderer.GL,E.glMinFilter===_.LINEAR&&(E.glMinFilter=_.LINEAR_MIPMAP_LINEAR),E}return s(S,[{key:"glFilter",value:function(E){return this._renderer.GL.LINEAR_MIPMAP_LINEAR}},{key:"_getTextureDataFromSource",value:function(){return this.src}},{key:"init",value:function(E){var _=this._renderer.GL;this.glTex=_.createTexture(),this.bindTexture();for(var x=0;x<E.length;x++)_.texImage2D(this.glTarget,x,this.glFormat,this.glFormat,this.glDataType,E[x]);this.glMinFilter=_.LINEAR_MIPMAP_LINEAR,_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MAG_FILTER,this.glMagFilter),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MIN_FILTER,this.glMinFilter),this.unbindTexture()}},{key:"update",value:function(){}}]),S})(u.default.Texture);function l(E){var d=E.GL,E=E.webglVersion,v=E===f.WEBGL2?d.getExtension("EXT_color_buffer_float")&&d.getExtension("EXT_float_blend"):d.getExtension("OES_texture_float"),S=v&&d.getExtension("OES_texture_float_linear"),E=E===f.WEBGL2?d.getExtension("EXT_color_buffer_float"):d.getExtension("OES_texture_half_float");return{float:v,floatLinear:S,halfFloat:E,halfFloatLinear:E&&d.getExtension("OES_texture_half_float_linear")}}C.MipmapTexture=n,t=u.default.Texture,C.default=t},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],344:[function(t,W,C){"use strict";function p(c){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(c)}function m(c){return(m=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?function(d){return p(d)}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":p(d)})(c)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.sub"),t("core-js/modules/web.dom-collections.iterator");var u,f=(u=t("../core/main"))&&u.__esModule?u:{default:u},g=(function(c){if(c&&c.__esModule)return c;if(c===null||m(c)!=="object"&&typeof c!="function")return{default:c};var d=y();if(d&&d.has(c))return d.get(c);var v,S={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(v in c){var _;Object.prototype.hasOwnProperty.call(c,v)&&((_=E?Object.getOwnPropertyDescriptor(c,v):null)&&(_.get||_.set)?Object.defineProperty(S,v,_):S[v]=c[v])}return S.default=c,d&&d.set(c,S),S})(t("../core/constants"));function y(){var c;return typeof WeakMap!="function"?null:(c=new WeakMap,y=function(){return c},c)}function o(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}function a(c,d){for(var v=0;v<d.length;v++){var S=d[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(c,S.key,S)}}function r(c,d,v){d&&a(c.prototype,d),v&&a(c,v)}t("./p5.Shader"),t("./p5.RendererGL.Retained"),f.default.RendererGL.prototype._applyTextProperties=function(){this._setProperty("_textAscent",null),this._setProperty("_textDescent",null)},f.default.RendererGL.prototype.textWidth=function(c){return this._isOpenType()?this._textFont._textWidth(c,this._textSize):0};var i=(function(){function c(d,v){o(this,c),this.width=d,this.height=v,this.infos=[]}return r(c,[{key:"findImage",value:function(d){var v,S,E=this.width*this.height;if(E<d)throw new Error("font is too complex to render in 3D");for(var _=this.infos.length-1;0<=_;--_){var x=this.infos[_];if(x.index+d<E){S=(v=x).imageData;break}}if(!v){try{S=new ImageData(this.width,this.height)}catch{var O=document.getElementsByTagName("canvas")[0],T=!O,P=(O||((O=document.createElement("canvas")).style.display="none",document.body.appendChild(O)),O.getContext("2d"));P&&(S=P.createImageData(this.width,this.height)),T&&document.body.removeChild(O)}this.infos.push(v={index:0,imageData:S})}return P=v.index,v.index+=d,S._dirty=!0,{imageData:S,index:P}}}]),c})();function s(x,d,v,S,E){var _=x.imageData.data,x=4*x.index++;_[x++]=d,_[x++]=v,_[x++]=S,_[+x]=E}var n=Math.sqrt(3),l=(function(){function c(d){o(this,c),this.font=d,this.strokeImageInfos=new i(64,64),this.colDimImageInfos=new i(64,64),this.rowDimImageInfos=new i(64,64),this.colCellImageInfos=new i(64,64),this.rowCellImageInfos=new i(64,64),this.glyphInfos={}}return r(c,[{key:"getGlyphInfo",value:function(d){var v=this.glyphInfos[d.index];if(!v){var S=d.getBoundingBox(),E=S.x1,_=S.y1,x=S.x2-E,O=S.y2-_,T=d.path.commands;if(x==0||O==0||!T.length)return this.glyphInfos[d.index]={};for(var P=[],M=[],F=[],D=8;0<=D;--D)F.push([]);for(D=8;0<=D;--D)M.push([]);var A,z,G,U,H=(function(){function Ne(Be,He,Ve,ge){o(this,Ne),this.p0=Be,this.c0=He,this.c1=Ve,this.p1=ge}return r(Ne,[{key:"toQuadratic",value:function(){return{x:this.p0.x,y:this.p0.y,x1:this.p1.x,y1:this.p1.y,cx:(3*(this.c0.x+this.c1.x)-(this.p0.x+this.p1.x))/4,cy:(3*(this.c0.y+this.c1.y)-(this.p0.y+this.p1.y))/4}}},{key:"quadError",value:function(){return f.default.Vector.sub(f.default.Vector.sub(this.p1,this.p0),f.default.Vector.mult(f.default.Vector.sub(this.c1,this.c0),3)).mag()/2}},{key:"split",value:function(Ce){var He=f.default.Vector.lerp(this.p0,this.c0,Ce),ge=f.default.Vector.lerp(this.c0,this.c1,Ce),Ve=f.default.Vector.lerp(He,ge,Ce),ge=(this.c1=f.default.Vector.lerp(this.c1,this.p1,Ce),this.c0=f.default.Vector.lerp(ge,this.c1,Ce),f.default.Vector.lerp(Ve,this.c0,Ce)),Ce=new Ne(this.p0,He,Ve,ge);return this.p0=ge,Ce}},{key:"splitInflections",value:function(){var Be=f.default.Vector.sub(this.c0,this.p0),He=f.default.Vector.sub(f.default.Vector.sub(this.c1,this.c0),Be),Ve=f.default.Vector.sub(f.default.Vector.sub(f.default.Vector.sub(this.p1,this.c1),Be),f.default.Vector.mult(He,2)),ge=[],Ce=He.x*Ve.y-He.y*Ve.x;return Ce!==0&&0<=(Be=(Ve=Be.x*Ve.y-Be.y*Ve.x)*Ve-4*Ce*(Be.x*He.y-Be.y*He.x))&&(Ce<0&&(Ce=-Ce,Ve=-Ve),Be=(-Ve+(He=Math.sqrt(Be)))/(2*Ce),0<(Ve=(-Ve-He)/(2*Ce))&&Ve<1&&(ge.push(this.split(Ve)),Be=1-(1-Be)/(1-Ve)),0<Be&&Be<1&&ge.push(this.split(Be))),ge.push(this),ge}}]),Ne})(),Y=!0,oe=!1,L=void 0;try{for(var j,R=T[Symbol.iterator]();!(Y=(j=R.next()).done);Y=!0){var N=j.value,X=(N.x-E)/x,K=(N.y-_)/O;if(!Se(A,z,X,K)){switch(N.type){case"M":G=X,U=K;break;case"L":Ae(A,z,X,K);break;case"Q":var re=(N.x1-E)/x,ie=(N.y1-_)/O;me([A,X,re],[z,K,ie],{x:A,y:z,cx:re,cy:ie});break;case"Z":Se(A,z,G,U)?P.push({x:A,y:z}):(Ae(A,z,G,U),P.push({x:G,y:U}));break;case"C":for(var ee=(function($,je,ke,Ve,ge,Ce,xe,Z){var $=new H(new f.default.Vector($,je),new f.default.Vector(ke,Ve),new f.default.Vector(ge,Ce),new f.default.Vector(xe,Z)).splitInflections(),q=[],te=30/n,pe=!0,je=!1,ke=void 0;try{for(var Ie,Fe=$[Symbol.iterator]();!(pe=(Ie=Fe.next()).done);pe=!0){for(var Ue=Ie.value,We=[],rt=void 0;!(.125<=(rt=te/Ue.quadError()));){var et=Math.pow(rt,.3333333333333333),Ye=Ue.split(et),tt=Ue.split(1-et/(1-et));q.push(Ye),We.push(Ue),Ue=tt}rt<1&&q.push(Ue.split(.5)),q.push(Ue),Array.prototype.push.apply(q,We.reverse())}}catch($e){je=!0,ke=$e}finally{try{pe||Fe.return==null||Fe.return()}finally{if(je)throw ke}}return q})(A,z,(N.x1-E)/x,(N.y1-_)/O,(N.x2-E)/x,(N.y2-_)/O,X,K),ae=0;ae<ee.length;ae++){var ue=ee[ae].toQuadratic();me([ue.x,ue.x1,ue.cx],[ue.y,ue.y1,ue.cy],ue)}break;default:throw new Error("unknown command type: ".concat(N.type))}A=X,z=K}}}catch(Ne){oe=!0,L=Ne}finally{try{Y||R.return==null||R.return()}finally{if(oe)throw L}}for(var Q=P.length,le=this.strokeImageInfos.findImage(Q),fe=le.index,ve=0;ve<Q;++ve){var he=P[ve];s(le,_e(he.x),_e(he.y),_e(he.cx),_e(he.cy))}(v=this.glyphInfos[d.index]={glyph:d,uGlyphRect:[S.x1,-S.y1,S.x2,-S.y2],strokeImageInfo:le,strokes:P,colInfo:Ge(F,this.colDimImageInfos,this.colCellImageInfos),rowInfo:Ge(M,this.rowDimImageInfos,this.rowCellImageInfos)}).uGridOffset=[v.colInfo.dimOffset,v.rowInfo.dimOffset]}return v;function me(Ne,Be,He){var Ve=P.length;function ge(q,te,pe){for(var je=q.length;0<je--;){var ke=q[je];ke<te&&(te=ke),pe<ke&&(pe=ke)}return{min:te,max:pe}}P.push(He);for(var He=ge(Ne,1,0),Ne=Math.max(Math.floor(9*He.min-.5),0),Ce=Math.min(Math.ceil(9*He.max+.5),9),xe=Ne;xe<Ce;++xe)F[xe].push(Ve);for(var He=ge(Be,1,0),Ne=Math.max(Math.floor(9*He.min-.5),0),Z=Math.min(Math.ceil(9*He.max+.5),9),$=Ne;$<Z;++$)M[$].push(Ve)}function _e(Ne){return(Ne=(He=255)*Ne)<(Be=0)?Be:He<Ne?He:Ne;var Be,He}function Ae(Ne,Be,He,Ve){me([Ne,He],[Be,Ve],{x:Ne,y:Be,cx:(Ne+He)/2,cy:(Be+Ve)/2})}function Se(Ne,Be,He,Ve){return Math.abs(He-Ne)<1e-5&&Math.abs(Ve-Be)<1e-5}function Ge(Ne,Be,He){for(var Ve=Ne.length,ge=Be.findImage(Ve),Be=ge.index,Ce=0,xe=0;xe<Ve;++xe)Ce+=Ne[xe].length;for(var Z=He.findImage(Ce),$=0;$<Ve;++$){var q=Ne[$],te=q.length,pe=Z.index;s(ge,pe>>7,127&pe,te>>7,127&te);for(var je=0;je<te;++je){var ke=q[je]+fe;s(Z,ke>>7,127&ke,0,0)}}return{cellImageInfo:Z,dimOffset:Be,dimImageInfo:ge}}}}]),c})();f.default.RendererGL.prototype._renderText=function(c,d,v,S,E){if(this._textFont&&typeof this._textFont!="string"){if(!(E<=S)&&this._doFill){if(this._isOpenType()){c.push();var E=this._doStroke,_=this.drawMode,x=(this._doStroke=!1,this.drawMode=g.TEXTURE,this._textFont.font),O=(O=this._textFont._fontInfo)||(this._textFont._fontInfo=new l(x)),v=this._textFont._handleAlignment(this,d,v,S),S=this._textSize/x.unitsPerEm,T=(this.translate(v.x,v.y,0),this.scale(S,S,1),this.GL),v=!this._defaultFontShader,P=this._getFontShader(),M=(P.init(),P.bindShader(),v&&(P.setUniform("uGridImageSize",[64,64]),P.setUniform("uCellsImageSize",[64,64]),P.setUniform("uStrokeImageSize",[64,64]),P.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor),this.retainedMode.geometry.glyph),F=(M||((S=this._textGeom=new f.default.Geometry(1,1,function(){for(var ae=0;ae<=1;ae++)for(var ue=0;ue<=1;ue++)this.vertices.push(new f.default.Vector(ue,ae,0)),this.uvs.push(ue,ae)})).computeFaces().computeNormals(),M=this.createBuffers("glyph",S)),!0),v=!1,S=void 0;try{for(var D,A=this.retainedMode.buffers.text[Symbol.iterator]();!(F=(D=A.next()).done);F=!0)D.value._prepareBuffer(M,P)}catch(ae){v=!0,S=ae}finally{try{F||A.return==null||A.return()}finally{if(v)throw S}}this._bindBuffer(M.indexBuffer,T.ELEMENT_ARRAY_BUFFER),P.setUniform("uMaterialColor",this.curFillColor),T.pixelStorei(T.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);try{var z=0,G=null,U=x.stringToGlyphs(d),H=!0,Y=!1,oe=void 0;try{for(var L,j=U[Symbol.iterator]();!(H=(L=j.next()).done);H=!0){var R,N,X=L.value,K=(G&&(z+=x.getKerningValue(G,X)),O.getGlyphInfo(X));K.uGlyphRect&&(R=K.rowInfo,N=K.colInfo,P.setUniform("uSamplerStrokes",K.strokeImageInfo.imageData),P.setUniform("uSamplerRowStrokes",R.cellImageInfo.imageData),P.setUniform("uSamplerRows",R.dimImageInfo.imageData),P.setUniform("uSamplerColStrokes",N.cellImageInfo.imageData),P.setUniform("uSamplerCols",N.dimImageInfo.imageData),P.setUniform("uGridOffset",K.uGridOffset),P.setUniform("uGlyphRect",K.uGlyphRect),P.setUniform("uGlyphOffset",z),P.bindTextures(),T.drawElements(T.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)),z+=X.advanceWidth,G=X}}catch(ae){Y=!0,oe=ae}finally{try{H||j.return==null||j.return()}finally{if(Y)throw oe}}}finally{P.unbindShader(),this._doStroke=E,this.drawMode=_,T.pixelStorei(T.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),c.pop()}}else console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported");return c}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":272,"../core/main":283,"./p5.RendererGL.Retained":340,"./p5.Shader":342,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}]},{},[267])(267)})});export default Pn();

Youez - 2016 - github.com/yon3zu
LinuXploit