'.concat(s,"").concat(t," | "),this.dummyDOM||(this.dummyDOM=document.getElementById(n).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[e]?this.descriptions.fallbackElements[e].innerHTML!==s&&(this.descriptions.fallbackElements[e].innerHTML=s):this._describeElementHTML("fallback",e,s),r===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[e]?this.descriptions.labelElements[e].innerHTML!==s&&(this.descriptions.labelElements[e].innerHTML=s):this._describeElementHTML("label",e,s)))},o.default.prototype._describeHTML=function(e,t){var r,o=this.canvas.id;"fallback"===e?(this.dummyDOM.querySelector("#".concat(o+n))?this.dummyDOM.querySelector("#"+o+i).insertAdjacentHTML("beforebegin",'')):(r=''),this.dummyDOM.querySelector("#".concat(o,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(o,"accessibleOutput")).insertAdjacentHTML("beforebegin",r):this.dummyDOM.querySelector("#".concat(o)).innerHTML=r),this.descriptions.fallback=this.dummyDOM.querySelector("#".concat(o).concat(s)),this.descriptions.fallback.innerHTML=t):"label"===e&&(this.dummyDOM.querySelector("#".concat(o+a))?this.dummyDOM.querySelector("#".concat(o+u))&&this.dummyDOM.querySelector("#".concat(o+u)).insertAdjacentHTML("beforebegin",'')):(r=''),this.dummyDOM.querySelector("#".concat(o,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(o,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",r):this.dummyDOM.querySelector("#"+o).insertAdjacentHTML("afterend",r)),this.descriptions.label=this.dummyDOM.querySelector("#"+o+l),this.descriptions.label.innerHTML=t)},o.default.prototype._describeElementHTML=function(e,t,r){var o,c=this.canvas.id;"fallback"===e?(this.dummyDOM.querySelector("#".concat(c+n))?this.dummyDOM.querySelector("#"+c+i)||this.dummyDOM.querySelector("#"+c+s).insertAdjacentHTML("afterend",'Canvas elements and their descriptions
')):(o='Canvas elements and their descriptions
'),this.dummyDOM.querySelector("#".concat(c,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(c,"accessibleOutput")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#"+c).innerHTML=o),(o=document.createElement("tr")).id=c+"_fte_"+t,this.dummyDOM.querySelector("#"+c+i).appendChild(o),this.descriptions.fallbackElements[t]=this.dummyDOM.querySelector("#".concat(c).concat("_fte_").concat(t)),this.descriptions.fallbackElements[t].innerHTML=r):"label"===e&&(this.dummyDOM.querySelector("#".concat(c+a))?this.dummyDOM.querySelector("#".concat(c+u))||this.dummyDOM.querySelector("#"+c+l).insertAdjacentHTML("afterend",'')):(o=''),this.dummyDOM.querySelector("#".concat(c,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(c,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#"+c).insertAdjacentHTML("afterend",o)),(e=document.createElement("tr")).id=c+"_lte_"+t,this.dummyDOM.querySelector("#"+c+u).appendChild(e),this.descriptions.labelElements[t]=this.dummyDOM.querySelector("#".concat(c).concat("_lte_").concat(t)),this.descriptions.labelElements[t].innerHTML=r)},r.default=e=o.default},{"../core/main":267,"core-js/modules/es.array.concat":149,"core-js/modules/es.regexp.exec":181,"core-js/modules/es.string.ends-with":184,"core-js/modules/es.string.replace":189}],248:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.map"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,(e=(e=e("../core/main"))&&e.__esModule?e:{default:e}).default.prototype._updateGridOutput=function(e){var t,r,o,n;this.dummyDOM.querySelector("#".concat(e,"_summary"))&&(t=this._accessibleOutputs[e],o=function(e,t,r,o){return t="".concat(t," canvas, ").concat(r," by ").concat(o," pixels, contains ").concat(e[0]),t="".concat(t,1===e[0]?" shape: ":" shapes: ").concat(e[1])}((r=function(e,t){var r,o="",n="",s=0;for(r in t){var i,a=0;for(i in t[r]){var l='').concat(t[r][i].color," ").concat(r,",");"line"===r?l+=" location = ".concat(t[r][i].pos,", length = ").concat(t[r][i].length," pixels"):(l+=" location = ".concat(t[r][i].pos),"point"!==r&&(l+=", area = ".concat(t[r][i].area," %")),l+=""),o+=l,a++,s++}n=1').concat(t[o][l].color," ").concat(o,""):'').concat(t[o][l].color," ").concat(o," midpoint"),a[t[o][l].loc.locY][t[o][l].loc.locX]=a[t[o][l].loc.locY][t[o][l].loc.locX]?a[t[o][l].loc.locY][t[o][l].loc.locX]+" "+u:u,s++}for(n in a){var c,d="";for(c in a[n])d+="",void 0!==a[n][c]&&(d+=a[n][c]),d+=" | ";i=i+d+"
"}return i}(e,this.ingredients.shapes),o!==t.summary.innerHTML&&(t.summary.innerHTML=o),n!==t.map.innerHTML&&(t.map.innerHTML=n),r.details!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=r.details),this._accessibleOutputs[e]=t)},r.default=e=e.default},{"../core/main":267,"core-js/modules/es.array.concat":149,"core-js/modules/es.array.map":161}],249:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.map"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.map"),e("core-js/modules/es.number.to-fixed"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t,r){return e[0]<.4*t?e[1]<.4*r?"top left":e[1]>.6*r?"bottom left":"mid left":e[0]>.6*t?e[1]<.4*r?"top right":e[1]>.6*r?"bottom right":"mid right":e[1]<.4*r?"top middle":e[1]>.6*r?"bottom middle":"middle"}function s(e,t,r){return 10===(t=Math.floor(e[0]/t*10))&&(t-=1),10===(e=Math.floor(e[1]/r*10))&&(e-=1),{locX:t,locY:e}}o.default.prototype.textOutput=function(e){o.default._validateParameters("textOutput",arguments),this._accessibleOutputs.text||(this._accessibleOutputs.text=!0,this._createOutput("textOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.textLabel=!0,this._createOutput("textOutput","Label")))},o.default.prototype.gridOutput=function(e){o.default._validateParameters("gridOutput",arguments),this._accessibleOutputs.grid||(this._accessibleOutputs.grid=!0,this._createOutput("gridOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.gridLabel=!0,this._createOutput("gridOutput","Label")))},o.default.prototype._addAccsOutput=function(){return this._accessibleOutputs||(this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1}),this._accessibleOutputs.grid||this._accessibleOutputs.text},o.default.prototype._createOutput=function(e,t){var r,o,n,s=this.canvas.id,i=(this.ingredients||(this.ingredients={shapes:{},colors:{background:"white",fill:"white",stroke:"black"},pShapes:""}),this.dummyDOM||(this.dummyDOM=document.getElementById(s).parentNode),"");"Fallback"===t?(r=s+e,this.dummyDOM.querySelector("#".concat(o=s+"accessibleOutput"))||(this.dummyDOM.querySelector("#".concat(s,"_Description"))?this.dummyDOM.querySelector("#".concat(s,"_Description")).insertAdjacentHTML("afterend",'')):this.dummyDOM.querySelector("#".concat(s)).innerHTML=''))):"Label"===t&&(r=s+e+(i=t),this.dummyDOM.querySelector("#".concat(o=s+"accessibleOutput"+t))||(this.dummyDOM.querySelector("#".concat(s,"_Label"))?this.dummyDOM.querySelector("#".concat(s,"_Label")):this.dummyDOM.querySelector("#".concat(s))).insertAdjacentHTML("afterend",''))),this._accessibleOutputs[r]={},"textOutput"===e?(i="#".concat(s,"gridOutput").concat(i),n=''),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("beforebegin",n):this.dummyDOM.querySelector("#".concat(o)).innerHTML=n,this._accessibleOutputs[r].list=this.dummyDOM.querySelector("#".concat(r,"_list"))):"gridOutput"===e&&(i="#".concat(s,"textOutput").concat(i),n=''),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("afterend",n):this.dummyDOM.querySelector("#".concat(o)).innerHTML=n,this._accessibleOutputs[r].map=this.dummyDOM.querySelector("#".concat(r,"_map"))),this._accessibleOutputs[r].shapeDetails=this.dummyDOM.querySelector("#".concat(r,"_shapeDetails")),this._accessibleOutputs[r].summary=this.dummyDOM.querySelector("#".concat(r,"_summary"))},o.default.prototype._updateAccsOutput=function(){var e=this.canvas.id;JSON.stringify(this.ingredients.shapes)!==this.ingredients.pShapes&&(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(e+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(e+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(e+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(e+"gridOutputLabel"))},o.default.prototype._accsBackground=function(e){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==e&&(this.ingredients.colors.backgroundRGBA=e,this.ingredients.colors.background=this._rgbColorName(e))},o.default.prototype._accsCanvasColors=function(e,t){"fill"===e?this.ingredients.colors.fillRGBA!==t&&(this.ingredients.colors.fillRGBA=t,this.ingredients.colors.fill=this._rgbColorName(t)):"stroke"===e&&this.ingredients.colors.strokeRGBA!==t&&(this.ingredients.colors.strokeRGBA=t,this.ingredients.colors.stroke=this._rgbColorName(t))},o.default.prototype._accsOutput=function(e,t){"ellipse"===e&&t[2]===t[3]?e="circle":"rectangle"===e&&t[2]===t[3]&&(e="square");var r,o,i={},a=!0,l=function(e,t){var r;return e="rectangle"===e||"ellipse"===e||"arc"===e||"circle"===e||"square"===e?(r=Math.round(t[0]+t[2]/2),Math.round(t[1]+t[3]/2)):"triangle"===e?(r=(t[0]+t[2]+t[4])/3,(t[1]+t[3]+t[5])/3):"quadrilateral"===e?(r=(t[0]+t[2]+t[4]+t[6])/4,(t[1]+t[3]+t[5]+t[7])/4):"line"===e?(r=(t[0]+t[2])/2,(t[1]+t[3])/2):(r=t[0],t[1]),[r,e]}(e,t);if("line"===e?(i.color=this.ingredients.colors.stroke,i.length=Math.round(this.dist(t[0],t[1],t[2],t[3])),r=n([t[0],[1]],this.width,this.height),o=n([t[2],[3]],this.width,this.height),i.loc=s(l,this.width,this.height),i.pos=r===o?"at ".concat(r):"from ".concat(r," to ").concat(o)):("point"===e?i.color=this.ingredients.colors.stroke:(i.color=this.ingredients.colors.fill,i.area=function(e,t,r,o){var n,s,i,a,l,u,c,d=0;return"arc"===e?(d=(n=((t[5]-t[4])%(2*Math.PI)+2*Math.PI)%(2*Math.PI))*t[2]*t[3]/8,"open"!==t[6]&&"chord"!==t[6]||(c=t[0],s=t[1],i=t[0]+t[2]/2*Math.cos(t[4]).toFixed(2),a=t[1]+t[3]/2*Math.sin(t[4]).toFixed(2),l=t[0]+t[2]/2*Math.cos(t[5]).toFixed(2),u=t[1]+t[3]/2*Math.sin(t[5]).toFixed(2),c=Math.abs(c*(a-u)+i*(u-s)+l*(s-a))/2,n>Math.PI?d+=c:d-=c)):"ellipse"===e||"circle"===e?d=3.14*t[2]/2*t[3]/2:"line"===e||"point"===e?d=0:"quadrilateral"===e?d=Math.abs((t[6]+t[0])*(t[7]-t[1])+(t[0]+t[2])*(t[1]-t[3])+(t[2]+t[4])*(t[3]-t[5])+(t[4]+t[6])*(t[5]-t[7]))/2:"rectangle"===e||"square"===e?d=t[2]*t[3]:"triangle"===e&&(d=Math.abs(t[0]*(t[3]-t[5])+t[2]*(t[5]-t[1])+t[4]*(t[1]-t[3]))/2),Math.round(100*d/(r*o))}(e,t,this.width,this.height)),i.pos=n(l,this.width,this.height),i.loc=s(l,this.width,this.height)),this.ingredients.shapes[e]){if(this.ingredients.shapes[e]!==[i]){for(var u in this.ingredients.shapes[e])JSON.stringify(this.ingredients.shapes[e][u])===JSON.stringify(i)&&(a=!1);!0===a&&this.ingredients.shapes[e].push(i)}}else this.ingredients.shapes[e]=[i]},r.default=e=o.default},{"../core/main":267,"core-js/modules/es.array.concat":149,"core-js/modules/es.array.fill":152,"core-js/modules/es.array.map":161,"core-js/modules/es.number.to-fixed":171}],250:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.concat"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,(e=(e=e("../core/main"))&&e.__esModule?e:{default:e}).default.prototype._updateTextOutput=function(e){var t,r,o,n;this.dummyDOM.querySelector("#".concat(e,"_summary"))&&(t=this._accessibleOutputs[e],o=function(e,t,r,o){return r="Your output is a, ".concat(r," by ").concat(o," pixels, ").concat(t," canvas containing the following"),r=1===e?"".concat(r," shape:"):"".concat(r," ").concat(e," shapes:")}((r=function(e,t){var r,o="",n=0;for(r in t)for(var s in t[r]){var i='').concat(t[r][s].color," ").concat(r,"");"line"===r?i+=", ".concat(t[r][s].pos,", ").concat(t[r][s].length," pixels long."):(i+=", at ".concat(t[r][s].pos),"point"!==r&&(i+=", covering ".concat(t[r][s].area,"% of the canvas")),i+="."),o+=i,n++}return{numShapes:n,listShapes:o}}(e,this.ingredients.shapes)).numShapes,this.ingredients.colors.background,this.width,this.height),n=function(e,t){var r,o="",n=0;for(r in t)for(var s in t[r]){var i='').concat(t[r][s].color," ").concat(r," | ");"line"===r?i+="location = ".concat(t[r][s].pos," | length = ").concat(t[r][s].length," pixels |
"):(i+="location = ".concat(t[r][s].pos," | "),"point"!==r&&(i+=" area = ".concat(t[r][s].area,"% | ")),i+=""),o+=i,n++}return o}(e,this.ingredients.shapes),o!==t.summary.innerHTML&&(t.summary.innerHTML=o),r.listShapes!==t.list.innerHTML&&(t.list.innerHTML=r.listShapes),n!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=n),this._accessibleOutputs[e]=t)},r.default=e=e.default},{"../core/main":267,"core-js/modules/es.array.concat":149}],251:[function(e,t,r){"use strict";var o=(o=e("./core/main"))&&o.__esModule?o:{default:o};e("./core/constants"),e("./core/environment"),e("./core/friendly_errors/stacktrace"),e("./core/friendly_errors/validate_params"),e("./core/friendly_errors/file_errors"),e("./core/friendly_errors/fes_core"),e("./core/friendly_errors/sketch_reader"),e("./core/helpers"),e("./core/legacy"),e("./core/preload"),e("./core/p5.Element"),e("./core/p5.Graphics"),e("./core/p5.Renderer"),e("./core/p5.Renderer2D"),e("./core/rendering"),e("./core/shim"),e("./core/structure"),e("./core/transform"),e("./core/shape/2d_primitives"),e("./core/shape/attributes"),e("./core/shape/curves"),e("./core/shape/vertex"),e("./accessibility/outputs"),e("./accessibility/textOutput"),e("./accessibility/gridOutput"),e("./accessibility/color_namer"),e("./color/color_conversion"),e("./color/creating_reading"),e("./color/p5.Color"),e("./color/setting"),e("./data/p5.TypedDict"),e("./data/local_storage.js"),e("./dom/dom"),e("./accessibility/describe"),e("./events/acceleration"),e("./events/keyboard"),e("./events/mouse"),e("./events/touch"),e("./image/filters"),e("./image/image"),e("./image/loading_displaying"),e("./image/p5.Image"),e("./image/pixels"),e("./io/files"),e("./io/p5.Table"),e("./io/p5.TableRow"),e("./io/p5.XML"),e("./math/calculation"),e("./math/math"),e("./math/noise"),e("./math/p5.Vector"),e("./math/random"),e("./math/trigonometry"),e("./typography/attributes"),e("./typography/loading_displaying"),e("./typography/p5.Font"),e("./utilities/array_functions"),e("./utilities/conversion"),e("./utilities/string_functions"),e("./utilities/time_date"),e("./webgl/3d_primitives"),e("./webgl/interaction"),e("./webgl/light"),e("./webgl/loading"),e("./webgl/material"),e("./webgl/p5.Camera"),e("./webgl/p5.Geometry"),e("./webgl/p5.Matrix"),e("./webgl/p5.RendererGL.Immediate"),e("./webgl/p5.RendererGL"),e("./webgl/p5.RendererGL.Retained"),e("./webgl/p5.Shader"),e("./webgl/p5.RenderBuffer"),e("./webgl/p5.Texture"),e("./webgl/text"),e("./core/init"),t.exports=o.default},{"./accessibility/color_namer":246,"./accessibility/describe":247,"./accessibility/gridOutput":248,"./accessibility/outputs":249,"./accessibility/textOutput":250,"./color/color_conversion":252,"./color/creating_reading":253,"./color/p5.Color":254,"./color/setting":255,"./core/constants":256,"./core/environment":257,"./core/friendly_errors/fes_core":258,"./core/friendly_errors/file_errors":259,"./core/friendly_errors/sketch_reader":260,"./core/friendly_errors/stacktrace":261,"./core/friendly_errors/validate_params":262,"./core/helpers":263,"./core/init":264,"./core/legacy":266,"./core/main":267,"./core/p5.Element":268,"./core/p5.Graphics":269,"./core/p5.Renderer":270,"./core/p5.Renderer2D":271,"./core/preload":272,"./core/rendering":273,"./core/shape/2d_primitives":274,"./core/shape/attributes":275,"./core/shape/curves":276,"./core/shape/vertex":277,"./core/shim":278,"./core/structure":279,"./core/transform":280,"./data/local_storage.js":281,"./data/p5.TypedDict":282,"./dom/dom":283,"./events/acceleration":284,"./events/keyboard":285,"./events/mouse":286,"./events/touch":287,"./image/filters":288,"./image/image":289,"./image/loading_displaying":290,"./image/p5.Image":291,"./image/pixels":292,"./io/files":293,"./io/p5.Table":294,"./io/p5.TableRow":295,"./io/p5.XML":296,"./math/calculation":297,"./math/math":298,"./math/noise":299,"./math/p5.Vector":300,"./math/random":301,"./math/trigonometry":302,"./typography/attributes":303,"./typography/loading_displaying":304,"./typography/p5.Font":305,"./utilities/array_functions":306,"./utilities/conversion":307,"./utilities/string_functions":308,"./utilities/time_date":309,"./webgl/3d_primitives":310,"./webgl/interaction":311,"./webgl/light":312,"./webgl/loading":313,"./webgl/material":314,"./webgl/p5.Camera":315,"./webgl/p5.Geometry":316,"./webgl/p5.Matrix":317,"./webgl/p5.RenderBuffer":318,"./webgl/p5.RendererGL":321,"./webgl/p5.RendererGL.Immediate":319,"./webgl/p5.RendererGL.Retained":320,"./webgl/p5.Shader":322,"./webgl/p5.Texture":323,"./webgl/text":324}],252:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,(e=(e=e("../core/main"))&&e.__esModule?e:{default:e}).default.ColorConversion={},e.default.ColorConversion._hsbaToHSLA=function(e){var t=e[1],r=e[2],o=(2-t)*r/2;return 0!=o&&(1==o?t=0:o<.5?t/=2-t:t=t*r/(2-2*o)),[e[0],t,o,e[3]]},e.default.ColorConversion._hsbaToRGBA=function(e){var t,r,o,n,s,i=6*e[0],a=e[1],l=e[2];return 0===a?[l,l,l,e[3]]:(r=l*(1-a),o=l*(1-a*(i-(t=Math.floor(i)))),a=l*(1-a*(1+t-i)),i=1===t?(n=o,s=l,r):2===t?(n=r,s=l,a):3===t?(n=r,s=o,l):4===t?(n=a,s=r,l):5===t?(n=l,s=r,o):(n=l,s=a,r),[n,s,i,e[3]])},e.default.ColorConversion._hslaToHSBA=function(e){var t=e[1],r=e[2],o=r<.5?(1+t)*r:r+t-r*t;return[e[0],t=2*(o-r)/o,o,e[3]]},e.default.ColorConversion._hslaToRGBA=function(e){var t,r=6*e[0],o=e[1],n=e[2];return 0===o?[n,n,n,e[3]]:[(t=function(e,t,r){return e<0?e+=6:6<=e&&(e-=6),e<1?t+(r-t)*e:e<3?r:e<4?t+(r-t)*(4-e):t})(2+r,o=2*n-(n=n<.5?(1+o)*n:n+o-n*o),n),t(r,o,n),t(r-2,o,n),e[3]]},e.default.ColorConversion._rgbaToHSBA=function(e){var t,r,o=e[0],n=e[1],s=e[2],i=Math.max(o,n,s),a=i-Math.min(o,n,s);return 0==a?r=t=0:(r=a/i,o===i?t=(n-s)/a:n===i?t=2+(s-o)/a:s===i&&(t=4+(o-n)/a),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,i,e[3]]},e.default.ColorConversion._rgbaToHSLA=function(e){var t,r,o,n=e[0],s=e[1],i=e[2],a=Math.max(n,s,i),l=a+(o=Math.min(n,s,i));return 0==(o=a-o)?r=t=0:(r=l<1?o/l:o/(2-l),n===a?t=(s-i)/o:s===a?t=2+(i-n)/o:i===a&&(t=4+(n-s)/o),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,l/2,e[3]]},r.default=e=e.default.ColorConversion},{"../core/main":267}],253:[function(e,t,r){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return(n="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.map"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=(l=e("../core/main"))&&l.__esModule?l:{default:l},i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var i;Object.prototype.hasOwnProperty.call(e,r)&&((i=s?Object.getOwnPropertyDescriptor(e,r):null)&&(i.get||i.set)?Object.defineProperty(o,r,i):o[r]=e[r])}return o.default=e,t&&t.set(e,o),o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}e("./p5.Color"),e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),s.default.prototype.alpha=function(e){return s.default._validateParameters("alpha",arguments),this.color(e)._getAlpha()},s.default.prototype.blue=function(e){return s.default._validateParameters("blue",arguments),this.color(e)._getBlue()},s.default.prototype.brightness=function(e){return s.default._validateParameters("brightness",arguments),this.color(e)._getBrightness()},s.default.prototype.color=function(){return s.default._validateParameters("color",arguments),arguments[0]instanceof s.default.Color?arguments[0]:new s.default.Color(this,arguments[0]instanceof Array?arguments[0]:arguments)},s.default.prototype.green=function(e){return s.default._validateParameters("green",arguments),this.color(e)._getGreen()},s.default.prototype.hue=function(e){return s.default._validateParameters("hue",arguments),this.color(e)._getHue()},s.default.prototype.lerpColor=function(e,t,r){s.default._validateParameters("lerpColor",arguments);var o,n,a,l=this._colorMode,u=this._colorMaxes;if(l===i.RGB)n=e.levels.map((function(e){return e/255})),a=t.levels.map((function(e){return e/255}));else if(l===i.HSB)e._getBrightness(),t._getBrightness(),n=e.hsba,a=t.hsba;else{if(l!==i.HSL)throw new Error("".concat(l,"cannot be used for interpolation."));e._getLightness(),t._getLightness(),n=e.hsla,a=t.hsla}return r=Math.max(Math.min(r,1),0),void 0===this.lerp&&(this.lerp=function(e,t,r){return r*(t-e)+e}),e=this.lerp(n[0],a[0],r),t=this.lerp(n[1],a[1],r),o=this.lerp(n[2],a[2],r),n=this.lerp(n[3],a[3],r),this.color(e*=u[l][0],t*=u[l][1],o*=u[l][2],n*=u[l][3])},s.default.prototype.lightness=function(e){return s.default._validateParameters("lightness",arguments),this.color(e)._getLightness()},s.default.prototype.red=function(e){return s.default._validateParameters("red",arguments),this.color(e)._getRed()},s.default.prototype.saturation=function(e){return s.default._validateParameters("saturation",arguments),this.color(e)._getSaturation()};var l=s.default;r.default=l},{"../core/constants":256,"../core/friendly_errors/fes_core":258,"../core/friendly_errors/file_errors":259,"../core/friendly_errors/validate_params":262,"../core/main":267,"./p5.Color":254,"core-js/modules/es.array.iterator":158,"core-js/modules/es.array.map":161,"core-js/modules/es.object.get-own-property-descriptor":173,"core-js/modules/es.object.to-string":177,"core-js/modules/es.string.iterator":186,"core-js/modules/es.symbol":196,"core-js/modules/es.symbol.description":194,"core-js/modules/es.symbol.iterator":195,"core-js/modules/es.weak-map":228,"core-js/modules/web.dom-collections.iterator":230}],254:[function(e,t,r){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return(n="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.trim"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.trim"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=u(e("../core/main")),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r,o={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var i;Object.prototype.hasOwnProperty.call(e,r)&&((i=s?Object.getOwnPropertyDescriptor(e,r):null)&&(i.get||i.set)?Object.defineProperty(o,r,i):o[r]=e[r])}return o.default=e,t&&t.set(e,o),o}(e("../core/constants")),a=u(e("./color_conversion"));function l(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,l=function(){return e},e)}function u(e){return e&&e.__esModule?e:{default:e}}s.default.Color=function(e,t){if(this._storeModeAndMaxes(e._colorMode,e._colorMaxes),this.mode!==i.RGB&&this.mode!==i.HSL&&this.mode!==i.HSB)throw new Error("".concat(this.mode," is an invalid colorMode."));return this._array=s.default.Color._parseInputs.apply(this,t),this._calculateLevels(),this},s.default.Color.prototype.toString=function(e){var t=this.levels,r=this._array,o=r[3];switch(e){case"#rrggbb":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16));case"#rrggbbaa":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16),t[3]<16?"0".concat(t[3].toString(16)):t[3].toString(16));case"#rgb":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16),Math.round(15*r[3]).toString(16));case"rgb":return"rgb(".concat(t[0],", ",t[1],", ",t[2],")");case"rgb%":return"rgb(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%, ",(100*r[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=a.default._rgbaToHSBA(this._array)),"hsb(".concat(this.hsba[0]*this.maxes[i.HSB][0],", ",this.hsba[1]*this.maxes[i.HSB][1],", ",this.hsba[2]*this.maxes[i.HSB][2],")");case"hsb%":case"hsv%":return this.hsba||(this.hsba=a.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=a.default._rgbaToHSBA(this._array)),"hsba(".concat(this.hsba[0]*this.maxes[i.HSB][0],", ",this.hsba[1]*this.maxes[i.HSB][1],", ",this.hsba[2]*this.maxes[i.HSB][2],", ",o,")");case"hsba%":case"hsva%":return this.hsba||(this.hsba=a.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*o).toPrecision(3),"%)");case"hsl":return this.hsla||(this.hsla=a.default._rgbaToHSLA(this._array)),"hsl(".concat(this.hsla[0]*this.maxes[i.HSL][0],", ",this.hsla[1]*this.maxes[i.HSL][1],", ",this.hsla[2]*this.maxes[i.HSL][2],")");case"hsl%":return this.hsla||(this.hsla=a.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=a.default._rgbaToHSLA(this._array)),"hsla(".concat(this.hsla[0]*this.maxes[i.HSL][0],", ",this.hsla[1]*this.maxes[i.HSL][1],", ",this.hsla[2]*this.maxes[i.HSL][2],", ",o,")");case"hsla%":return this.hsla||(this.hsla=a.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*o).toPrecision(3),"%)");default:return"rgba(".concat(t[0],",",t[1],",",t[2],",",o,")")}},s.default.Color.prototype.setRed=function(e){this._array[0]=e/this.maxes[i.RGB][0],this._calculateLevels()},s.default.Color.prototype.setGreen=function(e){this._array[1]=e/this.maxes[i.RGB][1],this._calculateLevels()},s.default.Color.prototype.setBlue=function(e){this._array[2]=e/this.maxes[i.RGB][2],this._calculateLevels()},s.default.Color.prototype.setAlpha=function(e){this._array[3]=e/this.maxes[this.mode][3],this._calculateLevels()},s.default.Color.prototype._calculateLevels=function(){for(var e=this._array,t=this.levels=new Array(e.length),r=e.length-1;0<=r;--r)t[r]=Math.round(255*e[r]);this.hsla=null,this.hsba=null},s.default.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},s.default.Color.prototype._storeModeAndMaxes=function(e,t){this.mode=e,this.maxes=t},s.default.Color.prototype._getMode=function(){return this.mode},s.default.Color.prototype._getMaxes=function(){return this.maxes},s.default.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[i.RGB][2]},s.default.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=a.default._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[i.HSB][2]},s.default.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[i.RGB][1]},s.default.Color.prototype._getHue=function(){return this.mode===i.HSB?(this.hsba||(this.hsba=a.default._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[i.HSB][0]):(this.hsla||(this.hsla=a.default._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[i.HSL][0])},s.default.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=a.default._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[i.HSL][2]},s.default.Color.prototype._getRed=function(){return this._array[0]*this.maxes[i.RGB][0]},s.default.Color.prototype._getSaturation=function(){return this.mode===i.HSB?(this.hsba||(this.hsba=a.default._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[i.HSB][1]):(this.hsla||(this.hsla=a.default._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[i.HSL][1])};var c={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"},d=(e=/\s*/,/(\d{1,3})/),p=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,h=new RegExp("".concat(p.source,"%")),f={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\\(",d.source,",",d.source,",",d.source,"\\)$"].join(e.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",h.source,",",h.source,",",h.source,"\\)$"].join(e.source),"i"),RGBA:new RegExp(["^rgba\\(",d.source,",",d.source,",",d.source,",",p.source,"\\)$"].join(e.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",h.source,",",h.source,",",h.source,",",p.source,"\\)$"].join(e.source),"i"),HSL:new RegExp(["^hsl\\(",d.source,",",h.source,",",h.source,"\\)$"].join(e.source),"i"),HSLA:new RegExp(["^hsla\\(",d.source,",",h.source,",",h.source,",",p.source,"\\)$"].join(e.source),"i"),HSB:new RegExp(["^hsb\\(",d.source,",",h.source,",",h.source,"\\)$"].join(e.source),"i"),HSBA:new RegExp(["^hsba\\(",d.source,",",h.source,",",h.source,",",p.source,"\\)$"].join(e.source),"i")};s.default.Color._parseInputs=function(e,t,r,o){var n,l=arguments.length,u=this.mode,d=this.maxes[u],p=[];if(3<=l){for(p[0]=e/d[0],p[1]=t/d[1],p[2]=r/d[2],p[3]="number"==typeof o?o/d[3]:1,n=p.length-1;0<=n;--n){var h=p[n];h<0?p[n]=0:1"].indexOf(t[0])?void 0:t[0],lineNumber:t[1],columnNumber:t[2],source:e}}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(r)}),this).map((function(e){var t,r;return-1===(e=-1 eval")?e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1"):e).indexOf("@")&&-1===e.indexOf(":")?{functionName:e}:{functionName:(r=e.match(t=/((.*".+"[^@]*)?[^@]*)(?:@)/))&&r[1]?r[1]:void 0,fileName:(r=this.extractLocation(e.replace(t,"")))[0],lineNumber:r[1],columnNumber:r[2],source:e}}),this)},parseOpera:function(e){return!e.stacktrace||-1e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],n=2,s=r.length;n/,"$2").replace(/\([^)]*\)/g,"")||void 0,args:void 0===(t=r.match(/\(([^)]*)\)/)?r.replace(/^[^(]+\(([^)]*)\)$/,"$1"):t)||"[arguments not available]"===t?void 0:t.split(","),fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e}}),this)}}}e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,(e=(e=e("../main"))&&e.__esModule?e:{default:e}).default._getErrorStackParser=function(){return new o},r.default=e=e.default},{"../main":267,"core-js/modules/es.array.filter":153,"core-js/modules/es.array.index-of":157,"core-js/modules/es.array.join":159,"core-js/modules/es.array.map":161,"core-js/modules/es.array.slice":162,"core-js/modules/es.regexp.exec":181,"core-js/modules/es.string.match":187,"core-js/modules/es.string.replace":189,"core-js/modules/es.string.split":191}],262:[function(e,t,r){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.map"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.map"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(n=e("../main"))&&n.__esModule?n:{default:n};function s(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,s=function(){return e},e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}(function(e){if(!(e&&e.__esModule||null===e||"object"!==i(e)&&"function"!=typeof e)){var t=s();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var a;Object.prototype.hasOwnProperty.call(e,r)&&((a=n?Object.getOwnPropertyDescriptor(e,r):null)&&(a.get||a.set)?Object.defineProperty(o,r,a):o[r]=e[r])}o.default=e,t&&t.set(e,o)}})(e("../constants")),e("../internationalization"),n.default._validateParameters=n.default._clearValidateParamsCache=function(){},r.default=e=n.default},{"../../../docs/parameterData.json":void 0,"../constants":256,"../internationalization":265,"../main":267,"core-js/modules/es.array.concat":149,"core-js/modules/es.array.for-each":154,"core-js/modules/es.array.includes":156,"core-js/modules/es.array.index-of":157,"core-js/modules/es.array.iterator":158,"core-js/modules/es.array.join":159,"core-js/modules/es.array.last-index-of":160,"core-js/modules/es.array.map":161,"core-js/modules/es.array.slice":162,"core-js/modules/es.function.name":165,"core-js/modules/es.map":166,"core-js/modules/es.number.constructor":169,"core-js/modules/es.object.get-own-property-descriptor":173,"core-js/modules/es.object.get-prototype-of":175,"core-js/modules/es.object.keys":176,"core-js/modules/es.object.to-string":177,"core-js/modules/es.reflect.construct":179,"core-js/modules/es.regexp.exec":181,"core-js/modules/es.regexp.to-string":182,"core-js/modules/es.set":183,"core-js/modules/es.string.includes":185,"core-js/modules/es.string.iterator":186,"core-js/modules/es.string.split":191,"core-js/modules/es.symbol":196,"core-js/modules/es.symbol.description":194,"core-js/modules/es.symbol.iterator":195,"core-js/modules/es.weak-map":228,"core-js/modules/web.dom-collections.for-each":229,"core-js/modules/web.dom-collections.iterator":230}],263:[function(e,t,r){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return(n="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r,o={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var a;Object.prototype.hasOwnProperty.call(e,r)&&((a=s?Object.getOwnPropertyDescriptor(e,r):null)&&(a.get||a.set)?Object.defineProperty(o,r,a):o[r]=e[r])}return o.default=e,t&&t.set(e,o),o}(e("./constants"));function i(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,i=function(){return e},e)}r.default={modeAdjust:function(e,t,r,o,n){return n===s.CORNER?{x:e,y:t,w:r,h:o}:n===s.CORNERS?{x:e,y:t,w:r-e,h:o-t}:n===s.RADIUS?{x:e-r,y:t-o,w:2*r,h:2*o}:n===s.CENTER?{x:e-.5*r,y:t-.5*o,w:r,h:o}:void 0}}},{"./constants":256,"core-js/modules/es.array.iterator":158,"core-js/modules/es.object.get-own-property-descriptor":173,"core-js/modules/es.object.to-string":177,"core-js/modules/es.string.iterator":186,"core-js/modules/es.symbol":196,"core-js/modules/es.symbol.description":194,"core-js/modules/es.symbol.iterator":195,"core-js/modules/es.weak-map":228,"core-js/modules/web.dom-collections.iterator":230}],264:[function(e,t,r){"use strict";e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator");var o=(n=e("../core/main"))&&n.__esModule?n:{default:n};e("./internationalization");var n=Promise.resolve();Promise.all([new Promise((function(e,t){"complete"===document.readyState?e():window.addEventListener("load",e,!1)})),n]).then((function(){void 0!==window._setupDone?console.warn("p5.js seems to have been imported multiple times. Please remove the duplicate import"):window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!o.default.instance&&new o.default}))},{"../core/main":267,"./internationalization":265,"core-js/modules/es.array.iterator":158,"core-js/modules/es.object.to-string":177,"core-js/modules/es.promise":178,"core-js/modules/es.string.iterator":186,"core-js/modules/web.dom-collections.iterator":230}],265:[function(e,t,r){"use strict";e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.setTranslatorLanguage=r.currentTranslatorLanguage=r.availableTranslatorLanguages=r.initialize=r.translator=void 0;var o,n=i(e("i18next")),s=i(e("i18next-browser-languagedetector"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r=a.width||t>=a.height?[0,0,0,0]:this._getPixel(e,t);return(s=new n.default.Image(r,o)).canvas.getContext("2d").drawImage(a,e,t,r*i,o*i,0,0,r,o),s},n.default.Renderer.prototype.textLeading=function(e){return"number"==typeof e?(this._setProperty("_leadingSet",!0),this._setProperty("_textLeading",e),this._pInst):this._textLeading},n.default.Renderer.prototype.textSize=function(e){return"number"==typeof e?(this._setProperty("_textSize",e),this._leadingSet||this._setProperty("_textLeading",e*s._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},n.default.Renderer.prototype.textStyle=function(e){return e?(e!==s.NORMAL&&e!==s.ITALIC&&e!==s.BOLD&&e!==s.BOLDITALIC||this._setProperty("_textStyle",e),this._applyTextProperties()):this._textStyle},n.default.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},n.default.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},n.default.Renderer.prototype.textAlign=function(e,t){return void 0!==e?(this._setProperty("_textAlign",e),void 0!==t&&this._setProperty("_textBaseline",t),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}},n.default.Renderer.prototype.textWrap=function(e){return this._setProperty("_textWrap",e),this._textWrap},n.default.Renderer.prototype.text=function(e,t,r,o,n){var i,a,l,u,c=this._pInst,d=this._textWrap,p=Number.MAX_VALUE,h=r;if((this._doFill||this._doStroke)&&void 0!==e){if(i=(e=(e="string"!=typeof e?e.toString():e).replace(/(\t)/g," ")).split("\n"),void 0!==o){switch(this._rectMode===s.CENTER&&(t-=o/2),this._textAlign){case s.CENTER:t+=o/2;break;case s.RIGHT:t+=o}if(void 0!==n){this._rectMode===s.CENTER&&(r-=n/2);e=r;var f=c.textAscent();switch(this._textBaseline){case s.BOTTOM:u=r+n,r=Math.max(u,r),h+=f;break;case s.CENTER:u=r+n/2,r=Math.max(u,r),h+=f/2}p=r+n-f,this._textBaseline===s.CENTER&&(p=e+n-f/2)}else{if(this._textBaseline===s.BOTTOM)return console.warn("textAlign(*, BOTTOM) requires x, y, width and height");if(this._textBaseline===s.CENTER)return console.warn("textAlign(*, CENTER) requires x, y, width and height")}if(d===s.WORD){for(var m=[],y=0;yi.HALF_PI&&e<=3*i.HALF_PI?Math.atan(r/o*Math.tan(e))+i.PI:Math.atan(r/o*Math.tan(e))+i.TWO_PI,t=t<=i.HALF_PI?Math.atan(r/o*Math.tan(t)):t>i.HALF_PI&&t<=3*i.HALF_PI?Math.atan(r/o*Math.tan(t))+i.PI:Math.atan(r/o*Math.tan(t))+i.TWO_PI),tf||Math.abs(this.accelerationY-this.pAccelerationY)>f||Math.abs(this.accelerationZ-this.pAccelerationZ)>f)&&s.deviceMoved(),"function"==typeof s.deviceTurned&&(r=l+180,0<(t=this.rotationX+180)-(e=this.pRotationX+180)&&t-e<270||t-e<-270?d="clockwise":(t-e<0||270>>16,e[1+r]=(65280&t[o])>>>8,e[2+r]=255&t[o],e[3+r]=(4278190080&t[o])>>>24},a._toImageData=function(e){return e instanceof ImageData?e:e.getContext("2d").getImageData(0,0,e.width,e.height)},a._createImageData=function(e,t){return a._tmpCanvas=document.createElement("canvas"),a._tmpCtx=a._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(e,t)},a.apply=function(e,t,r){var o=e.getContext("2d"),n=o.getImageData(0,0,e.width,e.height);(t=t(n,r))instanceof ImageData?o.putImageData(t,0,0,0,0,e.width,e.height):o.putImageData(n,0,0,0,0,e.width,e.height)},a.threshold=function(e,t){for(var r=a._toPixels(e),o=(void 0===t&&(t=.5),Math.floor(255*t)),n=0;n>8)/o,r[n+1]=255*(s*t>>8)/o,r[n+2]=255*(i*t>>8)/o}},a.dilate=function(e){for(var t,r,o,n,s,i,l,u,c,d=a._toPixels(e),p=0,h=d.length?d.length/4:0,f=new Int32Array(h);p>16&255)+151*(n>>8&255)+28*(255&n))<(l=77*(c>>16&255)+151*(c>>8&255)+28*(255&c))&&(o=c,n=l),n<(l=77*((c=a._getARGB(d,u))>>16&255)+151*(c>>8&255)+28*(255&c))&&(o=c,n=l),n<(u=77*(s>>16&255)+151*(s>>8&255)+28*(255&s))&&(o=s,n=u),n<(c=77*(i>>16&255)+151*(i>>8&255)+28*(255&i))&&(o=i,n=c),f[p++]=o;a._setPixels(d,f)},a.erode=function(e){for(var t,r,o,n,s,i,l,u,c,d=a._toPixels(e),p=0,h=d.length?d.length/4:0,f=new Int32Array(h);p>16&255)+151*(c>>8&255)+28*(255&c))<(n=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))&&(o=c,n=l),(l=77*((c=a._getARGB(d,u))>>16&255)+151*(c>>8&255)+28*(255&c))>16&255)+151*(s>>8&255)+28*(255&s))>16&255)+151*(i>>8&255)+28*(255&i))>>24],l+=V[(16711680&G)>>16],u+=V[(65280&G)>>8],c+=V[255&G],r+=s[E],p++}M[h=k+j]=d/r,C[h]=l/r,P[h]=u/r,T[h]=c/r}k+=v}for(m=(f=-o)*v,S=k=0;S"+d.length.toString()+" out of "+i.toString()),e.next=44,new Promise((function(e){return setTimeout(e,0)}));e.next=46;break;case 44:e.next=35;break;case 46:p.html("Frames processed, generating color palette..."),this.loop(),this.pixelDensity(c),m=(0,u.GIFEncoder)(),y=function(e){for(var t=new Uint8Array(e.length*e[0].length),r=0;r"+v.toString()+" out of "+i.toString()),e.next=68,new Promise((function(e){return setTimeout(e,0)}));case 68:v++,e.next=53;break;case 71:m.finish(),M=m.bytesView(),M=new Blob([M],{type:"image/gif"}),d=[],this.loop(),p.html("Done. Downloading your gif!🌸"),s.default.prototype.downloadFile(M,t,"gif");case 79:case"end":return e.stop()}}),e,this)}));var e,t=function(){var t=this,r=arguments;return new Promise((function(o,n){var s=e.apply(t,r);function i(e){p(s,o,n,i,a,"next",e)}function a(e){p(s,o,n,i,a,"throw",e)}i(void 0)}))};return function(e,r){return t.apply(this,arguments)}}(),s.default.prototype.image=function(e,t,r,o,n,l,u,c,d,p,m,y){s.default._validateParameters("image",arguments);var g=e.width,v=e.height,b=(y=y||a.CENTER,m=m||a.CENTER,e.elt&&e.elt.videoWidth&&!e.canvas&&(g=e.elt.videoWidth,v=e.elt.videoHeight),o||g);n=n||v,l=l||0,u=u||0,c=f(c||g,g),g=f(d||v,v),d=1;e.elt&&!e.canvas&&e.elt.style.width&&(d=e.elt.videoWidth&&!o?e.elt.videoWidth:e.elt.width,d/=parseInt(e.elt.style.width,10)),l*=d,u*=d,g*=d,c*=d,v=h(p,m,y,(v=i.default.modeAdjust(t,r,b,n,this._renderer._imageMode)).x,v.y,v.w,v.h,l,u,c,g),this._renderer.image(e,v.sx,v.sy,v.sw,v.sh,v.dx,v.dy,v.dw,v.dh)},s.default.prototype.tint=function(){for(var e=arguments.length,t=new Array(e),r=0;r=(t=r.frames[r.displayIndex].delay)&&(t=Math.floor(r.timeDisplayed/t),r.timeDisplayed=0,r.lastChangeTime=e,r.displayIndex+=t,r.loopCount=Math.floor(r.displayIndex/r.numFrames),null!==r.loopLimit&&r.loopCount>=r.loopLimit?r.playing=!1:(this.drawingContext.putImageData(r.frames[e=r.displayIndex%r.numFrames].image,0,0),r.displayIndex=e,this.setModified(!0))))},o.default.Image.prototype._setProperty=function(e,t){this[e]=t,this.setModified(!0)},o.default.Image.prototype.loadPixels=function(){o.default.Renderer2D.prototype.loadPixels.call(this),this.setModified(!0)},o.default.Image.prototype.updatePixels=function(e,t,r,n){o.default.Renderer2D.prototype.updatePixels.call(this,e,t,r,n),this.setModified(!0)},o.default.Image.prototype.get=function(e,t,r,n){return o.default._validateParameters("p5.Image.get",arguments),o.default.Renderer2D.prototype.get.apply(this,arguments)},o.default.Image.prototype._getPixel=o.default.Renderer2D.prototype._getPixel,o.default.Image.prototype.set=function(e,t,r){o.default.Renderer2D.prototype.set.call(this,e,t,r),this.setModified(!0)},o.default.Image.prototype.resize=function(e,t){0===e&&0===t?(e=this.canvas.width,t=this.canvas.height):0===e?e=this.canvas.width*t/this.canvas.height:0===t&&(t=this.canvas.height*e/this.canvas.width),e=Math.floor(e),t=Math.floor(t);var r=document.createElement("canvas");if(r.width=e,r.height=t,this.gifProperties)for(var o=this.gifProperties,n=0;n/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e,t){t&&!0!==t&&"true"!==t||(t="");var r="";return(e=e||"untitled")&&e.includes(".")&&(r=e.split(".").pop()),t&&r!==t&&(r=t,e="".concat(e,".").concat(r)),[e,r]}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),n.default.prototype.loadJSON=function(){for(var e=arguments.length,t=new Array(e),r=0;r"),s.print(""),s.print(' '),s.print(""),s.print(""),s.print(" "),"0"!==i[0]){s.print(" ");for(var p=0;p".concat(h)),s.print(" ")}s.print("
")}for(var f=0;f");for(var m=0;m".concat(y)),s.print(" ")}s.print(" ")}s.print("
"),s.print(""),s.print("