You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
384 KiB
JavaScript

/*! p5.js v0.6.0 January 19, 2018 */ !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.p5=a()}}(function(){var a;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===f||b===k?62:b===g||b===l?63:b<h?-1:b<h+10?b-h+26+26:b<j+26?b-j:b<i+26?b-i+26:void 0}function c(a){function c(a){j[l++]=a}var d,f,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new e(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,f=0;d<g;d+=4,f+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function d(a){function b(a){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var d,e,f,g=a.length%3,h="";for(d=0,f=a.length-g;d<f;d+=3)e=(a[d]<<16)+(a[d+1]<<8)+a[d+2],h+=c(e);switch(g){case 1:e=a[a.length-1],h+=b(e>>2),h+=b(e<<4&63),h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=b(e>>10),h+=b(e>>4&63),h+=b(e<<2&63),h+="="}return h}var e="undefined"!=typeof Uint8Array?Uint8Array:Array,f="+".charCodeAt(0),g="/".charCodeAt(0),h="0".charCodeAt(0),i="a".charCodeAt(0),j="A".charCodeAt(0),k="-".charCodeAt(0),l="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=d}(void 0===c?this.base64js={}:c)},{}],2:[function(a,b,c){},{}],3:[function(a,b,c){(function(b){"use strict";function d(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(a){return!1}}function e(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a){return this instanceof f?(f.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof a?g(this,a):"string"==typeof a?h(this,a,arguments.length>1?arguments[1]:"utf8"):i(this,a)):arguments.length>1?new f(a,arguments[1]):new f(a)}function g(a,b){if(a=p(a,b<0?0:0|q(b)),!f.TYPED_ARRAY_SUPPORT)for(var c=0;c<b;c++)a[c]=0;return a}function h(a,b,c){return"string"==typeof c&&""!==c||(c="utf8"),a=p(a,0|s(b,c)),a.write(b,c),a}function i(a,b){if(f.isBuffer(b))return j(a,b);if(Y(b))return k(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(b.buffer instanceof ArrayBuffer)return l(a,b);if(b instanceof ArrayBuffer)return m(a,b)}return b.length?n(a,b):o(a,b)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function m(a,b){return f.TYPED_ARRAY_SUPPORT?(b.byteLength,a=f._augment(new Uint8Array(b))):a=l(a,new Uint8Array(b)),a}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;e<d;e+=1)a[e]=255&c[e];return a}function p(a,b){return f.TYPED_ARRAY_SUPPORT?(a=f._augment(new Uint8Array(b)),a.__proto__=f.prototype):(a.length=b,a._isBuffer=!0),0!==b&&b<=f.poolSize>>>1&&(a.parent=Z),a}fu
this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function d(a,b){this.source=a,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=b,this.destLen=0,this.ltree=new c,this.dtree=new c}function f(a,b,c,d){var e,f;for(e=0;e<c;++e)a[e]=0;for(e=0;e<30-c;++e)a[e+c]=e/c|0;for(f=d,e=0;e<30;++e)b[e]=f,f+=1<<a[e]}function g(a,b){var c;for(c=0;c<7;++c)a.table[c]=0;for(a.table[7]=24,a.table[8]=152,a.table[9]=112,c=0;c<24;++c)a.trans[c]=256+c;for(c=0;c<144;++c)a.trans[24+c]=c;for(c=0;c<8;++c)a.trans[168+c]=280+c;for(c=0;c<112;++c)a.trans[176+c]=144+c;for(c=0;c<5;++c)b.table[c]=0;for(b.table[5]=32,c=0;c<32;++c)b.trans[c]=c}function h(a,b,c,d){var e,f;for(e=0;e<16;++e)a.table[e]=0;for(e=0;e<d;++e)a.table[b[c+e]]++;for(a.table[0]=0,f=0,e=0;e<16;++e)xe[e]=f,f+=a.table[e];for(e=0;e<d;++e)b[c+e]&&(a.trans[xe[b[c+e]]++]=e)}function i(a){a.bitcount--||(a.tag=a.source[a.sourceIndex++],a.bitcount=7);var b=1&a.tag;return a.tag>>>=1,b}function j(a,b,c){if(!b)return c;for(;a.bitcount<24;)a.tag|=a.source[a.sourceIndex++]<<a.bitcount,a.bitcount+=8;var d=a.tag&65535>>>16-b;return a.tag>>>=b,a.bitcount-=b,d+c}function k(a,b){for(;a.bitcount<24;)a.tag|=a.source[a.sourceIndex++]<<a.bitcount,a.bitcount+=8;var c=0,d=0,e=0,f=a.tag;do{d=2*d+(1&f),f>>>=1,++e,c+=b.table[e],d-=b.table[e]}while(d>=0);return a.tag=f,a.bitcount-=e,b.trans[c+d]}function l(a,b,c){var d,e,f,g,i,l;for(d=j(a,5,257),e=j(a,5,1),f=j(a,4,4),g=0;g<19;++g)we[g]=0;for(g=0;g<f;++g){var m=j(a,3,0);we[ue[g]]=m}for(h(ve,we,0,19),i=0;i<d+e;){var n=k(a,ve);switch(n){case 16:var o=we[i-1];for(l=j(a,2,3);l;--l)we[i++]=o;break;case 17:for(l=j(a,3,3);l;--l)we[i++]=0;break;case 18:for(l=j(a,7,11);l;--l)we[i++]=0;break;default:we[i++]=n}}h(b,we,0,d),h(c,we,d,e)}function m(a,b,c){for(;;){var d=k(a,b);if(256===d)return me;if(d<256)a.dest[a.destLen++]=d;else{var e,f,g,h;for(d-=257,e=j(a,qe[d],re[d]),f=k(a,c),g=a.destLen-j(a,se[f],te[f]),h=g;h<g+e;++h)a.dest[a.destLen++]=a.dest[h]}}}function n(a){for(var b,c,d;a.bitcount>8;)a.sourceIndex--,a.bitcount-=8;if(b=a.source[a.sourceIndex+1],b=256*b+a.source[a.sourceIndex],c=a.source[a.sourceIndex+3],c=256*c+a.source[a.sourceIndex+2],b!==(65535&~c))return ne;for(a.sourceIndex+=4,d=b;d;--d)a.dest[a.destLen++]=a.source[a.sourceIndex++];return a.bitcount=0,me}function o(a,b){var c,e,f=new d(a,b);do{switch(c=i(f),j(f,2,0)){case 0:e=n(f);break;case 1:e=m(f,oe,pe);break;case 2:l(f,f.ltree,f.dtree),e=m(f,f.ltree,f.dtree);break;default:e=ne}if(e!==me)throw new Error("Data error")}while(!c);return f.destLen<f.dest.length?"function"==typeof f.dest.slice?f.dest.slice(0,f.destLen):f.dest.subarray(0,f.destLen):f.dest}function p(a,b,c,d,e){return Math.pow(1-e,3)*a+3*Math.pow(1-e,2)*e*b+3*(1-e)*Math.pow(e,2)*c+Math.pow(e,3)*d}function q(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function r(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function s(a){throw new Error(a)}function t(a,b){a||s(b)}function u(a){return function(){return a}}function v(a){return a>=-128&&a<=127}function w(a,b,c){for(var d=0,e=a.length;b<e&&d<64&&0===a[b];)++b,++d;return c.push(128|d-1),b}function x(a,b,c){for(var d=0,e=a.length,f=b;f<e&&d<64;){var g=a[f];if(!v(g))break;if(0===g&&f+1<e&&0===a[f+1])break;++f,++d}c.push(d-1);for(var h=b;h<f;++h)c.push(a[h]+256&255);return f}function y(a,b,c){for(var d=0,e=a.length,f=b;f<e&&d<64;){var g=a[f];if(0===g)break;if(v(g)&&f+1<e&&v(a[f+1]))break;++f,++d}c.push(64|d-1);for(var h=b;h<f;++h){var i=a[h];c.push(i+65536>>8&255,i+256&255)}return f}function z(a,b,c){for(var d=this,e=0;e<b.length;e+=1){var f=b[e];d[f.name]=f.value}if(this.tableName=a,this.fields=b,c)for(var g=Object.keys(c),h=0;h<g.length;h+=1){var i=g[h],j=c[i];void 0!==d[i]&&(d[i]=j)}}function A(a,b,c){void 0===c&&(c=b.length);var d=new Array(b.length+1);d[0]={name:a+"Count",type:"USHORT",value:c};for(var e=0;e<b.length;e++)d[e+1]={name:a+e,type:"USHORT",value:b[e]};return d}function B(a,b,c){var d=b.length,e=new Array(d+1);e[0]={name:a+"Count",type:"USHORT",value:d};for(var f=0;f<d;f++)e[f+1]={name:a+f,type:"TABLE",value:c(b[f]
j.leftSideBearing=g}}function Za(a){for(var b=new Ke.Table("hmtx",[]),c=0;c<a.length;c+=1){var d=a.get(c),e=d.advanceWidth||0,f=d.leftSideBearing||0;b.fields.push({name:"advanceWidth_"+c,type:"USHORT",value:e}),b.fields.push({name:"leftSideBearing_"+c,type:"SHORT",value:f})}return b}function $a(a){for(var b=new Ke.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:a.length}]),c="",d=12+4*a.length,e=0;e<a.length;++e){var f=c.indexOf(a[e]);f<0&&(f=c.length,c+=a[e]),b.fields.push({name:"offset "+e,type:"USHORT",value:d+f}),b.fields.push({name:"length "+e,type:"USHORT",value:a[e].length})}return b.fields.push({name:"stringPool",type:"CHARARRAY",value:c}),b}function _a(a,b){var c=new Ne.Parser(a,b),d=c.parseULong();ze.argument(1===d,"Unsupported ltag table version."),c.skip("uLong",1);for(var e=c.parseULong(),f=[],g=0;g<e;g++){for(var h="",i=b+c.parseUShort(),j=c.parseUShort(),k=i;k<i+j;++k)h+=String.fromCharCode(a.getInt8(k));f.push(h)}return f}function ab(a,b){var c={},d=new Ne.Parser(a,b);return c.version=d.parseVersion(),c.numGlyphs=d.parseUShort(),1===c.version&&(c.maxPoints=d.parseUShort(),c.maxContours=d.parseUShort(),c.maxCompositePoints=d.parseUShort(),c.maxCompositeContours=d.parseUShort(),c.maxZones=d.parseUShort(),c.maxTwilightPoints=d.parseUShort(),c.maxStorage=d.parseUShort(),c.maxFunctionDefs=d.parseUShort(),c.maxInstructionDefs=d.parseUShort(),c.maxStackElements=d.parseUShort(),c.maxSizeOfInstructions=d.parseUShort(),c.maxComponentElements=d.parseUShort(),c.maxComponentDepth=d.parseUShort()),c}function bb(a){return new Ke.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:a}])}function cb(a,b,c){switch(a){case 0:if(65535===b)return"und";if(c)return c[b];break;case 1:return df[b];case 3:return ff[b]}}function db(a,b,c){switch(a){case 0:return gf;case 1:return jf[c]||hf[b];case 3:if(1===b||10===b)return gf}}function eb(a,b,c){for(var d={},e=new Ne.Parser(a,b),f=e.parseUShort(),g=e.parseUShort(),h=e.offset+e.parseUShort(),i=0;i<g;i++){var j=e.parseUShort(),k=e.parseUShort(),l=e.parseUShort(),m=e.parseUShort(),n=cf[m]||m,o=e.parseUShort(),p=e.parseUShort(),q=cb(j,l,c),r=db(j,k,l);if(void 0!==r&&void 0!==q){var s=void 0;if(s=r===gf?Ce.UTF16(a,h+p,o):Ce.MACSTRING(a,h+p,o,r)){var t=d[n];void 0===t&&(t=d[n]={}),t[q]=s}}}return 1===f&&e.parseUShort(),d}function fb(a){var b={};for(var c in a)b[a[c]]=parseInt(c);return b}function gb(a,b,c,d,e,f){return new Ke.Record("NameRecord",[{name:"platformID",type:"USHORT",value:a},{name:"encodingID",type:"USHORT",value:b},{name:"languageID",type:"USHORT",value:c},{name:"nameID",type:"USHORT",value:d},{name:"length",type:"USHORT",value:e},{name:"offset",type:"USHORT",value:f}])}function hb(a,b){var c=a.length,d=b.length-c+1;a:for(var e=0;e<d;e++)for(;e<d;e++){for(var f=0;f<c;f++)if(b[e+f]!==a[f])continue a;return e}return-1}function ib(a,b){var c=hb(a,b);if(c<0){c=b.length;for(var d=0,e=a.length;d<e;++d)b.push(a[d])}return c}function jb(a,b){var c,d=[],e={},f=fb(cf);for(var g in a){var h=f[g];if(void 0===h&&(h=g),c=parseInt(h),isNaN(c))throw new Error('Name table entry "'+g+'" does not exist, see nameTableNames for complete list.');e[c]=a[g],d.push(c)}for(var i=fb(df),j=fb(ff),k=[],l=[],m=0;m<d.length;m++){c=d[m];var n=e[c];for(var o in n){var p=n[o],q=1,r=i[o],s=ef[r],t=db(q,s,r),u=De.MACSTRING(p,t);void 0===u&&(q=0,r=b.indexOf(o),r<0&&(r=b.length,b.push(o)),s=4,u=De.UTF16(p));var v=ib(u,l);k.push(gb(q,s,r,c,u.length,v));var w=j[o];if(void 0!==w){var x=De.UTF16(p),y=ib(x,l);k.push(gb(3,1,w,c,x.length,y))}}}k.sort(function(a,b){return a.platformID-b.platformID||a.encodingID-b.encodingID||a.languageID-b.languageID||a.nameID-b.nameID});for(var z=new Ke.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:k.length},{name:"stringOffset",type:"USHORT",value:6+12*k.length}]),A=0;A<k.length;A++)z.fields.push({name:"record_"+A,type:"RECORD",value:k[A]});return z.fields.push({name:"strings",type:"LITERAL",value:l}),z}function kb(a){for(var b=0;
Jb(a.descender,"When creating a new Font object, descender is required."),Jb(a.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:a.familyName||" "},fontSubfamily:{en:a.styleName||" "},fullName:{en:a.fullName||a.familyName+" "+a.styleName},postScriptName:{en:a.postScriptName||a.familyName+a.styleName},designer:{en:a.designer||" "},designerURL:{en:a.designerURL||" "},manufacturer:{en:a.manufacturer||" "},manufacturerURL:{en:a.manufacturerURL||" "},license:{en:a.license||" "},licenseURL:{en:a.licenseURL||" "},version:{en:a.version||"Version 0.1"},description:{en:a.description||" "},copyright:{en:a.copyright||" "},trademark:{en:a.trademark||" "}},this.unitsPerEm=a.unitsPerEm||1e3,this.ascender=a.ascender,this.descender=a.descender,this.createdTimestamp=a.createdTimestamp,this.tables={os2:{usWeightClass:a.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:a.widthClass||this.usWidthClasses.MEDIUM,fsSelection:a.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Ve.GlyphSet(this,a.glyphs||[]),this.encoding=new X(this),this.substitution=new Db(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Kb(this):void 0}})}function Pd(a,b){var c=JSON.stringify(a),d=256;for(var e in b){var f=parseInt(e);if(f&&!(f<256)){if(JSON.stringify(b[e])===c)return f;d<=f&&(d=f+1)}}return b[d]=a,d}function Qd(a,b,c){var d=Pd(b.name,c);return[{name:"tag_"+a,type:"TAG",value:b.tag},{name:"minValue_"+a,type:"FIXED",value:b.minValue<<16},{name:"defaultValue_"+a,type:"FIXED",value:b.defaultValue<<16},{name:"maxValue_"+a,type:"FIXED",value:b.maxValue<<16},{name:"flags_"+a,type:"USHORT",value:0},{name:"nameID_"+a,type:"USHORT",value:d}]}function Rd(a,b,c){var d={},e=new Ne.Parser(a,b);return d.tag=e.parseTag(),d.minValue=e.parseFixed(),d.defaultValue=e.parseFixed(),d.maxValue=e.parseFixed(),e.skip("uShort",1),d.name=c[e.parseUShort()]||{},d}function Sd(a,b,c,d){for(var e=Pd(b.name,d),f=[{name:"nameID_"+a,type:"USHORT",value:e},{name:"flags_"+a,type:"USHORT",value:0}],g=0;g<c.length;++g){var h=c[g].tag;f.push({name:"axis_"+a+" "+h,type:"FIXED",value:b.coordinates[h]<<16})}return f}function Td(a,b,c,d){var e={},f=new Ne.Parser(a,b);e.name=d[f.parseUShort()]||{},f.skip("uShort",1),e.coordinates={};for(var g=0;g<c.length;++g)e.coordinates[c[g].tag]=f.parseFixed();return e}function Ud(a,b){var c=new Ke.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:a.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:a.instances.length},{name:"instanceSize",type:"USHORT",value:4+4*a.axes.length}]);c.offsetToData=c.sizeOf();for(var d=0;d<a.axes.length;d++)c.fields=c.fields.concat(Qd(d,a.axes[d],b));for(var e=0;e<a.instances.length;e++)c.fields=c.fields.concat(Sd(e,a.instances[e],a.axes,b));return c}function Vd(a,b,c){var d=new Ne.Parser(a,b),e=d.parseULong();ze.argument(65536===e,"Unsupported fvar table version.");var f=d.parseOffset16();d.skip("uShort",1);for(var g=d.parseUShort(),h=d.parseUShort(),i=d.parseUShort(),j=d.parseUShort(),k=[],l=0;l<g;l++)k.push(Rd(a,b+f+l*h,c));for(var m=[],n=b+f+g*h,o=0;o<i;o++)m.push(Td(a,n+o*j,k,c));return{axes:k,instances:m}}function Wd(a,b){for(var c=new Ne.Parser(a,b),d=c.parseUShort(),e=[],f=0;f<d;f++)e[c.parseTag()]={offset:c.parseUShort()};return e}function Xd(a,b){var c=new Ne.Parser(a,b),d=c.parseUShort(),e=c.parseUShort();if(1===d)return c.parseUShortList(e);if(2===d){for(var f=[];e--;)for(var g=c.parseUShort(),h=c.parseUShort(),i=c.parseUShort(),j=g;j<=h;j++)f[i++]=j;return f}}function Yd(a,b){var c=new Ne.Parser(a,b),d=c.parseUShort();if(1===d){var e=c.parseUShort(),f=c.parseUShort(),g=c.parseUShortList(f);return function(a){return g[a-e]||0}}if(2===d){for(var h=c.parseUShort(),i=[],j=[],k=[],l=0;l<h;l++)i[l]=c.parseUShort(),j[l]=c.parseUShort(),k[l]=c.parseUShort();return
},Pe=[".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","Thornsmal
lookups:[]}},Db.prototype.getSingle=function(a,b,c){for(var d=this,e=[],f=this.getLookupTables(b,c,a,1),g=0;g<f.length;g++)for(var h=f[g].subtables,i=0;i<h.length;i++){var j=h[i],k=d.expandCoverage(j.coverage),l=void 0;if(1===j.substFormat){var m=j.deltaGlyphId;for(l=0;l<k.length;l++){var n=k[l];e.push({sub:n,by:n+m})}}else{var o=j.substitute;for(l=0;l<k.length;l++)e.push({sub:k[l],by:o[l]})}}return e},Db.prototype.getAlternates=function(a,b,c){for(var d=this,e=[],f=this.getLookupTables(b,c,a,3),g=0;g<f.length;g++)for(var h=f[g].subtables,i=0;i<h.length;i++)for(var j=h[i],k=d.expandCoverage(j.coverage),l=j.alternateSets,m=0;m<k.length;m++)e.push({sub:k[m],by:l[m]});return e},Db.prototype.getLigatures=function(a,b,c){for(var d=this,e=[],f=this.getLookupTables(b,c,a,4),g=0;g<f.length;g++)for(var h=f[g].subtables,i=0;i<h.length;i++)for(var j=h[i],k=d.expandCoverage(j.coverage),l=j.ligatureSets,m=0;m<k.length;m++)for(var n=k[m],o=l[m],p=0;p<o.length;p++){var q=o[p];e.push({sub:[n].concat(q.components),by:q.ligGlyph})}return e},Db.prototype.addSingle=function(a,b,c,d){var e=this.getLookupTables(c,d,a,1,!0)[0],f=Fb(e,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});ze.assert(1===f.coverage.format,"Ligature: unable to modify coverage table format "+f.coverage.format);var g=b.sub,h=this.binSearch(f.coverage.glyphs,g);h<0&&(h=-1-h,f.coverage.glyphs.splice(h,0,g),f.substitute.splice(h,0,0)),f.substitute[h]=b.by},Db.prototype.addAlternate=function(a,b,c,d){var e=this.getLookupTables(c,d,a,3,!0)[0],f=Fb(e,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});ze.assert(1===f.coverage.format,"Ligature: unable to modify coverage table format "+f.coverage.format);var g=b.sub,h=this.binSearch(f.coverage.glyphs,g);h<0&&(h=-1-h,f.coverage.glyphs.splice(h,0,g),f.alternateSets.splice(h,0,0)),f.alternateSets[h]=b.by},Db.prototype.addLigature=function(a,b,c,d){var e=this.getLookupTables(c,d,a,4,!0)[0],f=e.subtables[0];f||(f={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},e.subtables[0]=f),ze.assert(1===f.coverage.format,"Ligature: unable to modify coverage table format "+f.coverage.format);var g=b.sub[0],h=b.sub.slice(1),i={ligGlyph:b.by,components:h},j=this.binSearch(f.coverage.glyphs,g);if(j>=0){for(var k=f.ligatureSets[j],l=0;l<k.length;l++)if(Eb(k[l].components,h))return;k.push(i)}else j=-1-j,f.coverage.glyphs.splice(j,0,g),f.ligatureSets.splice(j,0,[i])},Db.prototype.getFeature=function(a,b,c){if(/ss\d\d/.test(a))return this.getSingle(a,b,c);switch(a){case"aalt":case"salt":return this.getSingle(a,b,c).concat(this.getAlternates(a,b,c));case"dlig":case"liga":case"rlig":return this.getLigatures(a,b,c)}},Db.prototype.add=function(a,b,c,d){if(/ss\d\d/.test(a))return this.addSingle(a,b,c,d);switch(a){case"aalt":case"salt":return"number"==typeof b.by?this.addSingle(a,b,c,d):this.addAlternate(a,b,c,d);case"dlig":case"liga":case"rlig":return this.addLigature(a,b,c,d)}};var uf,vf,wf,xf,yf=function(a){var b=this.srPeriod,c=this.srPhase,d=this.srThreshold,e=1;return a<0&&(a=-a,e=-1),a+=d-c,a=Math.trunc(a/b)*b,a+=c,e>0&&a<0?c:e<0&&a>0?-c:a*e},zf={x:1,y:0,axis:"x",distance:function(a,b,c,d){return(c?a.xo:a.x)-(d?b.xo:b.x)},interpolate:function(a,b,c,d){var e,f,g,h,i,j,k;return d&&d!==this?(e=d.distance(a,b,!0,!0),f=d.distance(a,c,!0,!0),i=d.distance(b,b,!1,!0),j=d.distance(c,c,!1,!0),g=Math.abs(e),h=Math.abs(f),0===(k=g+h)?void zf.setRelative(a,a,(i+j)/2,d,!0):void zf.setRelative(a,a,(i*h+j*g)/k,d,!0)):(e=a.xo-b.xo,f=a.xo-c.xo,i=b.x-b.xo,j=c.x-c.xo,g=Math.abs(e),h=Math.abs(f),0===(k=g+h)?void(a.x=a.xo+(i+j)/2):void(a.x=a.xo+(i*h+j*g)/k))},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(a,b,c,d,e){if(!d||d===this)return void(a.x=(e?b.xo:b.x)+c);var f=e?b.xo:b.x,g=e?b.yo:b.y,h=f+c*d.x,i=g+c*d.y;a.x=h+(a.y-i)/d.normalSlope},slope:0,touch:function(a){a.xTouched=!0},touched:function(a){return a.xTouched},untouch:function(a){a.xTouched=!1}},Af={x:0,y:1,axis:"y",distance:function(a,b,c,d){return(c?a.yo:a.y)-(d?b.yo:b.y)},interpolate:function(a,b,c,d){var e,f,g,h,i,j,k;return d&&d!==this?(e=d.distance(a,b,!0,!
d.Color.prototype.toString=function(){var a=this.levels,b=this._array[3];return"rgba("+a[0]+","+a[1]+","+a[2]+","+b+")"},d.Color.prototype.setRed=function(a){this._array[0]=a/this.maxes[e.RGB][0],this._calculateLevels()},d.Color.prototype.setGreen=function(a){this._array[1]=a/this.maxes[e.RGB][1],this._calculateLevels()},d.Color.prototype.setBlue=function(a){this._array[2]=a/this.maxes[e.RGB][2],this._calculateLevels()},d.Color.prototype.setAlpha=function(a){this._array[3]=a/this.maxes[this.mode][3],this._calculateLevels()},d.Color.prototype._calculateLevels=function(){this.levels=this._array.map(function(a){return Math.round(255*a)})},d.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},d.Color.prototype._storeModeAndMaxes=function(a,b){this.mode=a,this.maxes=b},d.Color.prototype._getMode=function(){return this.mode},d.Color.prototype._getMaxes=function(){return this.maxes},d.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[e.RGB][2]},d.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[e.HSB][2]},d.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[e.RGB][1]},d.Color.prototype._getHue=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[e.HSB][0]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[e.HSL][0])},d.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[e.HSL][2]},d.Color.prototype._getRed=function(){return this._array[0]*this.maxes[e.RGB][0]},d.Color.prototype._getSaturation=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[e.HSB][1]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[e.HSL][1])};var g={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:"#f
d.Graphics.prototype=Object.create(d.Element.prototype),d.Graphics.prototype.remove=function(){this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt);for(var a in this._events)this.elt.removeEventListener(a,this._events[a])},b.exports=d.Graphics},{"./constants":20,"./core":21}],28:[function(a,b,c){"use strict";function d(a){var b=0,c=0;if(a.offsetParent)do{b+=a.offsetLeft,c+=a.offsetTop}while(a=a.offsetParent);else b+=a.offsetLeft,c+=a.offsetTop;return[b,c]}var e=a("./core"),f=a("../core/constants");e.Renderer=function(a,b,c){e.Element.call(this,a,b),this.name="p5.Renderer",this.canvas=a,this._pInst=b,c?(this._isMainCanvas=!0,this._pInst._setProperty("_curElement",this),this._pInst._setProperty("canvas",this.canvas),this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)):(this.canvas.style.display="none",this._styles=[]),this._textSize=12,this._textLeading=15,this._textFont="sans-serif",this._textStyle=f.NORMAL,this._textAscent=null,this._textDescent=null,this._rectMode=f.CORNER,this._ellipseMode=f.CENTER,this._curveTightness=0,this._imageMode=f.CORNER,this._tint=null,this._doStroke=!0,this._doFill=!0,this._strokeSet=!1,this._fillSet=!1},e.Renderer.prototype=Object.create(e.Element.prototype),e.Renderer.prototype.resize=function(a,b){this.width=a,this.height=b,this.elt.width=a*this._pInst._pixelDensity,this.elt.height=b*this._pInst._pixelDensity,this.elt.style.width=a+"px",this.elt.style.height=b+"px",this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))},e.Renderer.prototype.textLeading=function(a){return"number"==typeof a?(this._setProperty("_textLeading",a),this):this._textLeading},e.Renderer.prototype.textSize=function(a){return"number"==typeof a?(this._setProperty("_textSize",a),this._setProperty("_textLeading",a*f._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},e.Renderer.prototype.textStyle=function(a){return a?(a!==f.NORMAL&&a!==f.ITALIC&&a!==f.BOLD||this._setProperty("_textStyle",a),this._applyTextProperties()):this._textStyle},e.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},e.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},e.Renderer.prototype._applyDefaults=function(){return this},e.Renderer.prototype._isOpenType=function(a){return"object"==typeof(a=a||this._textFont)&&a.font&&a.font.supported},e.Renderer.prototype._updateTextMetrics=function(){if(this._isOpenType())return this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent()),this;var a=document.createElement("span");a.style.fontFamily=this._textFont,a.style.fontSize=this._textSize+"px",a.innerHTML="ABCjgq|";var b=document.createElement("div");b.style.display="inline-block",b.style.width="1px",b.style.height="0px";var c=document.createElement("div");c.appendChild(a),c.appendChild(b),c.style.height="0px",c.style.overflow="hidden",document.body.appendChild(c),b.style.verticalAlign="baseline";var e=d(b),f=d(a),g=e[1]-f[1];b.style.verticalAlign="bottom",e=d(b),f=d(a);var h=e[1]-f[1],i=h-g;return document.body.removeChild(c),this._setProperty("_textAscent",g),this._setProperty("_textDescent",i),this},b.exports=e.Renderer},{"../core/constants":20,"./core":21}],29:[function(a,b,c){"use strict";var d=a("./core"),e=a("./canvas"),f=a("./constants"),g=a("../image/filters");a("./p5.Renderer");var h="rgba(0,0,0,0)";d.Renderer2D=function(a,b,c){return d.Renderer.call(this,a,b,c),this.name="p5.Renderer2D",this.drawingContext=this.canvas.getContext("2d"),this._pInst._setProperty("drawingContext",this.drawingContext),this},d.Renderer2D.prototype=Object.create(d.Renderer.prototype),d.Renderer2D.prototype._applyDefaults=function(){this._cachedFillStyle=this._cachedStrokeStyle=void 0,this._setFill(f._DEFAULT_FILL),this._setStroke(f._DEFAULT_STROKE),this.drawingContext.lineCap=f.ROUND,this.drawingContext.font="normal 12px sans-serif"},d.Renderer2D.pr
d.TypedDict.prototype.size=function(){return Object.keys(this.data).length},d.TypedDict.prototype.hasKey=function(a){return this.data.hasOwnProperty(a)},d.TypedDict.prototype.get=function(a){if(this.data.hasOwnProperty(a))return this.data[a];console.log(a+" does not exist in this Dictionary")},d.TypedDict.prototype.set=function(a,b){this._validate(b)?this.data[a]=b:console.log("Those values dont work for this dictionary type.")},d.TypedDict.prototype._addObj=function(a){for(var b in a)this.set(b,a[b])},d.TypedDict.prototype.create=function(a,b){a instanceof Object&&void 0===b?this._addObj(a):void 0!==a?this.set(a,b):console.log("In order to create a new Dictionary entry you must pass an object or a key, value pair")},d.TypedDict.prototype.clear=function(){this.data={}},d.TypedDict.prototype.remove=function(a){if(!this.data.hasOwnProperty(a))throw a+" does not exist in this Dictionary";delete this.data[a]},d.TypedDict.prototype.print=function(){for(var a in this.data)console.log("key:"+a+" value:"+this.data[a])},d.TypedDict.prototype.saveTable=function(a){var b="";for(var c in this.data)b+=c+","+this.data[c]+"\n";var e=new Blob([b],{type:"text/csv"});d.prototype.downloadFile(e,a||"mycsv","csv")},d.TypedDict.prototype.saveJSON=function(a,b){d.prototype.saveJSON(this.data,a,b)},d.TypedDict.prototype._validate=function(a){return!0},d.StringDict=function(){d.TypedDict.apply(this,arguments)},d.StringDict.prototype=Object.create(d.TypedDict.prototype),d.StringDict.prototype._validate=function(a){return"string"==typeof a},d.NumberDict=function(){d.TypedDict.apply(this,arguments)},d.NumberDict.prototype=Object.create(d.TypedDict.prototype),d.NumberDict.prototype._validate=function(a){return"number"==typeof a},d.NumberDict.prototype.add=function(a,b){this.data.hasOwnProperty(a)?this.data[a]+=b:console.log("The key - "+a+" does not exist in this dictionary.")},d.NumberDict.prototype.sub=function(a,b){this.add(a,-b)},d.NumberDict.prototype.mult=function(a,b){this.data.hasOwnProperty(a)?this.data[a]*=b:console.log("The key - "+a+" does not exist in this dictionary.")},d.NumberDict.prototype.div=function(a,b){this.data.hasOwnProperty(a)?this.data[a]/=b:console.log("The key - "+a+" does not exist in this dictionary.")},d.NumberDict.prototype._valueTest=function(a){if(0===Object.keys(this.data).length)throw"Unable to search for a minimum or maximum value on an empty NumberDict";if(1===Object.keys(this.data).length)return this.data[Object.keys(this.data)[0]];var b=this.data[Object.keys(this.data)[0]];for(var c in this.data)this.data[c]*a<b*a&&(b=this.data[c]);return b},d.NumberDict.prototype.minValue=function(){return this._valueTest(1)},d.NumberDict.prototype.maxValue=function(){return this._valueTest(-1)},d.NumberDict.prototype._keyTest=function(a){if(0===Object.keys(this.data).length)throw"Unable to use minValue on an empty NumberDict";if(1===Object.keys(this.data).length)return Object.keys(this.data)[0];for(var b=Object.keys(this.data)[0],c=1;c<Object.keys(this.data).length;c++)Object.keys(this.data)[c]*a<b*a&&(b=Object.keys(this.data)[c]);return b},d.NumberDict.prototype.minKey=function(){return this._keyTest(1)},d.NumberDict.prototype.maxKey=function(){return this._keyTest(-1)},b.exports=d.TypedDict},{"../core/core":21}],36:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype.deviceOrientation=void 0,d.prototype.accelerationX=0,d.prototype.accelerationY=0,d.prototype.accelerationZ=0,d.prototype.pAccelerationX=0,d.prototype.pAccelerationY=0,d.prototype.pAccelerationZ=0,d.prototype._updatePAccelerations=function(){this._setProperty("pAccelerationX",this.accelerationX),this._setProperty("pAccelerationY",this.accelerationY),this._setProperty("pAccelerationZ",this.accelerationZ)},d.prototype.rotationX=0,d.prototype.rotationY=0,d.prototype.rotationZ=0,d.prototype.pRotationX=0,d.prototype.pRotationY=0,d.prototype.pRotationZ=0;var e,f,g,h=0,i=0,j=0,k="clockwise",l="clockwise",m="clockwise";d.prototype._updatePRotations=function(){this._setProperty("pRotationX",this.rotationX),this._setProperty("pRotationY",this.rotationY),thi
h.prototype.writeFile=function(a,b,c){var d="application/octet-stream";h.prototype._isSafari()&&(d="text/plain");var e=new Blob(a,{type:d});h.prototype.downloadFile(e,b,c)},h.prototype.downloadFile=function(b,c,d){var e=f(c,d),i=e[0];if(b instanceof Blob){return void a("file-saver").saveAs(b,i)}var j=document.createElement("a");if(j.href=b,j.download=i,j.onclick=function(a){g(a),a.stopPropagation()},j.style.display="none",document.body.appendChild(j),h.prototype._isSafari()){var k="Hello, Safari user! To download this file...\n";k+="1. Go to File --\x3e Save As.\n",k+='2. Choose "Page Source" as the Format.\n',k+='3. Name it with this extension: ."'+e[1]+'"',alert(k)}j.click()},h.prototype._checkFileExtension=f,h.prototype._isSafari=function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0},b.exports=h},{"../core/core":21,"../core/error_helpers":24,"es6-promise":4,"fetch-jsonp":5,"file-saver":6,"whatwg-fetch":11}],46:[function(a,b,c){"use strict";var d=a("../core/core");d.Table=function(a){this.columns=[],this.rows=[],this.name="p5.Table"},d.Table.prototype.addRow=function(a){var b=a||new d.TableRow;if(void 0===b.arr||void 0===b.obj)throw"invalid TableRow: "+b;return b.table=this,this.rows.push(b),b},d.Table.prototype.removeRow=function(a){this.rows[a].table=null;var b=this.rows.splice(a+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(b)},d.Table.prototype.getRow=function(a){return this.rows[a]},d.Table.prototype.getRows=function(){return this.rows},d.Table.prototype.findRow=function(a,b){if("string"==typeof b){for(var c=0;c<this.rows.length;c++)if(this.rows[c].obj[b]===a)return this.rows[c]}else for(var d=0;d<this.rows.length;d++)if(this.rows[d].arr[b]===a)return this.rows[d];return null},d.Table.prototype.findRows=function(a,b){var c=[];if("string"==typeof b)for(var d=0;d<this.rows.length;d++)this.rows[d].obj[b]===a&&c.push(this.rows[d]);else for(var e=0;e<this.rows.length;e++)this.rows[e].arr[b]===a&&c.push(this.rows[e]);return c},d.Table.prototype.matchRow=function(a,b){if("number"==typeof b){for(var c=0;c<this.rows.length;c++)if(this.rows[c].arr[b].match(a))return this.rows[c]}else for(var d=0;d<this.rows.length;d++)if(this.rows[d].obj[b].match(a))return this.rows[d];return null},d.Table.prototype.matchRows=function(a,b){var c=[];if("number"==typeof b)for(var d=0;d<this.rows.length;d++)this.rows[d].arr[b].match(a)&&c.push(this.rows[d]);else for(var e=0;e<this.rows.length;e++)this.rows[e].obj[b].match(a)&&c.push(this.rows[e]);return c},d.Table.prototype.getColumn=function(a){var b=[];if("string"==typeof a)for(var c=0;c<this.rows.length;c++)b.push(this.rows[c].obj[a]);else for(var d=0;d<this.rows.length;d++)b.push(this.rows[d].arr[a]);return b},d.Table.prototype.clearRows=function(){delete this.rows,this.rows=[]},d.Table.prototype.addColumn=function(a){var b=a||null;this.columns.push(b)},d.Table.prototype.getColumnCount=function(){return this.columns.length},d.Table.prototype.getRowCount=function(){return this.rows.length},d.Table.prototype.removeTokens=function(a,b){for(var c=function(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},d=[],e=0;e<a.length;e++)d.push(c(a.charAt(e)));var f=new RegExp(d.join("|"),"g");if(void 0===b)for(var g=0;g<this.columns.length;g++)for(var h=0;h<this.rows.length;h++){var i=this.rows[h].arr[g];i=i.replace(f,""),this.rows[h].arr[g]=i,this.rows[h].obj[this.columns[g]]=i}else if("string"==typeof b)for(var j=0;j<this.rows.length;j++){var k=this.rows[j].obj[b];k=k.replace(f,""),this.rows[j].obj[b]=k;var l=this.columns.indexOf(b);this.rows[j].arr[l]=k}else for(var m=0;m<this.rows.length;m++){var n=this.rows[m].arr[b];n=n.replace(f,""),this.rows[m].arr[b]=n,this.rows[m].obj[this.columns[b]]=n}},d.Table.prototype.trim=function(a){var b=new RegExp(" ","g");if(void 0===a)for(var c=0;c<this.columns.length;c++)for(var d=0;d<this.rows.length;d++){var e=this.rows[d].arr[c];e=e.replace(b,""),this.rows[d].arr[c]=e,this.rows[d].obj[this.columns[c]]=e}else if("string"==typeof a)for(var f=0;f<this.rows.length;f++){var g=this.rows[f].obj[a];g=g.repla
b.textBaseline===z.TOP?e+=h:b.textBaseline===z._CTX_MIDDLE?e+=h/2:b.textBaseline===z.BOTTOM&&(e-=i),{x:d,y:e}},b.exports=y},{"../core/constants":20,"../core/core":21}],59:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype.append=function(a,b){return a.push(b),a},d.prototype.arrayCopy=function(a,b,c,d,e){var f,g;void 0!==e?(g=Math.min(e,a.length),f=d,a=a.slice(b,g+b)):(void 0!==c?(g=c,g=Math.min(g,a.length)):g=a.length,f=0,c=b,a=a.slice(0,g)),Array.prototype.splice.apply(c,[f,g].concat(a))},d.prototype.concat=function(a,b){return a.concat(b)},d.prototype.reverse=function(a){return a.reverse()},d.prototype.shorten=function(a){return a.pop(),a},d.prototype.shuffle=function(a,b){var c=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(a);a=b||c?a:a.slice();for(var d,e,f=a.length;f>1;)d=Math.random()*f|0,e=a[--f],a[f]=a[d],a[d]=e;return a},d.prototype.sort=function(a,b){var c=b?a.slice(0,Math.min(b,a.length)):a,d=b?a.slice(Math.min(b,a.length)):[];return c="string"==typeof c[0]?c.sort():c.sort(function(a,b){return a-b}),c.concat(d)},d.prototype.splice=function(a,b,c){return Array.prototype.splice.apply(a,[c,0].concat(b)),a},d.prototype.subset=function(a,b,c){return void 0!==c?a.slice(b,b+c):a.slice(b,a.length)},b.exports=d},{"../core/core":21}],60:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype.float=function(a){return a instanceof Array?a.map(parseFloat):parseFloat(a)},d.prototype.int=function(a,b){return b=b||10,"string"==typeof a?parseInt(a,b):"number"==typeof a?0|a:"boolean"==typeof a?a?1:0:a instanceof Array?a.map(function(a){return d.prototype.int(a,b)}):void 0},d.prototype.str=function(a){return a instanceof Array?a.map(d.prototype.str):String(a)},d.prototype.boolean=function(a){return"number"==typeof a?0!==a:"string"==typeof a?"true"===a.toLowerCase():"boolean"==typeof a?a:a instanceof Array?a.map(d.prototype.boolean):void 0},d.prototype.byte=function(a){var b=d.prototype.int(a,10);return"number"==typeof b?(b+128)%256-128:b instanceof Array?b.map(d.prototype.byte):void 0},d.prototype.char=function(a){return"number"!=typeof a||isNaN(a)?a instanceof Array?a.map(d.prototype.char):"string"==typeof a?d.prototype.char(parseInt(a,10)):void 0:String.fromCharCode(a)},d.prototype.unchar=function(a){return"string"==typeof a&&1===a.length?a.charCodeAt(0):a instanceof Array?a.map(d.prototype.unchar):void 0},d.prototype.hex=function(a,b){if(b=void 0===b||null===b?b=8:b,a instanceof Array)return a.map(function(a){return d.prototype.hex(a,b)});if("number"==typeof a){a<0&&(a=4294967295+a+1);for(var c=Number(a).toString(16).toUpperCase();c.length<b;)c="0"+c;return c.length>=b&&(c=c.substring(c.length-b,c.length)),c}},d.prototype.unhex=function(a){return a instanceof Array?a.map(d.prototype.unhex):parseInt("0x"+a,16)},b.exports=d},{"../core/core":21}],61:[function(a,b,c){"use strict";function d(a,b,c){var d=a<0,e=d?a.toString().substring(1):a.toString(),f=e.indexOf("."),g=-1!==f?e.substring(0,f):e,h=-1!==f?e.substring(f+1):"",i=d?"-":"";if(void 0!==c){var j="";(-1!==f||c-h.length>0)&&(j="."),h.length>c&&(h=h.substring(0,c));for(var k=0;k<b-g.length;k++)i+="0";i+=g,i+=j,i+=h;for(var l=0;l<c-h.length;l++)i+="0";return i}for(var m=0;m<Math.max(b-g.length,0);m++)i+="0";return i+=e}function e(a,b){a=a.toString();var c=a.indexOf("."),d=-1!==c?a.substring(c):"",e=-1!==c?a.substring(0,c):a;if(e=e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),0===b)d="";else if(void 0!==b)if(b>d.length){d+=-1===c?".":"";for(var f=b-d.length+1,g=0;g<f;g++)d+="0"}else d=d.substring(0,b+1);return e+d}function f(a){return parseFloat(a)>0?"+"+a.toString():a.toString()}function g(a){return parseFloat(a)>0?" "+a.toString():a.toString()}var h=a("../core/core");a("../core/error_helpers"),h.prototype.join=function(a,b){return h._validateParameters("join",arguments),a.join(b)},h.prototype.match=function(a,b){return h._validateParameters("match",arguments),a.match(b)},h.prototype.matchAll=function(a,b){h._validateParameters("matchAll",arguments);for(var c=new RegExp(b,"g"),d=c.exec(a),e=[];null!==d;)e.push(d),d=c.exec(a);return e},h.prot
b.lineVertexBuffer&&c.deleteBuffer(b.lineVertexBuffer)}},d.RendererGL.prototype.createBuffers=function(a,b){var c=this.GL;this._setDefaultCamera(),this._initBufferDefaults(a);var d=this.gHash[a];d.numberOfItems=3*b.faces.length,d.lineVertexCount=b.lineVertices.length,this._useColorShader(),this.curStrokeShader.attributes.aPosition&&(d.lineVertexBuffer=c.createBuffer(),this._bindBuffer(d.lineVertexBuffer,c.ARRAY_BUFFER,this._flatten(b.lineVertices),Float32Array,c.STATIC_DRAW),this.curStrokeShader.enableAttrib(this.curStrokeShader.attributes.aPosition.location,3,c.FLOAT,!1,0,0)),this.curStrokeShader.attributes.aDirection&&(d.lineNormalBuffer=c.createBuffer(),this._bindBuffer(d.lineNormalBuffer,c.ARRAY_BUFFER,this._flatten(b.lineNormals),Float32Array,c.STATIC_DRAW),this.curStrokeShader.enableAttrib(this.curStrokeShader.attributes.aDirection.location,4,c.FLOAT,!1,0,0)),this.curFillShader.attributes.aPosition&&(d.vertexBuffer=c.createBuffer(),this._bindBuffer(d.vertexBuffer,c.ARRAY_BUFFER,this._vToNArray(b.vertices),Float32Array,c.STATIC_DRAW),this.curFillShader.enableAttrib(this.curFillShader.attributes.aPosition.location,3,c.FLOAT,!1,0,0)),d.indexBuffer=c.createBuffer(),this._bindBuffer(d.indexBuffer,c.ELEMENT_ARRAY_BUFFER,this._flatten(b.faces),Uint16Array,c.STATIC_DRAW),this.curFillShader.attributes.aNormal&&(d.normalBuffer=c.createBuffer(),this._bindBuffer(d.normalBuffer,c.ARRAY_BUFFER,this._vToNArray(b.vertexNormals),Float32Array,c.STATIC_DRAW),this.curFillShader.enableAttrib(this.curFillShader.attributes.aNormal.location,3,c.FLOAT,!1,0,0)),this.curFillShader.attributes.aTexCoord&&(d.uvBuffer=c.createBuffer(),this._bindBuffer(d.uvBuffer,c.ARRAY_BUFFER,this._flatten(b.uvs),Float32Array,c.STATIC_DRAW),this.curFillShader.enableAttrib(this.curFillShader.attributes.aTexCoord.location,2,c.FLOAT,!1,0,0))},d.RendererGL.prototype.drawBuffers=function(a){this._setDefaultCamera();var b=this.GL;this._useColorShader();var c=this.gHash[a];return this._doStroke&&c.lineVertexCount>0&&(this.curStrokeShader.bindShader(),c.lineVertexBuffer&&(this._bindBuffer(c.lineVertexBuffer,b.ARRAY_BUFFER),this.curStrokeShader.enableAttrib(this.curStrokeShader.attributes.aPosition.location,3,b.FLOAT,!1,0,0)),c.lineNormalBuffer&&(this._bindBuffer(c.lineNormalBuffer,b.ARRAY_BUFFER),this.curStrokeShader.enableAttrib(this.curStrokeShader.attributes.aDirection.location,4,b.FLOAT,!1,0,0)),this._applyColorBlend(this.curStrokeColor),this._drawArrays(b.TRIANGLES,a),this.curStrokeShader.unbindShader()),!1!==this._doFill&&(this.curFillShader.bindShader(),c.vertexBuffer&&(this._bindBuffer(c.vertexBuffer,b.ARRAY_BUFFER),this.curFillShader.enableAttrib(this.curFillShader.attributes.aPosition.location,3,b.FLOAT,!1,0,0)),c.indexBuffer&&this._bindBuffer(c.indexBuffer,b.ELEMENT_ARRAY_BUFFER),c.normalBuffer&&(this._bindBuffer(c.normalBuffer,b.ARRAY_BUFFER),this.curFillShader.enableAttrib(this.curFillShader.attributes.aNormal.location,3,b.FLOAT,!1,0,0)),c.uvBuffer&&(this._bindBuffer(c.uvBuffer,b.ARRAY_BUFFER),this.curFillShader.enableAttrib(this.curFillShader.attributes.aTexCoord.location,2,b.FLOAT,!1,0,0)),this._applyColorBlend(this.curFillColor),this._drawElements(b.TRIANGLES,a),this.curFillShader.unbindShader()),this},d.RendererGL.prototype.drawBuffersScaled=function(a,b,c,d){var e=this.uMVMatrix.copy();try{this.uMVMatrix.scale(b,c,d),this.drawBuffers(a)}finally{this.uMVMatrix=e}},d.RendererGL.prototype._drawArrays=function(a,b){return this.GL.drawArrays(a,0,this.gHash[b].lineVertexCount),this},d.RendererGL.prototype._drawElements=function(a,b){this.GL.drawElements(a,this.gHash[b].numberOfItems,this.GL.UNSIGNED_SHORT,0)},b.exports=d.RendererGL},{"../core/core":21}],72:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../core/constants");a("./p5.Shader"),a("../core/p5.Renderer"),a("./p5.Matrix");var f=[],g=[],h={immediateVert:"attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\nuniform float uPointSize;\n\nvarying vec4 vColor;\nvoid main(void) {\n vec4 position
this.glTarget=c.TEXTURE_2D,this.glFormat=c.RGBA,this.mipmaps=!1,this.glMinFilter=c.LINEAR,this.glMagFilter=c.LINEAR,this.glWrapS=c.CLAMP_TO_EDGE,this.glWrapT=c.CLAMP_TO_EDGE,this.isSrcMediaElement=void 0!==d.MediaElement&&b instanceof d.MediaElement,this._videoPrevUpdateTime=0,this.isSrcHTMLElement=void 0!==d.Element&&b instanceof d.Element&&!(b instanceof d.Graphics),this.isSrcP5Image=b instanceof d.Image,this.isSrcP5Graphics=b instanceof d.Graphics;var e=this._getTextureDataFromSource();return this.width=e.width,this.height=e.height,this.init(e),this},d.Texture.prototype._getTextureDataFromSource=function(){var a;return this.isSrcP5Image?a=this.src.canvas:(this.isSrcMediaElement||this.isSrcP5Graphics||this.isSrcHTMLElement)&&(a=this.src.elt),a},d.Texture.prototype.init=function(a){var b=this._renderer.GL;if(this.glTex=b.createTexture(),this.bindTexture(),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,this.glMagFilter),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,this.glMinFilter),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,this.glWrapS),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,this.glWrapT),0===this.width||0===this.height||this.isSrcMediaElement&&!this.src.loadedmetadata){var c=new Uint8Array([1,1,1,1]);b.texImage2D(this.glTarget,0,b.RGBA,1,1,0,this.glFormat,b.UNSIGNED_BYTE,c)}else b.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,b.UNSIGNED_BYTE,a)},d.Texture.prototype.update=function(){var a=this.src;if(0!==a.width&&0!==a.height){var b=this._getTextureDataFromSource(),c=this._renderer.GL;if(b.width!==this.width||b.height!==this.height)this.width=b.width,this.height=b.height,this.bindTexture(),c.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,c.UNSIGNED_BYTE,b),this.isSrcP5Image?a.setModified(!1):(this.isSrcMediaElement||this.isSrcHTMLElement)&&a.setModified(!0);else if(this.isSrcP5Image)a.isModified()&&(this.bindTexture(),c.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,c.UNSIGNED_BYTE,b),a.setModified(!1));else if(this.isSrcMediaElement){var d=!1;a.isModified()?(d=!0,a.setModified(!1)):a.loadedmetadata&&this._videoPrevUpdateTime!==a.time()&&(this._videoPrevUpdateTime=a.time(),d=!0),d&&(this.bindTexture(),c.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,c.UNSIGNED_BYTE,b))}else c.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,c.UNSIGNED_BYTE,b)}},d.Texture.prototype.bindTexture=function(){return this._renderer.GL.bindTexture(this.glTarget,this.glTex),this},d.Texture.prototype.unbindTexture=function(){this._renderer.GL.bindTexture(this.glTarget,null)},b.exports=d.Texture},{"../core/core":21}],75:[function(a,b,c){"use strict";var d=a("../core/core");a("./p5.Geometry"),d.prototype.plane=function(a,b,c,e){void 0===a&&(a=50),void 0===b&&(b=a),void 0===c&&(c=1),void 0===e&&(e=1);var f="plane|"+c+"|"+e;if(!this._renderer.geometryInHash(f)){var g=function(){for(var a,b,c,e=0;e<=this.detailY;e++){b=e/this.detailY;for(var f=0;f<=this.detailX;f++)a=f/this.detailX,c=new d.Vector(a-.5,b-.5,0),this.vertices.push(c),this.uvs.push([a,b])}},h=new d.Geometry(c,e,g);h.computeFaces().computeNormals(),c<=1&&e<=1?(h._makeTriangleEdges(),this._renderer._edgesToVertices(h)):console.log("Cannot draw stroke on plane objects with more than 1 detailX or 1 detailY"),this._renderer.createBuffers(f,h)}this._renderer.drawBuffersScaled(f,a,b,0)},d.prototype.box=function(a,b,c,e,f){void 0===a&&(a=50),void 0===b&&(b=a),void 0===c&&(c=b),void 0===e&&(e=4),void 0===f&&(f=4);var g="box|"+e+"|"+f;if(!this._renderer.geometryInHash(g)){var h=function(){var a=[[0,4,2,6],[1,3,5,7],[0,1,4,5],[2,6,3,7],[0,2,1,3],[4,5,6,7]];this.strokeIndices=[[0,1],[1,3],[3,2],[6,7],[8,9],[9,11],[14,15],[16,17],[17,19],[18,19],[20,21],[22,23]];for(var b=0;b<a.length;b++){for(var c=a[b],e=4*b,f=0;f<4;f++){var g=c[f],h=new d.Vector((2*(1&g)-1)/2,((2&g)-1)/2,((4&g)/2-1)/2);this.vertices.push(h),this.uvs.push([1&f,(2&f)/2])}this.faces.push([e,e+1,e+2]),this.faces.push([e+2,e+1,e+3])}},i=new d.Geometry(e,f,h);i.computeNormals(),e<=4&&f<=4?(i._makeTriangleEdges(),this._renderer._edgesToVertices(i)):console.log("Cannot draw stroke