PageSourceSearch

https://45sna.com/wp-content/themes/sna/dist/sna/scripts.594e73f154e77a024e07.js

js 45sna.com collected 2026-10-05 03:35:41 UTC 854,918 bytes, 1 lines download raw bytes

vendor: 5,260 bytes, line 1
1!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";var i=[],r=t.document,n=Object.getPrototypeOf,o=i.slice,s=i.concat,a=i.push,h=i.indexOf,l={},u=l.toString,c=l.hasOwnProperty,p=c.toString,f=p.call(Object),d={},m=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function(t){return null!=t&&t===t.window},g={type:!0,src:!0,nonce:!0,noModule:!0};function v(t,e,i){var n,o,s=(i=i||r).createElement("script");if(s.text=t,e)for(n in g)(o=e[n]||e.getAttribute&&e.getAttribute(n))&&s.setAttribute(n,o);i.head.appendChild(s).parentNode.removeChild(s)}function _(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[u.call(t)]||"object":typeof t}var b="3.4.0",x=function(t,e){return new x.fn.init(t,e)},w=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function T(t){var e=!!t&&"length"in t&&t.length,i=_(t);return!m(t)&&!y(t)&&("array"===i||0===e||"number"==typeof e&&0<e&&e-1 in t)}x.fn=x.prototype={jquery:b,constructor:x,length:0,toArray:function(){return o.call(this)},get:function(t){return null==t?o.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(0<=i&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:i.sort,splice:i.splice},x.extend=x.fn.extend=function(){var t,e,i,r,n,o,s=arguments[0]||{},a=1,h=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||m(s)||(s={}),a===h&&(s=this,a--);a<h;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&s!==r&&(l&&r&&(x.isPlainObject(r)||(n=Array.isArray(r)))?(i=s[e],o=n&&!Array.isArray(i)?[]:n||x.isPlainObject(i)?i:{},n=!1,s[e]=x.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},x.extend({expando:"jQuery"+(b+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==u.call(t)||(e=n(t))&&("function"!=typeof(i=c.call(e,"constructor")&&e.constructor)||p.call(i)!==f))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e){v(t,{nonce:e&&e.nonce})},each:function(t,e){var i,r=0;if(T(t))for(i=t.length;r<i&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},trim:function(t){return null==t?"":(t+"").replace(w,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(T(Object(t))?x.merge(i,"string"==typeof t?[t]:t):a.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:h.call(e,t,i)},merge:function(t,e){for(var i=+e.length,r=0,n=t.length;r<i;r++)t[n++]=e[r];return t.length=n,t},grep:function(t,e,i){for(var r=[],n=0,o=t.length,s=!i;n<o;n++)!e(t[n],n)!==s&&r.push(t[n]);return r},map:function(t,e,i){var r,n,o=0,a=[];if(T(t))for(r=t.length;o<r;o++)null!=(n=e(t[o],o,i))&&a.push(n);else for(o in t)null!=(n=e(t[o],o,i))&&a.push(n);return s.apply([],a)},guid:1,support:d}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=i[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){l["[object "+e+"]"]=e.toLowerCase()});var S=function(t){var e,i,r,n,o,s,a,h,l,u,c,p,f,d,m,y,g,v,_,b="sizzle"+1*new Date,x=t.document,w=0,T=0,S=ht(),M=ht(),E=ht(),C=ht(),A=function(t,e){return t===e&&(c=!0),0},P={}.hasOwnProperty,k=[],R=k.pop,D=k.push,O=k.push,L=k.slice,I=function(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",U="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",B="\\["+F+"*("+U+")(?:"+F+"*([*^$|!~]?=)"+F+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+U+"))|)"+F+"*\\]",G=":("+U+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",V=new RegExp(F+"+","g"),q=new RegExp("^"+F+"+|((?:^|[^\\\\])(?:\\\\.)*)"+F+"+$","g"),z=new RegExp("^"+F+"*,"+F+"*"),j=new RegExp("^"+F+"*([>+~]|"+F+")"+F+"*"),H=new RegExp(F+"|>"),X=new RegExp(G),W=new RegExp("^"+U+"$"),Y={ID:new RegExp("^#("+U+")"),CLASS:new RegExp("^\\.("+U+")"),TAG:new RegExp("^("+U+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+G),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},Z=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\([\\da-f]{1,6}
1"+F+"?|("+F+")|.)","ig"),it=function(t,e,i){var r="0x"+e-65536;return r!=r||i?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){p()},st=bt(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{O.apply(k=L.call(x.childNodes),x.childNodes)}catch(e){O={apply:k.length?function(t,e){D.apply(t,L.call(e))}:function(t,e){for(var i=t.length,r=0;t[i++]=e[r++];);t.length=i-1}}}function at(t,e,r,n){var o,a,l,u,c,d,g,v=e&&e.ownerDocument,w=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return r;if(!n&&((e?e.ownerDocument||e:x)!==f&&p(e),e=e||f,m)){if(11!==w&&(c=J.exec(t)))if(o=c[1]){if(9===w){if(!(l=e.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(v&&(l=v.getElementById(o))&&_(e,l)&&l.id===o)return r.push(l),r}else{if(c[2])return O.apply(r,e.getElementsByTagName(t)),r;if((o=c[3])&&i.getElementsByClassName&&e.getElementsByClassName)return O.apply(r,e.getElementsByClassName(o)),r}if(i.qsa&&!C[t+" "]&&(!y||!y.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(g=t,v=e,1===w&&H.test(t)){for((u=e.getAttribute("id"))?u=u.replace(rt,nt):e.setAttribute("id",u=b),a=(d=s(t)).length;a--;)d[a]="#"+u+" "+_t(d[a]);g=d.join(","),v=tt.test(t)&&gt(e.parentNode)||e}try{return O.apply(r,v.querySelectorAll(g)),r}catch(e){C(t,!0)}finally{u===b&&e.removeAttribute("id")}}}return h(t.replace(q,"$1"),e,r,n)}function ht(){var t=[];return function e(i,n){return t.push(i+" ")>r.cacheLength&&delete e[t.shift()],e[i+" "]=n}}function lt(t){return t[b]=!0,t}function ut(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var i=t.split("|"),n=i.length;n--;)r.attrHandle[i[n]]=e}function pt(t,e){var i=e&&t,r=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function yt(t){return lt(function(e){return e=+e,lt(function(i,r){for(var n,o=t([],i.length,e),s=o.length;s--;)i[n=o[s]]&&(i[n]=!(r[n]=i[n]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=at.support={},o=at.isXML=function(t){var e=(t.ownerDocument||t).documentElement;return!Z.test(t.namespaceURI||e&&e.nodeName||"HTML")},p=at.setDocument=function(t){var e,n,s=t?t.ownerDocument||t:x;return s!==f&&9===s.nodeType&&s.documentElement&&(d=(f=s).documentElement,m=!o(f),x!==f&&(n=f.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ot,!1):n.attachEvent&&n.attachEvent("onunload",ot)),i.attributes=ut(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=ut(function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=K.test(f.getElementsByClassName),i.getById=ut(function(t){return d.appendChild(t).id=b,!f.getElementsByName||!f.getElementsByName(b).length}),i.getById?(r.filter.ID=function(t){var e=t.replace(et,it);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i=e.getElementById(t);return i?[i]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,it);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i,r,n,o=e.getElementById(t);if(o){if((i=o.getAttributeNode("id"))&&i.value===t)return[o];for(n=e.getElementsByName(t),r=0;o=n[r++];)if((i=o.getAttributeNode("id"))&&i.value===t)return[o]}return[]}}),r.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,r=[],n=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[n++];)1===i.nodeType&&r.push(i);return r}return o},r.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],y=[],(i.qsa=K.test(f.querySelectorAll))&&(ut(function(t){d.appendChild(t).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+F+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||y.push("\\["+F+"*(?:value|"+N+")"),t.querySelectorAll("[id~="+b+"-]").length||y.push("~="),t.querySelectorAll(":checked").length||y.push(":checked"),t.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ut(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&y.push("name"+F+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),y.push(",.*:")})),(i.matchesSelector=K.test(v=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(t){i.disconnectedMatch=v.call(t,"*"),v.call(t,"[s!='']:x"),g.push("!=",G)}),y=y.length&&new RegExp(y.join("|")),g=g.length&&new RegExp(g.join("|")),e=K.test(d.compareDocumentPosition),_=e||K.test(d.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(i.contains?i.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1}
vendor: 4,763 bytes, line 1
1,A=e?function(t,e){if(t===e)return c=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===r?t===f||t.ownerDocument===x&&_(x,t)?-1:e===f||e.ownerDocument===x&&_(x,e)?1:u?I(u,t)-I(u,e):0:4&r?-1:1)}:function(t,e){if(t===e)return c=!0,0;var i,r=0,n=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!n||!o)return t===f?-1:e===f?1:n?-1:o?1:u?I(u,t)-I(u,e):0;if(n===o)return pt(t,e);for(i=t;i=i.parentNode;)s.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;s[r]===a[r];)r++;return r?pt(s[r],a[r]):s[r]===x?-1:a[r]===x?1:0}),f},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if((t.ownerDocument||t)!==f&&p(t),i.matchesSelector&&m&&!C[e+" "]&&(!g||!g.test(e))&&(!y||!y.test(e)))try{var r=v.call(t,e);if(r||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){C(e,!0)}return 0<at(e,f,null,[t]).length},at.contains=function(t,e){return(t.ownerDocument||t)!==f&&p(t),_(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!==f&&p(t);var n=r.attrHandle[e.toLowerCase()],o=n&&P.call(r.attrHandle,e.toLowerCase())?n(t,e,!m):void 0;return void 0!==o?o:i.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},at.escape=function(t){return(t+"").replace(rt,nt)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,r=[],n=0,o=0;if(c=!i.detectDuplicates,u=!i.sortStable&&t.slice(0),t.sort(A),c){for(;e=t[o++];)e===t[o]&&(n=r.push(o));for(;n--;)t.splice(r[n],1)}return u=null,t},n=at.getText=function(t){var e,i="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=n(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)i+=n(e);return i},(r=at.selectors={cacheLength:50,createPseudo:lt,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,it),t[3]=(t[3]||t[4]||t[5]||"").replace(et,it),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&X.test(i)&&(e=s(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,it).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=S[t+" "];return e||(e=new RegExp("(^|"+F+")"+t+"("+F+"|$)"))&&S(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(r){var n=at.attr(r,t);return null==n?"!="===e:!e||(n+="","="===e?n===i:"!="===e?n!==i:"^="===e?i&&0===n.indexOf(i):"*="===e?i&&-1<n.indexOf(i):"$="===e?i&&n.slice(-i.length)===i:"~="===e?-1<(" "+n.replace(V," ")+" ").indexOf(i):"|="===e&&(n===i||n.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,r,n){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===n?function(t){return!!t.parentNode}:function(e,i,h){var l,u,c,p,f,d,m=o!==s?"nextSibling":"previousSibling",y=e.parentNode,g=a&&e.nodeName.toLowerCase(),v=!h&&!a,_=!1;if(y){if(o){for(;m;){for(p=e;p=p[m];)if(a?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;d=m="only"===t&&!d&&"nextSibling"}return!0}if(d=[s?y.firstChild:y.lastChild],s&&v){for(_=(f=(l=(u=(c=(p=y)[b]||(p[b]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]||[])[0]===w&&l[1])&&l[2],p=f&&y.childNodes[f];p=++f&&p&&p[m]||(_=f=0)||d.pop();)if(1===p.nodeType&&++_&&p===e){u[t]=[w,f,_];break}}else if(v&&(_=f=(l=(u=(c=(p=e)[b]||(p[b]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]||[])[0]===w&&l[1]),!1===_)for(;(p=++f&&p&&p[m]||(_=f=0)||d.pop())&&((a?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++_||(v&&((u=(c=p[b]||(p[b]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]=[w,_]),p!==e)););return(_-=n)===r||_%r==0&&0<=_/r}}},PSEUDO:function(t,e){var i,n=r.pseudos[t]||r.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return n[b]?n(e):1<n.length?(i=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?lt(function(t,i){for(var r,o=n(t,e),s=o.length;s--;)t[r=I(t,o[s])]=!(i[r]=o[s])}):function(t){return n(t,0,i)}):n}},pseudos:{not:lt(function(t){var e=[],i=[],r=a(t.replace(q,"$1"));
vendor: 29,263 bytes, line 1
1return r[b]?lt(function(t,e,i,n){for(var o,s=r(t,null,n,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,n,o){return e[0]=t,r(e,null,o,i),e[0]=null,!i.pop()}}),has:lt(function(t){return function(e){return 0<at(t,e).length}}),contains:lt(function(t){return t=t.replace(et,it),function(e){return-1<(e.textContent||n(e)).indexOf(t)}}),lang:lt(function(t){return W.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,it).toLowerCase(),function(e){var i;do{if(i=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return $.test(t.nodeName)},input:function(t){return Q.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:yt(function(){return[0]}),last:yt(function(t,e){return[e-1]}),eq:yt(function(t,e,i){return[i<0?i+e:i]}),even:yt(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:yt(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:yt(function(t,e,i){for(var r=i<0?i+e:e<i?e:i;0<=--r;)t.push(r);return t}),gt:yt(function(t,e,i){for(var r=i<0?i+e:i;++r<e;)t.push(r);return t})}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=ft(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=dt(e);function vt(){}function _t(t){for(var e=0,i=t.length,r="";e<i;e++)r+=t[e].value;return r}function bt(t,e,i){var r=e.dir,n=e.next,o=n||r,s=i&&"parentNode"===o,a=T++;return e.first?function(e,i,n){for(;e=e[r];)if(1===e.nodeType||s)return t(e,i,n);return!1}:function(e,i,h){var l,u,c,p=[w,a];if(h){for(;e=e[r];)if((1===e.nodeType||s)&&t(e,i,h))return!0}else for(;e=e[r];)if(1===e.nodeType||s)if(u=(c=e[b]||(e[b]={}))[e.uniqueID]||(c[e.uniqueID]={}),n&&n===e.nodeName.toLowerCase())e=e[r]||e;else{if((l=u[o])&&l[0]===w&&l[1]===a)return p[2]=l[2];if((u[o]=p)[2]=t(e,i,h))return!0}return!1}}function xt(t){return 1<t.length?function(e,i,r){for(var n=t.length;n--;)if(!t[n](e,i,r))return!1;return!0}:t[0]}function wt(t,e,i,r,n){for(var o,s=[],a=0,h=t.length,l=null!=e;a<h;a++)(o=t[a])&&(i&&!i(o,r,n)||(s.push(o),l&&e.push(a)));return s}function Tt(t,e,i,r,n,o){return r&&!r[b]&&(r=Tt(r)),n&&!n[b]&&(n=Tt(n,o)),lt(function(o,s,a,h){var l,u,c,p=[],f=[],d=s.length,m=o||function(t,e,i){for(var r=0,n=e.length;r<n;r++)at(t,e[r],i);return i}(e||"*",a.nodeType?[a]:a,[]),y=!t||!o&&e?m:wt(m,p,t,a,h),g=i?n||(o?t:d||r)?[]:s:y;if(i&&i(y,g,a,h),r)for(l=wt(g,f),r(l,[],a,h),u=l.length;u--;)(c=l[u])&&(g[f[u]]=!(y[f[u]]=c));if(o){if(n||t){if(n){for(l=[],u=g.length;u--;)(c=g[u])&&l.push(y[u]=c);n(null,g=[],l,h)}for(u=g.length;u--;)(c=g[u])&&-1<(l=n?I(o,c):p[u])&&(o[l]=!(s[l]=c))}}else g=wt(g===s?g.splice(d,g.length):g),n?n(null,s,g,h):O.apply(s,g)})}function St(t){for(var e,i,n,o=t.length,s=r.relative[t[0].type],a=s||r.relative[" "],h=s?1:0,u=bt(function(t){return t===e},a,!0),c=bt(function(t){return-1<I(e,t)},a,!0),p=[function(t,i,r){var n=!s&&(r||i!==l)||((e=i).nodeType?u(t,i,r):c(t,i,r));return e=null,n}];h<o;h++)if(i=r.relative[t[h].type])p=[bt(xt(p),i)];else{if((i=r.filter[t[h].type].apply(null,t[h].matches))[b]){for(n=++h;n<o&&!r.relative[t[n].type];n++);return Tt(1<h&&xt(p),1<h&&_t(t.slice(0,h-1).concat({value:" "===t[h-2].type?"*":""})).replace(q,"$1"),i,h<n&&St(t.slice(h,n)),n<o&&St(t=t.slice(n)),n<o&&_t(t))}p.push(i)}return xt(p)}return vt.prototype=r.filters=r.pseudos,r.setFilters=new vt,s=at.tokenize=function(t,e){var i,n,o,s,a,h,l,u=M[t+" "];if(u)return e?0:u.slice(0);for(a=t,h=[],l=r.preFilter;a;){for(s in i&&!(n=z.exec(a))||(n&&(a=a.slice(n[0].length)||a),h.push(o=[])),i=!1,(n=j.exec(a))&&(i=n.shift(),o.push({value:i,type:n[0].replace(q," ")}),a=a.slice(i.length)),r.filter)!(n=Y[s].exec(a))||l[s]&&!(n=l[s](n))||(i=n.shift(),o.push({value:i,type:s,matches:n}),a=a.slice(i.length));if(!i)break}return e?a.length:a?at.error(t):M(t,h).slice(0)},a=at.compile=function(t,e){var i,n,o,a,h,u,c=[],d=[],y=E[t+" "];if(!y){for(e||(e=s(t)),i=e.length;i--;)(y=St(e[i]))[b]?c.push(y):d.push(y);(y=E(t,(n=d,a=0<(o=c).length,h=0<n.length,u=function(t,e,i,s,u){var c,d,y,g=0,v="0",_=t&&[],b=[],x=l,T=t||h&&r.find.TAG("*",u),S=w+=null==x?1:Math.random()||.1,M=T.length;for(u&&(l=e===f||e||u);v!==M&&null!=(c=T[v]);v++){if(h&&c){for(d=0,e||c.ownerDocument===f||(p(c),i=!m);y=n[d++];)if(y(c,e||f,i)){s.push(c);break}u&&(w=S)}a&&((c=!y&&c)&&g--,t&&_.push(c))}if(g+=v,a&&v!==g){for(d=0;y=o[d++];)y(_,b,e,i);if(t){if(0<g)for(;v--;)_[v]||b[v]||(b[v]=R.call(s));b=wt(b)}O.apply(s,b),u&&!t&&0<b.length&&1<g+o.length&&at.uniqueSort(s)}return u&&(w=S,l=x),_},a?lt(u):u))).selector=t}return y},h=at.select=function(t,e,i,n){var o,h,l,u,c,p="function"==typeof t&&t,f=!n&&s(t=p.selector||t);if(i=i||[],1===f.length){if(2<(h=f[0]=f[0].slice(0)).length&&"ID"===(l=h[0]).type&&9===e.nodeType&&m&&r.relative[h[1].type]){if(!(e=(r.find.ID(l.matches[0].replace(et,it),e)||[])[0]))return i;p&&(e=e.parentNode),t=t.slice(h.shift().value.length)}for(o=Y.needsContext.test(t)?0:h.length;o--&&!r.relative[u=(l=h[o]).type];)if((c=r.find[u])&&(n=c(l.matches[0].replace(et,it),tt.test(h[0].type)&&gt(e.parentNode)||e))){if(h.splice(o,1),!(t=n.length&&_t(h)))return O.apply(i,n),i;break}}return(p||a(t,f))(n,e,!m,i,!e||tt.test(t)&&gt(e.parentNode)||e),i},i.sortStable=b.split("").sort(A).join("")===b,i.detectDuplicates=!!c,p(),i.sortDetached=ut(function(t){return 1&t.compareDocumentPosition(f.createElement("fieldset"))}),ut(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),i.attributes&&ut(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),ut(function(t){return null==t.getAttribute("disabled")})||ct(N,function(t,e,i){var r;if(!i)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),at}(t);x.find=S,x.expr=S.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=S.uniqueSort,x.text=S.getText,x.isXMLDoc=S.isXML,x.contains=S.contains,x.escapeSelector=S.escape;var M=function(t,e,i){for(var r=[],n=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(n&&x(t).is(i))break;r.push(t)}return r},E=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},C=x.expr.match.needsContext;function A(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var P=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function k(t,e,i){return m(e)?x.grep(t,function(t,r){return!!e.call(t,r,t)!==i}):e.nodeType?x.grep(t,function(t){return t===e!==i}):"string"!=typeof e?x.grep(t,function(t){return-1<h.call(e,t)!==i}):x.filter(e,t,i)}x.filter=function(t,e,i){var r=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?x.find.matchesSelector(r,t)?[r]:[]:x.find.matches(t,x.grep(e,function(t){return 1===t.nodeType}))},x.fn.extend({find:function(t){var e,i,r=this.length,n=this;if("string"!=typeof t)return this.pushStack(x(t).filter(function(){for(e=0;e<r;e++)if(x.contains(n[e],this))return!0}));for(i=this.pushStack([]),e=0;e<r;e++)x.find(t,n[e],i);return 1<r?x.uniqueSort(i):i},filter:function(t){return this.pushStack(k(this,t||[],!1))},not:function(t){return this.pushStack(k(this,t||[],!0))},is:function(t){return!!k(this,"string"==typeof t&&C.test(t)?x(t):t||[],!1).length}});var R,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||R,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:D.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(x.merge(this,x.parseHTML(n[1],(e=e instanceof x?e[0]:e)&&e.nodeType?e.ownerDocument||e:r,!0)),P.test(n[1])&&x.isPlainObject(e))for(n in e)m(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=r.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):m(t)?void 0!==i.ready?i.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,R=x(r);var O=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function I(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),i=e.length;return this.filter(function(){for(var t=0;t<i;t++)if(x.contains(this,e[t]))return!0})},closest:function(t,e){var i,r=0,n=this.length,o=[],s="string"!=typeof t&&x(t);if(!C.test(t))for(;r<n;r++)for(i=this[r];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?-1<s.index(i):1===i.nodeType&&x.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(1<o.length?x.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?h.call(x(t),this[0]):h.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return M(t,"parentNode")},parentsUntil:function(t,e,i){return M(t,"parentNode",i)},next:function(t){return I(t,"nextSibling")},prev:function(t){return I(t,"previousSibling")},nextAll:function(t){return M(t,"nextSibling")},prevAll:function(t){return M(t,"previousSibling")},nextUntil:function(t,e,i){return M(t,"nextSibling",i)},prevUntil:function(t,e,i){return M(t,"previousSibling",i)},siblings:function(t){return E((t.parentNode||{}).firstChild,t)},children:function(t){return E(t.firstChild)},contents:function(t){return void 0!==t.contentDocument?t.contentDocument:(A(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},function(t,e){x.fn[t]=function(i,r){var n=x.map(this,e,i);return"Until"!==t.slice(-5)&&(r=i),r&&"string"==typeof r&&(n=x.filter(r,n)),1<this.length&&(L[t]||x.uniqueSort(n),O.test(t)&&n.reverse()),this.pushStack(n)}});var N=/[^\x20\t\r\n\f]+/g;function F(t){return t}function U(t){throw t}function B(t,e,i,r){var n;try{t&&m(n=t.promise)?n.call(t).done(e).fail(i):t&&m(n=t.then)?n.call(t,e,i):e.apply(void 0,[t].slice(r))}catch(t){i.apply(void 0,[t])}}x.Callbacks=function(t){var e;t="string"==typeof t?(e={},x.each(t.match(N)||[],function(t,i){e[i]=!0}),e):x.extend({},t);var i,r,n,o,s=[],a=[],h=-1,l=function(){for(o=o||t.once,n=i=!0;a.length;h=-1)for(r=a.shift();++h<s.length;)!1===s[h].apply(r[0],r[1])&&t.stopOnFalse&&(h=s.length,r=!1);t.memory||(r=!1),i=!1,o&&(s=r?[]:"")},u={add:function(){return s&&(r&&!i&&(h=s.length-1,a.push(r)),function e(i){x.each(i,function(i,r){m(r)?t.unique&&u.has(r)||s.push(r):r&&r.length&&"string"!==_(r)&&e(r)})}(arguments),r&&!i&&l()),this},remove:function(){return x.each(arguments,function(t,e){for(var i;-1<(i=x.inArray(e,s,i));)s.splice(i,1),i<=h&&h--}),this},has:function(t){return t?-1<x.inArray(t,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=r="",this},disabled:function(){return!s},lock:function(){return o=a=[],r||i||(s=r=""),this},locked:function(){return!!o},fireWith:function(t,e){return o||(e=[t,(e=e||[]).slice?e.slice():e],a.push(e),i||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},x.extend({Deferred:function(e){var i=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],r="pending",n={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return n.then(null,t)},pipe:function(){var t=arguments;return x.Deferred(function(e){x.each(i,function(i,r){var n=m(t[r[4]])&&t[r[4]];o[r[1]](function(){var t=n&&n.apply(this,arguments);t&&m(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[r[0]+"With"](this,n?[t]:arguments)})}),t=null}).promise()},then:function(e,r,n){var o=0;function s(e,i,r,n){return function(){var a=this,h=arguments,l=function(){var t,l;if(!(e<o)){if((t=r.apply(a,h))===i.promise())throw new TypeError("Thenable self-resolution");m(l=t&&("object"==typeof t||"function"==typeof t)&&t.then)?n?l.call(t,s(o,i,F,n),s(o,i,U,n)):l.call(t,s(++o,i,F,n),s(o,i,U,n),s(o,i,F,i.notifyWith)):(r!==F&&(a=void 0,h=[t]),(n||i.resolveWith)(a,h))}},u=n?l:function(){try{l()}catch(l){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(l,u.stackTrace),o<=e+1&&(r!==U&&(a=void 0,h=[l]),i.rejectWith(a,h))}};e?u():(x.Deferred.getStackHook&&(u.stackTrace=x.Deferred.getStackHook()),t.setTimeout(u))}}return x.Deferred(function(t){i[0][3].add(s(0,t,m(n)?n:F,t.notifyWith)),i[1][3].add(s(0,t,m(e)?e:F)),i[2][3].add(s(0,t,m(r)?r:U))}).promise()},promise:function(t){return null!=t?x.extend(t,n):n}},o={};return x.each(i,function(t,e){var s=e[2],a=e[5];n[e[1]]=s.add,a&&s.add(function(){r=a},i[3-t][2].disable,i[3-t][3].disable,i[0][2].lock,i[0][3].lock),s.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=s.fireWith}),n.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,i=e,r=Array(i),n=o.call(arguments),s=x.Deferred(),a=function(t){return function(i){r[t]=this,n[t]=1<arguments.length?o.call(arguments):i,--e||s.resolveWith(r,n)}};if(e<=1&&(B(t,s.done(a(i)).resolve,s.reject,!e),"pending"===s.state()||m(n[i]&&n[i].then)))return s.then();for(;i--;)B(n[i],a(i),s.reject);return s.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&G.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},x.readyException=function(e){t.setTimeout(function(){throw e})};var V=x.Deferred();function q(){r.removeEventListener("DOMContentLoaded",q),t.removeEventListener("load",q),x.ready()}x.fn.ready=function(t){return V.then(t).catch(function(t){x.readyException(t)}),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0)!==t&&0<--x.readyWait||V.resolveWith(r,[x])}}),x.ready.then=V.then,"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?t.setTimeout(x.ready):(r.addEventListener("DOMContentLoaded",q),t.addEventListener("load",q));var z=function(t,e,i,r,n,o,s){var a=0,h=t.length,l=null==i;if("object"===_(i))for(a in n=!0,i)z(t,e,a,i[a],!0,o,s);else if(void 0!==r&&(n=!0,m(r)||(s=!0),l&&(s?(e.call(t,r),e=null):(l=e,e=function(t,e,i){return l.call(x(t),i)})),e))for(;a<h;a++)e(t[a],i,s?r:r.call(t[a],a,e(t[a],i)));return n?t:l?e.call(t):h?e(t[0],i):o},j=/^-ms-/,H=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function W(t){return t.replace(j,"ms-").replace(H,X)}var Y=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function Z(){this.expando=x.expando+Z.uid++}Z.uid=1,Z.prototype={cache:function(t){var e=t[this.expando];return e||(e={},Y(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var r,n=this.cache(t);if("string"==typeof e)n[W(e)]=i;else for(r in e)n[W(r)]=e[r];return n},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][W(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,r=t[this.expando];if(void 0!==r){if(void 0!==e){i=(e=Array.isArray(e)?e.map(W):(e=W(e))in r?[e]:e.match(N)||[]).length;for(;i--;)delete r[e[i]]}(void 0===e||x.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!x.isEmptyObject(e)}};var Q=new Z,$=new Z,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,J=/[A-Z]/g;function tt(t,e,i){var r,n;if(void 0===i&&1===t.nodeType)if(r="data-"+e.replace(J,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(r))){try{i="true"===(n=i)||"false"!==n&&("null"===n?null:n===+n+""?+n:K.test(n)?JSON.parse(n):n)}catch(t){}$.set(t,e,i)}else i=void 0;return i}x.extend({hasData:function(t){return $.hasData(t)||Q.hasData(t)},data:function(t,e,i){return $.access(t,e,i)},removeData:function(t,e){$.remove(t,e)},_data:function(t,e,i){return Q.access(t,e,i)},_removeData:function(t,e){Q.remove(t,e)}}),x.fn.extend({data:function(t,e){var i,r,n,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(n=$.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&0===(r=s[i].name).indexOf("data-")&&(r=W(r.slice(5)),tt(o,r,n[r]));Q.set(o,"hasDataAttrs",!0)}return n}return"object"==typeof t?this.each(function(){$.set(this,t)}):z(this,function(e){var i;if(o&&void 0===e)return void 0!==(i=$.get(o,t))?i:void 0!==(i=tt(o,t))?i:void 0;this.each(function(){$.set(this,t,e)})},null,e,1<arguments.length,null,!0)},removeData:function(t){return this.each(function(){$.remove(this,t)})}}),x.extend({queue:function(t,e,i){var r;if(t)return r=Q.get(t,e=(e||"fx")+"queue"),i&&(!r||Array.isArray(i)?r=Q.access(t,e,x.makeArray(i)):r.push(i)),r||[]},dequeue:function(t,e){var i=x.queue(t,e=e||"fx"),r=i.length,n=i.shift(),o=x._queueHooks(t,e);"inprogress"===n&&(n=i.shift(),r--),n&&("fx"===e&&i.unshift("inprogress"),delete o.stop,n.call(t,function(){x.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return Q.get(t,i)||Q.access(t,i,{empty:x.Callbacks("once memory").add(function(){Q.remove(t,[e+"queue",i])})})}}),x.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?x.queue(this[0],t):void 0===e?this:this.each(function(){var i=x.queue(this,t,e);x._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&x.dequeue(this,t)})},dequeue:function(t){return this.each(function(){x.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,r=1,n=x.Deferred(),o=this,s=this.length,a=function(){--r||n.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(i=Q.get(o[s],t+"queueHooks"))&&i.empty&&(r++,i.empty.add(a));return a(),n.promise(e)}});var et=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+et+")([a-z%]*)$","i"),rt=["Top","Right","Bottom","Left"],nt=r.documentElement,ot=function(t){return x.contains(t.ownerDocument,t)},st={composed:!0};nt.attachShadow&&(ot=function(t){return x.contains(t.ownerDocument,t)||t.getRootNode(st)===t.ownerDocument});var at=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ot(t)&&"none"===x.css(t,"display")},ht=function(t,e,i,r){var n,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];for(o in n=i.apply(t,r||[]),e)t.style[o]=s[o];return n};function lt(t,e,i,r){var n,o,s=20,a=r?function(){return r.cur()}:function(){return x.css(t,e,"")},h=a(),l=i&&i[3]||(x.cssNumber[e]?"":"px"),u=t.nodeType&&(x.cssNumber[e]||"px"!==l&&+h)&&it.exec(x.css(t,e));if(u&&u[3]!==l){for(l=l||u[3],u=+(h/=2)||1;s--;)x.style(t,e,u+l),(1-o)*(1-(o=a()/h||.5))<=0&&(s=0),u/=o;x.style(t,e,(u*=2)+l),i=i||[]}return i&&(u=+u||+h||0,n=i[1]?u+(i[1]+1)*i[2]:+i[2],r&&(r.unit=l,r.start=u,r.end=n)),n}var ut={};function ct(t,e){for(var i,r,n,o,s,a,h,l=[],u=0,c=t.length;u<c;u++)(r=t[u]).style&&(i=r.style.display,e?("none"===i&&(l[u]=Q.get(r,"display")||null,l[u]||(r.style.display="")),""===r.style.display&&at(r)&&(l[u]=(h=s=o=void 0,s=(n=r).ownerDocument,(h=ut[a=n.nodeName])||(o=s.body.appendChild(s.createElement(a)),h=x.css(o,"display"),o.parentNode.removeChild(o),"none"===h&&(h="block"),ut[a]=h)))):"none"!==i&&(l[u]="none",Q.set(r,"display",i)));for(u=0;u<c;u++)null!=l[u]&&(t[u].style.display=l[u]);return t}x.fn.extend({show:function(){return ct(this,!0)},hide:function(){return ct(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){at(this)?x(this).show():x(this).hide()})}});var pt=/^(?:checkbox|radio)$/i,ft=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,dt=/^$|^module$|\/(?:java|ecma)script/i,mt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function yt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&A(t,e)?x.merge([t],i):i}function gt(t,e){for(var i=0,r=t.length;i<r;i++)Q.set(t[i],"globalEval",!e||Q.get(e[i],"globalEval"))}mt.optgroup=mt.option,mt.tbody=mt.tfoot=mt.colgroup=mt.caption=mt.thead,mt.th=mt.td;var vt,_t,bt=/<|&#?\w+;/;function xt(t,e,i,r,n){for(var o,s,a,h,l,u,c=e.createDocumentFragment(),p=[],f=0,d=t.length;f<d;f++)if((o=t[f])||0===o)if("object"===_(o))x.merge(p,o.nodeType?[o]:o);else if(bt.test(o)){for(s=s||c.appendChild(e.createElement("div")),a=(ft.exec(o)||["",""])[1].toLowerCase(),s.innerHTML=(h=mt[a]||mt._default)[1]+x.htmlPrefilter(o)+h[2],u=h[0];u--;)s=s.lastChild;x.merge(p,s.childNodes),(s=c.firstChild).textContent=""}else p.push(e.createTextNode(o));for(c.textContent="",f=0;o=p[f++];)if(r&&-1<x.inArray(o,r))n&&n.push(o);else if(l=ot(o),s=yt(c.appendChild(o),"script"),l&&gt(s),i)for(u=0;o=s[u++];)dt.test(o.type||"")&&i.push(o);return c}vt=r.createDocumentFragment().appendChild(r.createElement("div")),(_t=r.createElement("input")).setAttribute("type","radio"),_t.setAttribute("checked","checked"),_t.setAttribute("name","t"),vt.appendChild(_t),d.checkClone=vt.cloneNode(!0).cloneNode(!0).lastChild.checked,vt.innerHTML="<textarea>x</textarea>",d.noCloneChecked=!!vt.cloneNode(!0).lastChild.defaultValue;var wt=/^key/,Tt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,St=/^([^.]*)(?:\.(.+)|)/;function Mt(){return!0}function Et(){return!1}function Ct(t,e){return t===function(){try{return r.activeElement}catch(t){}}()==("focus"===e)}function At(t,e,i,r,n,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof i&&(r=r||i,i=void 0),e)At(t,a,i,r,e[a],o);return t}if(null==r&&null==n?(n=i,r=i=void 0):null==n&&("string"==typeof i?(n=r,r=void 0):(n=r,r=i,i=void 0)),!1===n)n=Et;else if(!n)return t;return 1===o&&(s=n,(n=function(t){return x().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=x.guid++)),t.each(function(){x.event.add(this,e,n,r,i)})}function Pt(t,e,i){i?(Q.set(t,e,!1),x.event.add(t,e,{namespace:!1,handler:function(t){var r,n,s=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(s)(x.event.special[e]||{}).delegateType&&t.stopPropagation();else if(s=o.call(arguments),Q.set(this,e,s),r=i(this,e),this[e](),s!==(n=Q.get(this,e))||r?Q.set(this,e,!1):n=void 0,s!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else s&&(Q.set(this,e,x.event.trigger(x.extend(s.shift(),x.Event.prototype),s,this)),t.stopImmediatePropagation())}})):x.event.add(t,e,Mt)}x.event={global:{},add:function(t,e,i,r,n){var o,s,a,h,l,u,c,p,f,d,m,y=Q.get(t);if(y)for(i.handler&&(i=(o=i).handler,n=o.selector),n&&x.find.matchesSelector(nt,n),i.guid||(i.guid=x.guid++),(h=y.events)||(h=y.events={}),(s=y.handle)||(s=y.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(N)||[""]).length;l--;)f=m=(a=St.exec(e[l])||[])[1],d=(a[2]||"").split(".").sort(),f&&(c=x.event.special[f]||{},c=x.event.special[f=(n?c.delegateType:c.bindType)||f]||{},u=x.extend({type:f,origType:m,data:r,handler:i,guid:i.guid,selector:n,needsContext:n&&x.expr.match.needsContext.test(n),namespace:d.join(".")},o),(p=h[f])||((p=h[f]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,r,d,s)||t.addEventListener&&t.addEventListener(f,s)),c.add&&(c.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),n?p.splice(p.delegateCount++,0,u):p.push(u),x.event.global[f]=!0)},remove:function(t,e,i,r,n){var o,s,a,h,l,u,c,p,f,d,m,y=Q.hasData(t)&&Q.get(t);if(y&&(h=y.events)){for(l=(e=(e||"").match(N)||[""]).length;l--;)if(f=m=(a=St.exec(e[l])||[])[1],d=(a[2]||"").split(".").sort(),f){for(c=x.event.special[f]||{},p=h[f=(r?c.delegateType:c.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)u=p[o],!n&&m!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(p.splice(o,1),u.selector&&p.delegateCount--,c.remove&&c.remove.call(t,u));s&&!p.length&&(c.teardown&&!1!==c.teardown.call(t,d,y.handle)||x.removeEvent(t,f,y.handle),delete h[f])}else for(f in h)x.event.remove(t,f+e[l],i,r,!0);x.isEmptyObject(h)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,i,r,n,o,s,a=x.event.fix(t),h=new Array(arguments.length),l=(Q.get(this,"events")||{})[a.type]||[],u=x.event.special[a.type]||{};for(h[0]=a,e=1;e<arguments.length;e++)h[e]=arguments[e];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=x.event.handlers.call(this,a,l),e=0;(n=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=n.elem,i=0;(o=n.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==o.namespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(r=((x.event.special[o.origType]||{}).handle||o.handler).apply(n.elem,h))&&!1===(a.result=r)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(t,e){var i,r,n,o,s,a=[],h=e.delegateCount,l=t.target;if(h&&l.nodeType&&!("click"===t.type&&1<=t.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],s={},i=0;i<h;i++)void 0===s[n=(r=e[i]).selector+" "]&&(s[n]=r.needsContext?-1<x(n,this).index(l):x.find(n,this,null,[l]).length),s[n]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,h<e.length&&a.push({elem:l,handlers:e.slice(h)}),a},addProp:function(t,e){Object.defineProperty(x.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[x.expando]?t:new x.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return pt.test(e.type)&&e.click&&A(e,"input")&&void 0===Q.get(e,"click")&&Pt(e,"click",Mt),!1},trigger:function(t){var e=this||t;return pt.test(e.type)&&e.click&&A(e,"input")&&void 0===Q.get(e,"click")&&Pt(e,"click"),!0},_default:function(t){var e=t.target;return pt.test(e.type)&&e.click&&A(e,"input")&&Q.get(e,"click")||A(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},x.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},x.Event=function(t,e){if(!(this instanceof x.Event))return new x.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Mt:Et,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&x.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:Et,isPropagationStopped:Et,isImmediatePropagationStopped:Et,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Mt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Mt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Mt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},x.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&wt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&Tt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},function(t,e){x.event.special[t]={setup:function(){return Pt(this,t,Ct),!1},trigger:function(){return Pt(this,t),!0},delegateType:e}}
vendor: 4,680 bytes, line 1
1),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){x.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,r=t.relatedTarget,n=t.handleObj;return r&&(r===this||x.contains(this,r))||(t.type=n.origType,i=n.handler.apply(this,arguments),t.type=e),i}}}),x.fn.extend({on:function(t,e,i,r){return At(this,t,e,i,r)},one:function(t,e,i,r){return At(this,t,e,i,r,1)},off:function(t,e,i){var r,n;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,x(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(n in t)this.off(n,e,t[n]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=Et),this.each(function(){x.event.remove(this,t,i,e)})}});var kt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Rt=/<script|<style|<link/i,Dt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Lt(t,e){return A(t,"table")&&A(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var i,r,n,o,s,a,h,l;if(1===e.nodeType){if(Q.hasData(t)&&(o=Q.access(t),s=Q.set(e,o),l=o.events))for(n in delete s.handle,s.events={},l)for(i=0,r=l[n].length;i<r;i++)x.event.add(e,n,l[n][i]);$.hasData(t)&&(a=$.access(t),h=x.extend({},a),$.set(e,h))}}function Ut(t,e,i,r){e=s.apply([],e);var n,o,a,h,l,u,c=0,p=t.length,f=p-1,y=e[0],g=m(y);if(g||1<p&&"string"==typeof y&&!d.checkClone&&Dt.test(y))return t.each(function(n){var o=t.eq(n);g&&(e[0]=y.call(this,n,o.html())),Ut(o,e,i,r)});if(p&&(o=(n=xt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===n.childNodes.length&&(n=o),o||r)){for(h=(a=x.map(yt(n,"script"),It)).length;c<p;c++)l=n,c!==f&&(l=x.clone(l,!0,!0),h&&x.merge(a,yt(l,"script"))),i.call(t[c],l,c);if(h)for(u=a[a.length-1].ownerDocument,x.map(a,Nt),c=0;c<h;c++)dt.test((l=a[c]).type||"")&&!Q.access(l,"globalEval")&&x.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?x._evalUrl&&!l.noModule&&x._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")}):v(l.textContent.replace(Ot,""),l,u))}return t}function Bt(t,e,i){for(var r,n=e?x.filter(e,t):t,o=0;null!=(r=n[o]);o++)i||1!==r.nodeType||x.cleanData(yt(r)),r.parentNode&&(i&&ot(r)&&gt(yt(r,"script")),r.parentNode.removeChild(r));return t}x.extend({htmlPrefilter:function(t){return t.replace(kt,"<$1></$2>")},clone:function(t,e,i){var r,n,o,s,a,h,l,u=t.cloneNode(!0),c=ot(t);if(!(d.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(s=yt(u),r=0,n=(o=yt(t)).length;r<n;r++)a=o[r],"input"===(l=(h=s[r]).nodeName.toLowerCase())&&pt.test(a.type)?h.checked=a.checked:"input"!==l&&"textarea"!==l||(h.defaultValue=a.defaultValue);if(e)if(i)for(o=o||yt(t),s=s||yt(u),r=0,n=o.length;r<n;r++)Ft(o[r],s[r]);else Ft(t,u);return 0<(s=yt(u,"script")).length&&gt(s,!c&&yt(t,"script")),u},cleanData:function(t){for(var e,i,r,n=x.event.special,o=0;void 0!==(i=t[o]);o++)if(Y(i)){if(e=i[Q.expando]){if(e.events)for(r in e.events)n[r]?x.event.remove(i,r):x.removeEvent(i,r,e.handle);i[Q.expando]=void 0}i[$.expando]&&(i[$.expando]=void 0)}}}),x.fn.extend({detach:function(t){return Bt(this,t,!0)},remove:function(t){return Bt(this,t)},text:function(t){return z(this,function(t){return void 0===t?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Ut(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Lt(this,t).appendChild(t)})},prepend:function(){return Ut(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Lt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Ut(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Ut(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return x.clone(this,t,e)})},html:function(t){return z(this,function(t){var e=this[0]||{},i=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Rt.test(t)&&!mt[(ft.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;i<r;i++)1===(e=this[i]||{}
vendor: 8,547 bytes, line 1
1).nodeType&&(x.cleanData(yt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Ut(this,arguments,function(e){var i=this.parentNode;x.inArray(this,t)<0&&(x.cleanData(yt(this)),i&&i.replaceChild(e,this))},t)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){x.fn[t]=function(t){for(var i,r=[],n=x(t),o=n.length-1,s=0;s<=o;s++)i=s===o?this:this.clone(!0),x(n[s])[e](i),a.apply(r,i.get());return this.pushStack(r)}});var Gt=new RegExp("^("+et+")(?!px)[a-z%]+$","i"),Vt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},qt=new RegExp(rt.join("|"),"i");function zt(t,e,i){var r,n,o,s,a=t.style;return(i=i||Vt(t))&&(""!==(s=i.getPropertyValue(e)||i[e])||ot(t)||(s=x.style(t,e)),!d.pixelBoxStyles()&&Gt.test(s)&&qt.test(e)&&(r=a.width,n=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=r,a.minWidth=n,a.maxWidth=o)),void 0!==s?s+"":s}function jt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",nt.appendChild(l).appendChild(u);var e=t.getComputedStyle(u);n="1%"!==e.top,h=12===i(e.marginLeft),u.style.right="60%",a=36===i(e.right),o=36===i(e.width),u.style.position="absolute",s=12===i(u.offsetWidth/3),nt.removeChild(l),u=null}}function i(t){return Math.round(parseFloat(t))}var n,o,s,a,h,l=r.createElement("div"),u=r.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===u.style.backgroundClip,x.extend(d,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),h},scrollboxSize:function(){return e(),s}}))}();var Ht=["Webkit","Moz","ms"],Xt=r.createElement("div").style,Wt={};function Yt(t){return x.cssProps[t]||Wt[t]||(t in Xt?t:Wt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Ht.length;i--;)if((t=Ht[i]+e)in Xt)return t}(t)||t)}var Zt=/^(none|table(?!-c[ea]).+)/,Qt=/^--/,$t={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:"0",fontWeight:"400"};function Jt(t,e,i){var r=it.exec(e);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):e}function te(t,e,i,r,n,o){var s="width"===e?1:0,a=0,h=0;if(i===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(h+=x.css(t,i+rt[s],!0,n)),r?("content"===i&&(h-=x.css(t,"padding"+rt[s],!0,n)),"margin"!==i&&(h-=x.css(t,"border"+rt[s]+"Width",!0,n))):(h+=x.css(t,"padding"+rt[s],!0,n),"padding"!==i?h+=x.css(t,"border"+rt[s]+"Width",!0,n):a+=x.css(t,"border"+rt[s]+"Width",!0,n));return!r&&0<=o&&(h+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-h-a-.5))||0),h}function ee(t,e,i){var r=Vt(t),n=(!d.boxSizingReliable()||i)&&"border-box"===x.css(t,"boxSizing",!1,r),o=n,s=zt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Gt.test(s)){if(!i)return s;s="auto"}return(!d.boxSizingReliable()&&n||"auto"===s||!parseFloat(s)&&"inline"===x.css(t,"display",!1,r))&&t.getClientRects().length&&(n="border-box"===x.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+te(t,e,i||(n?"border":"content"),o,r,s)+"px"}function ie(t,e,i,r,n){return new ie.prototype.init(t,e,i,r,n)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=zt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,i,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var n,o,s,a=W(e),h=Qt.test(e),l=t.style;if(h||(e=Yt(a)),s=x.cssHooks[e]||x.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(n=s.get(t,!1,r))?n:l[e];"string"==(o=typeof i)&&(n=it.exec(i))&&n[1]&&(i=lt(t,e,n),o="number"),null!=i&&i==i&&("number"!==o||h||(i+=n&&n[3]||(x.cssNumber[a]?"":"px")),d.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,r))||(h?l.setProperty(e,i):l[e]=i))}},css:function(t,e,i,r){var n,o,s,a=W(e);return Qt.test(e)||(e=Yt(a)),(s=x.cssHooks[e]||x.cssHooks[a])&&"get"in s&&(n=s.get(t,!0,i)),void 0===n&&(n=zt(t,e,r)),"normal"===n&&e in Kt&&(n=Kt[e]),""===i||i?(o=parseFloat(n),!0===i||isFinite(o)?o||0:n):n}}),x.each(["height","width"],function(t,e){x.cssHooks[e]={get:function(t,i,r){if(i)return!Zt.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ee(t,e,r):ht(t,$t,function(){return ee(t,e,r)})},set:function(t,i,r){var n,o=Vt(t),s=!d.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===x.css(t,"boxSizing",!1,o),h=r?te(t,e,r,a,o):0;return a&&s&&(h-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-te(t,e,"border",!1,o)-.5)),h&&(n=it.exec(i))&&"px"!==(n[3]||"px")&&(t.style[e]=i,i=x.css(t,e)),Jt(0,i,h)}}}),x.cssHooks.marginLeft=jt(d.reliableMarginLeft,function(t,e){if(e)return(parseFloat(zt(t,"marginLeft"))||t.getBoundingClientRect().left-ht(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(t,e){x.cssHooks[t+e]={expand:function(i){for(var r=0,n={},o="string"==typeof i?i.split(" "):[i];r<4;r++)n[t+rt[r]+e]=o[r]||o[r-2]||o[0];return n}},"margin"!==t&&(x.cssHooks[t+e].set=Jt)}),x.fn.extend({css:function(t,e){return z(this,function(t,e,i){var r,n,o={},s=0;if(Array.isArray(e)){for(r=Vt(t),n=e.length;s<n;s++)o[e[s]]=x.css(t,e[s],!1,r);return o}return void 0!==i?x.style(t,e,i):x.css(t,e)},t,e,1<arguments.length)}}),((x.Tween=ie).prototype={constructor:ie,init:function(t,e,i,r,n,o){this.elem=t,this.prop=i,this.easing=n||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[i]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,i=ie.propHooks[this.prop];return this.pos=e=this.options.duration?x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):ie.propHooks._default.set(this),this}}).init.prototype=ie.prototype,(ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||!x.cssHooks[t.prop]&&null==t.elem.style[Yt(t.prop)]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}}).scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=ie.prototype.init,x.fx.step={};var re,ne,oe,se,ae=/^(?:toggle|show|hide)$/,he=/queueHooks$/;function le(){ne&&(!1===r.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(le):t.setTimeout(le,x.fx.interval),x.fx.tick())}function ue(){return t.setTimeout(function(){re=void 0}),re=Date.now()}function ce(t,e){var i,r=0,n={height:t};for(e=e?1:0;r<4;r+=2-e)n["margin"+(i=rt[r])]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function pe(t,e,i){for(var r,n=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,s=n.length;o<s;o++)if(r=n[o].call(i,e,t))return r}function fe(t,e,i){var r,n,o=0,s=fe.prefilters.length,a=x.Deferred().always(function(){delete h.elem}),h=function(){if(n)return!1;for(var e=re||ue(),i=Math.max(0,l.startTime+l.duration-e),r=1-(i/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(r);return a.notifyWith(t,[l,r,i]),r<1&&s?i:(s||a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:x.extend({},e),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},i),originalProperties:e,originalOptions:i,startTime:re||ue(),duration:i.duration,tweens:[],createTween:function(e,i){var r=x.Tween(t,l.opts,e,i,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r}
vendor: 5,445 bytes, line 1
1,stop:function(e){var i=0,r=e?l.tweens.length:0;if(n)return this;for(n=!0;i<r;i++)l.tweens[i].run(1);return e?(a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l,e])):a.rejectWith(t,[l,e]),this}}),u=l.props;for(function(t,e){var i,r,n,o,s;for(i in t)if(n=e[r=W(i)],o=t[i],Array.isArray(o)&&(n=o[1],o=t[i]=o[0]),i!==r&&(t[r]=o,delete t[i]),(s=x.cssHooks[r])&&"expand"in s)for(i in o=s.expand(o),delete t[r],o)i in t||(t[i]=o[i],e[i]=n);else e[r]=n}(u,l.opts.specialEasing);o<s;o++)if(r=fe.prefilters[o].call(l,t,u,l.opts))return m(r.stop)&&(x._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return x.map(u,pe,l),m(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),x.fx.timer(x.extend(h,{elem:t,anim:l,queue:l.opts.queue})),l}x.Animation=x.extend(fe,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return lt(i.elem,t,it.exec(e),i),i}]},tweener:function(t,e){m(t)?(e=t,t=["*"]):t=t.match(N);for(var i,r=0,n=t.length;r<n;r++)(fe.tweeners[i=t[r]]=fe.tweeners[i]||[]).unshift(e)},prefilters:[function(t,e,i){var r,n,o,s,a,h,l,u,c="width"in e||"height"in e,p=this,f={},d=t.style,m=t.nodeType&&at(t),y=Q.get(t,"fxshow");for(r in i.queue||(null==(s=x._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,x.queue(t,"fx").length||s.empty.fire()})})),e)if(ae.test(n=e[r])){if(delete e[r],o=o||"toggle"===n,n===(m?"hide":"show")){if("show"!==n||!y||void 0===y[r])continue;m=!0}f[r]=y&&y[r]||x.style(t,r)}if((h=!x.isEmptyObject(e))||!x.isEmptyObject(f))for(r in c&&1===t.nodeType&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],null==(l=y&&y.display)&&(l=Q.get(t,"display")),"none"===(u=x.css(t,"display"))&&(l?u=l:(ct([t],!0),l=t.style.display||l,u=x.css(t,"display"),ct([t]))),("inline"===u||"inline-block"===u&&null!=l)&&"none"===x.css(t,"float")&&(h||(p.done(function(){d.display=l}),null==l&&(l="none"===(u=d.display)?"":u)),d.display="inline-block")),i.overflow&&(d.overflow="hidden",p.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]})),h=!1,f)h||(y?"hidden"in y&&(m=y.hidden):y=Q.access(t,"fxshow",{display:l}),o&&(y.hidden=!m),m&&ct([t],!0),p.done(function(){for(r in m||ct([t]),Q.remove(t,"fxshow"),f)x.style(t,r,f[r])})),h=pe(m?y[r]:0,r,p),r in y||(y[r]=h.start,m&&(h.end=h.start,h.start=0))}],prefilter:function(t,e){e?fe.prefilters.unshift(t):fe.prefilters.push(t)}}),x.speed=function(t,e,i){var r=t&&"object"==typeof t?x.extend({},t):{complete:i||!i&&e||m(t)&&t,duration:t,easing:i&&e||e&&!m(e)&&e};return x.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration=r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.fn.extend({fadeTo:function(t,e,i,r){return this.filter(at).css("opacity",0).show().end().animate({opacity:e},t,i,r)},animate:function(t,e,i,r){var n=x.isEmptyObject(t),o=x.speed(e,i,r),s=function(){var e=fe(this,x.extend({},t),o);(n||Q.get(this,"finish"))&&e.stop(!0)};return s.finish=s,n||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var r=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,n=null!=t&&t+"queueHooks",o=x.timers,s=Q.get(this);if(n)s[n]&&s[n].stop&&r(s[n]);else for(n in s)s[n]&&s[n].stop&&he.test(n)&&r(s[n]);for(n=o.length;n--;)o[n].elem!==this||null!=t&&o[n].queue!==t||(o[n].anim.stop(i),e=!1,o.splice(n,1));!e&&i||x.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=Q.get(this),r=i[t+"queue"],n=i[t+"queueHooks"],o=x.timers,s=r?r.length:0;for(i.finish=!0,x.queue(this,t,[]),n&&n.stop&&n.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete i.finish})}}),x.each(["toggle","show","hide"],function(t,e){var i=x.fn[e];x.fn[e]=function(t,r,n){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(ce(e,!0),t,r,n)}}),x.each({slideDown:ce("show"),slideUp:ce("hide"),slideToggle:ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){x.fn[t]=function(t,i,r){return this.animate(e,t,i,r)}}),x.timers=[],x.fx.tick=function(){var t,e=0,i=x.timers;for(re=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||x.fx.stop(),re=void 0},x.fx.timer=function(t){x.timers.push(t),x.fx.start()},x.fx.interval=13,x.fx.start=function(){ne||(ne=!0,le())},x.fx.stop=function(){ne=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(e,i){return e=x.fx&&x.fx.speeds[e]||e,this.queue(i=i||"fx",function(i,r){var n=t.setTimeout(i,e);r.stop=function(){t.clearTimeout(n)}})},oe=r.createElement("input"),se=r.createElement("select").appendChild(r.createElement("option")),oe.type="checkbox",d.checkOn=""!==oe.value,d.optSelected=se.selected,(oe=r.createElement("input")).value="t",oe.type="radio",d.radioValue="t"===oe.value;var de,me=x.expr.attrHandle;x.fn.extend({attr:function(t,e){return z(this,x.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){x.removeAttr(this,t)})}}
vendor: 4,406 bytes, line 1
1),x.extend({attr:function(t,e,i){var r,n,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?x.prop(t,e,i):(1===o&&x.isXMLDoc(t)||(n=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?de:void 0)),void 0!==i?null===i?void x.removeAttr(t,e):n&&"set"in n&&void 0!==(r=n.set(t,i,e))?r:(t.setAttribute(e,i+""),i):n&&"get"in n&&null!==(r=n.get(t,e))?r:null==(r=x.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!d.radioValue&&"radio"===e&&A(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,r=0,n=e&&e.match(N);if(n&&1===t.nodeType)for(;i=n[r++];)t.removeAttribute(i)}}),de={set:function(t,e,i){return!1===e?x.removeAttr(t,i):t.setAttribute(i,i),i}},x.each(x.expr.match.bool.source.match(/\w+/g),function(t,e){var i=me[e]||x.find.attr;me[e]=function(t,e,r){var n,o,s=e.toLowerCase();return r||(o=me[s],me[s]=n,n=null!=i(t,e,r)?s:null,me[s]=o),n}});var ye=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ve(t){return(t.match(N)||[]).join(" ")}function _e(t){return t.getAttribute&&t.getAttribute("class")||""}function be(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(N)||[]}x.fn.extend({prop:function(t,e){return z(this,x.prop,t,e,1<arguments.length)},removeProp:function(t){return this.each(function(){delete this[x.propFix[t]||t]})}}),x.extend({prop:function(t,e,i){var r,n,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&x.isXMLDoc(t)||(n=x.propHooks[e=x.propFix[e]||e]),void 0!==i?n&&"set"in n&&void 0!==(r=n.set(t,i,e))?r:t[e]=i:n&&"get"in n&&null!==(r=n.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(x.propHooks.selected={get:function(t){return null},set:function(t){}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(t){var e,i,r,n,o,s,a,h=0;if(m(t))return this.each(function(e){x(this).addClass(t.call(this,e,_e(this)))});if((e=be(t)).length)for(;i=this[h++];)if(n=_e(i),r=1===i.nodeType&&" "+ve(n)+" "){for(s=0;o=e[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");n!==(a=ve(r))&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,r,n,o,s,a,h=0;if(m(t))return this.each(function(e){x(this).removeClass(t.call(this,e,_e(this)))});if(!arguments.length)return this.attr("class","");if((e=be(t)).length)for(;i=this[h++];)if(n=_e(i),r=1===i.nodeType&&" "+ve(n)+" "){for(s=0;o=e[s++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");n!==(a=ve(r))&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t,r="string"===i||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):m(t)?this.each(function(i){x(this).toggleClass(t.call(this,i,_e(this),e),e)}):this.each(function(){var e,n,o,s;if(r)for(n=0,o=x(this),s=be(t);e=s[n++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==i||((e=_e(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))})},hasClass:function(t){var e,i,r=0;for(e=" "+t+" ";i=this[r++];)if(1===i.nodeType&&-1<(" "+ve(_e(i))+" ").indexOf(e))return!0;return!1}});var xe=/\r/g;x.fn.extend({val:function(t){var e,i,r,n=this[0];return arguments.length?(r=m(t),this.each(function(i){var n;1===this.nodeType&&(null==(n=r?t.call(this,i,x(this).val()):t)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=x.map(n,function(t){return null==t?"":t+""})),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,n,"value")||(this.value=n))})):n?(e=x.valHooks[n.type]||x.valHooks[n.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(n,"value"))?i:"string"==typeof(i=n.value)?i.replace(xe,""):null==i?"":i:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:ve(x.text(t))}},select:{get:function(t){var e,i,r,n=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],h=s?o+1:n.length;for(r=o<0?h:s?o:0;r<h;r++)if(((i=n[r]).selected||r===o)&&!i.disabled&&(!i.parentNode.disabled||!A(i.parentNode,"optgroup"))){if(e=x(i).val(),s)return e;a.push(e)}return a}
vendor: 4,115 bytes, line 1
1,set:function(t,e){for(var i,r,n=t.options,o=x.makeArray(e),s=n.length;s--;)((r=n[s]).selected=-1<x.inArray(x.valHooks.option.get(r),o))&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=-1<x.inArray(x(t).val(),e)}},d.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),d.focusin="onfocusin"in t;var we=/^(?:focusinfocus|focusoutblur)$/,Te=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(e,i,n,o){var s,a,h,l,u,p,f,d,g=[n||r],v=c.call(e,"type")?e.type:e,_=c.call(e,"namespace")?e.namespace.split("."):[];if(a=d=h=n=n||r,3!==n.nodeType&&8!==n.nodeType&&!we.test(v+x.event.triggered)&&(-1<v.indexOf(".")&&(v=(_=v.split(".")).shift(),_.sort()),u=v.indexOf(":")<0&&"on"+v,(e=e[x.expando]?e:new x.Event(v,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:x.makeArray(i,[e]),f=x.event.special[v]||{},o||!f.trigger||!1!==f.trigger.apply(n,i))){if(!o&&!f.noBubble&&!y(n)){for(we.test((l=f.delegateType||v)+v)||(a=a.parentNode);a;a=a.parentNode)g.push(a),h=a;h===(n.ownerDocument||r)&&g.push(h.defaultView||h.parentWindow||t)}for(s=0;(a=g[s++])&&!e.isPropagationStopped();)d=a,e.type=1<s?l:f.bindType||v,(p=(Q.get(a,"events")||{})[e.type]&&Q.get(a,"handle"))&&p.apply(a,i),(p=u&&a[u])&&p.apply&&Y(a)&&(e.result=p.apply(a,i),!1===e.result&&e.preventDefault());return e.type=v,o||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(g.pop(),i)||!Y(n)||u&&m(n[v])&&!y(n)&&((h=n[u])&&(n[u]=null),x.event.triggered=v,e.isPropagationStopped()&&d.addEventListener(v,Te),n[v](),e.isPropagationStopped()&&d.removeEventListener(v,Te),x.event.triggered=void 0,h&&(n[u]=h)),e.result}},simulate:function(t,e,i){var r=x.extend(new x.Event,i,{type:t,isSimulated:!0});x.event.trigger(r,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each(function(){x.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return x.event.trigger(t,e,i,!0)}}),d.focusin||x.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){x.event.simulate(e,t.target,x.event.fix(t))};x.event.special[e]={setup:function(){var r=this.ownerDocument||this,n=Q.access(r,e);n||r.addEventListener(t,i,!0),Q.access(r,e,(n||0)+1)},teardown:function(){var r=this.ownerDocument||this,n=Q.access(r,e)-1;n?Q.access(r,e,n):(r.removeEventListener(t,i,!0),Q.remove(r,e))}}});var Se=t.location,Me=Date.now(),Ee=/\?/;x.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(e){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+e),i};var Ce=/\[\]$/,Ae=/\r?\n/g,Pe=/^(?:submit|button|image|reset|file)$/i,ke=/^(?:input|select|textarea|keygen)/i;function Re(t,e,i,r){var n;if(Array.isArray(e))x.each(e,function(e,n){i||Ce.test(t)?r(t,n):Re(t+"["+("object"==typeof n&&null!=n?e:"")+"]",n,i,r)});else if(i||"object"!==_(e))r(t,e);else for(n in e)Re(t+"["+n+"]",e[n],i,r)}x.param=function(t,e){var i,r=[],n=function(t,e){var i=m(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,function(){n(this.name,this.value)});else for(i in t)Re(i,t[i],e,n);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&ke.test(this.nodeName)&&!Pe.test(t)&&(this.checked||!pt.test(t))}).map(function(t,e){var i=x(this).val();return null==i?null:Array.isArray(i)?x.map(i,function(t){return{name:e.name,value:t.replace(Ae,"\r\n")}}):{name:e.name,value:i.replace(Ae,"\r\n")}}).get()}});var De=/%20/g,Oe=/#.*$/,Le=/([?&])_=[^&]*/,Ie=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ne=/^(?:GET|HEAD)$/,Fe=
vendor: 4,246 bytes, line 1
1/^\/\//,Ue={},Be={},Ge="*/".concat("*"),Ve=r.createElement("a");function qe(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var r,n=0,o=e.toLowerCase().match(N)||[];if(m(i))for(;r=o[n++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(i)):(t[r]=t[r]||[]).push(i)}}function ze(t,e,i,r){var n={},o=t===Be;function s(a){var h;return n[a]=!0,x.each(t[a]||[],function(t,a){var l=a(e,i,r);return"string"!=typeof l||o||n[l]?o?!(h=l):void 0:(e.dataTypes.unshift(l),s(l),!1)}),h}return s(e.dataTypes[0])||!n["*"]&&s("*")}function je(t,e){var i,r,n=x.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((n[i]?t:r||(r={}))[i]=e[i]);return r&&x.extend(!0,t,r),t}Ve.href=Se.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ge,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?je(je(t,x.ajaxSettings),e):je(x.ajaxSettings,t)},ajaxPrefilter:qe(Ue),ajaxTransport:qe(Be),ajax:function(e,i){"object"==typeof e&&(i=e,e=void 0);var n,o,s,a,h,l,u,c,p,f,d=x.ajaxSetup({},i=i||{}),m=d.context||d,y=d.context&&(m.nodeType||m.jquery)?x(m):x.event,g=x.Deferred(),v=x.Callbacks("once memory"),_=d.statusCode||{},b={},w={},T="canceled",S={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=Ie.exec(s);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(t,e){return null==u&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==u&&(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)S.always(t[S.status]);else for(e in t)_[e]=[_[e],t[e]];return this},abort:function(t){var e=t||T;return n&&n.abort(e),M(0,e),this}};if(g.promise(S),d.url=((e||d.url||Se.href)+"").replace(Fe,Se.protocol+"//"),d.type=i.method||i.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(N)||[""],null==d.crossDomain){l=r.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=Ve.protocol+"//"+Ve.host!=l.protocol+"//"+l.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=x.param(d.data,d.traditional)),ze(Ue,d,i,S),u)return S;for(p in(c=x.event&&d.global)&&0==x.active++&&x.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ne.test(d.type),o=d.url.replace(Oe,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(De,"+")):(f=d.url.slice(o.length),d.data&&(d.processData||"string"==typeof d.data)&&(o+=(Ee.test(o)?"&":"?")+d.data,delete d.data),!1===d.cache&&(o=o.replace(Le,"$1"),f=(Ee.test(o)?"&":"?")+"_="+Me+++f),d.url=o+f),d.ifModified&&(x.lastModified[o]&&S.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&S.setRequestHeader("If-None-Match",x.etag[o])),(d.data&&d.hasContent&&!1!==d.contentType||i.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Ge+"; q=0.01":""):d.accepts["*"]),d.headers)S.setRequestHeader(p,d.headers[p]);if(d.beforeSend&&(!1===d.beforeSend.call(m,S,d)||u))return S.abort();if(T="abort",v.add(d.complete),S.done(d.success),S.fail(d.error),n=ze(Be,d,i,S)){if(S.readyState=1,c&&y.trigger("ajaxSend",[S,d]),u)return S;d.async&&0<d.timeout&&(h=t.setTimeout(function(){S.abort("timeout")},d.timeout));try{u=!1,n.send(b,M)}catch(e){if(u)throw e;M(-1,e)}}else M(-1,"No Transport");function M(e,i,r,a){var l,p,f,b,w,T=i;u||(u=!0,h&&t.clearTimeout(h),n=void 0,s=a||"",S.readyState=0<e?4:0,l=200<=e&&e<300||304===e,r&&(b=function(t,e,
vendor: 4,585 bytes, line 1
1i){for(var r,n,o,s,a=t.contents,h=t.dataTypes;"*"===h[0];)h.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(n in a)if(a[n]&&a[n].test(r)){h.unshift(n);break}if(h[0]in i)o=h[0];else{for(n in i){if(!h[0]||t.converters[n+" "+h[0]]){o=n;break}s||(s=n)}o=o||s}if(o)return o!==h[0]&&h.unshift(o),i[o]}(d,S,r)),b=function(t,e,i,r){var n,o,s,a,h,l={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=u.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!h&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),h=o,o=u.shift())if("*"===o)o=h;else if("*"!==h&&h!==o){if(!(s=l[h+" "+o]||l["* "+o]))for(n in l)if((a=n.split(" "))[1]===o&&(s=l[h+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[n]:!0!==l[n]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+h+" to "+o}}}return{state:"success",data:e}}(d,b,S,l),l?(d.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(x.lastModified[o]=w),(w=S.getResponseHeader("etag"))&&(x.etag[o]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=b.state,p=b.data,l=!(f=b.error))):(f=T,!e&&T||(T="error",e<0&&(e=0))),S.status=e,S.statusText=(i||T)+"",l?g.resolveWith(m,[p,T,S]):g.rejectWith(m,[S,T,f]),S.statusCode(_),_=void 0,c&&y.trigger(l?"ajaxSuccess":"ajaxError",[S,d,l?p:f]),v.fireWith(m,[S,T]),c&&(y.trigger("ajaxComplete",[S,d]),--x.active||x.event.trigger("ajaxStop")))}return S},getJSON:function(t,e,i){return x.get(t,e,i,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],function(t,e){x[e]=function(t,i,r,n){return m(i)&&(n=n||r,r=i,i=void 0),x.ajax(x.extend({url:t,type:e,dataType:n,data:i,success:r},x.isPlainObject(t)&&t))}}),x._evalUrl=function(t,e){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){x.globalEval(t,e)}})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(m(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return m(t)?this.each(function(e){x(this).wrapInner(t.call(this,e))}):this.each(function(){var e=x(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=m(t);return this.each(function(i){x(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var He={0:200,1223:204},Xe=x.ajaxSettings.xhr();d.cors=!!Xe&&"withCredentials"in Xe,d.ajax=Xe=!!Xe,x.ajaxTransport(function(e){var i,r;if(d.cors||Xe&&!e.crossDomain)return{send:function(n,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)a.setRequestHeader(s,n[s]);i=function(t){return function(){i&&(i=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(He[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),r=a.onerror=a.ontimeout=i("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){i&&r()})},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(n){if(i)throw n}},abort:function(){i&&i()}}}),x.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),x.ajaxTransport("script",function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,o){e=x("<script>").attr(t.scriptAttrs||{}
vendor: 4,558 bytes, line 1
1).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&o("error"===t.type?404:200,t.type)}),r.head.appendChild(e[0])},abort:function(){i&&i()}}});var We,Ye=[],Ze=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||x.expando+"_"+Me++;return this[t]=!0,t}}),x.ajaxPrefilter("json jsonp",function(e,i,r){var n,o,s,a=!1!==e.jsonp&&(Ze.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ze.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ze,"$1"+n):!1!==e.jsonp&&(e.url+=(Ee.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return s||x.error(n+" was not called"),s[0]},e.dataTypes[0]="json",o=t[n],t[n]=function(){s=arguments},r.always(function(){void 0===o?x(t).removeProp(n):t[n]=o,e[n]&&(e.jsonpCallback=i.jsonpCallback,Ye.push(n)),s&&m(o)&&o(s[0]),s=o=void 0}),"script"}),d.createHTMLDocument=((We=r.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===We.childNodes.length),x.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(d.createHTMLDocument?((n=(e=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,e.head.appendChild(n)):e=r),s=!i&&[],(o=P.exec(t))?[e.createElement(o[1])]:(o=xt([t],e,s),s&&s.length&&x(s).remove(),x.merge([],o.childNodes)));var n,o,s},x.fn.load=function(t,e,i){var r,n,o,s=this,a=t.indexOf(" ");return-1<a&&(r=ve(t.slice(a)),t=t.slice(0,a)),m(e)?(i=e,e=void 0):e&&"object"==typeof e&&(n="POST"),0<s.length&&x.ajax({url:t,type:n||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(r?x("<div>").append(x.parseHTML(t)).find(r):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){x.fn[e]=function(t){return this.on(e,t)}}),x.expr.pseudos.animated=function(t){return x.grep(x.timers,function(e){return t===e.elem}).length},x.offset={setOffset:function(t,e,i){var r,n,o,s,a,h,l=x.css(t,"position"),u=x(t),c={};"static"===l&&(t.style.position="relative"),a=u.offset(),o=x.css(t,"top"),h=x.css(t,"left"),("absolute"===l||"fixed"===l)&&-1<(o+h).indexOf("auto")?(s=(r=u.position()).top,n=r.left):(s=parseFloat(o)||0,n=parseFloat(h)||0),m(e)&&(e=e.call(t,i,x.extend({},a))),null!=e.top&&(c.top=e.top-a.top+s),null!=e.left&&(c.left=e.left-a.left+n),"using"in e?e.using.call(t,c):u.css(c)}},x.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){x.offset.setOffset(this,t,e)});var e,i,r=this[0];return r?r.getClientRects().length?{top:(e=r.getBoundingClientRect()).top+(i=r.ownerDocument.defaultView).pageYOffset,left:e.left+i.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,r=this[0],n={top:0,left:0};if("fixed"===x.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),i=r.ownerDocument,t=r.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===x.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((n=x(t).offset()).top+=x.css(t,"borderTopWidth",!0),n.left+=x.css(t,"borderLeftWidth",!0))}return{top:e.top-n.top-x.css(r,"marginTop",!0),left:e.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===x.css(t,"position");)t=t.offsetParent;return t||nt})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;x.fn[t]=function(r){return z(this,function(t,r,n){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===n)return o?o[e]:t[r];o?o.scrollTo(i?o.pageXOffset:n,i?n:o.pageYOffset):t[r]=n},t,r,arguments.length)}}),x.each(["top","left"],function(t,e){x.cssHooks[e]=jt(d.pixelPosition,function(t,i){if(i)return i=zt(t,e),Gt.test(i)?x(t).position()[e]+"px":i})}),x.each({Height:"height",Width:"width"},function(t,e){x.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,r){x.fn[r]=function(n,o){var s=arguments.length&&(i||"boolean"!=typeof n),a=i||(!0===n||!0===o?"margin":"border");return z(this,function(e,i,n){var o;return y(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===n?x.
1css(e,i,a):x.style(e,i,n,a)},e,s?n:void 0,s)}})}),x.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){x.fn[e]=function(t,i){return 0<arguments.length?this.on(e,null,t,i):this.trigger(e)}}),x.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),x.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,r){return this.on(e,t,i,r)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),x.proxy=function(t,e){var i,r,n;if("string"==typeof e&&(i=t[e],e=t,t=i),m(t))return r=o.call(arguments,2),(n=function(){return t.apply(e||this,r.concat(o.call(arguments)))}).guid=t.guid=t.guid||x.guid++,n},x.holdReady=function(t){t?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=A,x.isFunction=m,x.isWindow=y,x.camelCase=W,x.type=_,x.now=Date.now,x.isNumeric=function(t){var e=x.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return x});var Qe=t.jQuery,$e=t.$;return x.noConflict=function(e){return t.$===x&&(t.$=$e),e&&t.jQuery===x&&(t.jQuery=Qe),x},e||(t.jQuery=t.$=x),x}),function(t,e,i){"use strict";function r(i){if(n=e.documentElement,o=e.body,V(),et=this,st=(i=i||{}).constants||{},i.easing)for(var r in i.easing)z[r]=i.easing[r];ft=i.edgeStrategy||"set",nt={beforerender:i.beforerender,render:i.render,keyframe:i.keyframe},(ot=!1!==i.forceHeight)&&(kt=i.scale||1),at=i.mobileDeceleration||T,lt=!1!==i.smoothScrolling,ut=i.smoothScrollingDuration||S,ct={targetTop:et.getScrollTop()},(Ut=(i.mobileCheck||function(){return/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||t.opera)})())?((rt=e.getElementById("skrollr-body"))&&tt(),j(),St(n,[v,x],[_])):St(n,[v,b],[_]),et.refresh(),yt(t,"resize orientationchange",function(){var t=n.clientWidth,e=n.clientHeight;(e!==It||t!==Lt)&&(It=e,Lt=t,Nt=!0)});var s=q();return function t(){X(),mt=s(t)}(),et}var n,o,s={get:function(){return et},init:function(t){return et||new r(t)},VERSION:"0.6.26"},a=Object.prototype.hasOwnProperty,h=t.Math,l=t.getComputedStyle,u="touchstart",c="touchmove",p="touchcancel",f="touchend",d="skrollable",m=d+"-before",y=d+"-between",g=d+"-after",v="skrollr",_="no-"+v,b=v+"-desktop",x=v+"-mobile",w="linear",T=.004,S=200,M="center",E="bottom",C="___skrollable_id",A=/^(?:input|textarea|button|select)$/i,P=/^\s+|\s+$/g,k=/^data(?:-(_\w+))?(?:-?(-?\d*\.?\d+p?))?(?:-?(start|end|top|center|bottom))?(?:-?(top|center|bottom))?$/,R=/\s*(@?[\w\-\[\]]+)\s*:\s*(.+?)\s*(?:;|$)/gi,D=/^(@?[a-z\-]+)\[(\w+)\]$/,O=/-([a-z0-9_])/g,L=function(t,e){return e.toUpperCase()}
vendor: 1,834 bytes, line 1
1,I=/[\-+]?[\d]*\.?[\d]+/g,N=/\{\?\}/g,F=/rgba?\(\s*-?\d+\s*,\s*-?\d+\s*,\s*-?\d+/g,U=/[a-z\-]+-gradient/g,B="",G="",V=function(){var t=/^(?:O|Moz|webkit|ms)|(?:-(?:o|moz|webkit|ms)-)/;if(l){var e=l(o,null);for(var r in e)if(B=r.match(t)||+r==r&&e[r].match(t))break;if(!B)return B=G="",i;"-"===(B=B[0]).slice(0,1)?(G=B,B={"-webkit-":"webkit","-moz-":"Moz","-ms-":"ms","-o-":"O"}[B]):G="-"+B.toLowerCase()+"-"}},q=function(){var e=t.requestAnimationFrame||t[B.toLowerCase()+"RequestAnimationFrame"],i=Ct();return(Ut||!e)&&(e=function(e){var r=Ct()-i,n=h.max(0,1e3/60-r);return t.setTimeout(function(){i=Ct(),e()},n)}),e},z={begin:function(){return 0},end:function(){return 1},linear:function(t){return t},quadratic:function(t){return t*t},cubic:function(t){return t*t*t},swing:function(t){return-h.cos(t*h.PI)/2+.5},sqrt:function(t){return h.sqrt(t)},outCubic:function(t){return h.pow(t-1,3)+1},bounce:function(t){var e;if(.5083>=t)e=3;else if(.8489>=t)e=9;else if(.96208>=t)e=27;else{if(!(.99981>=t))return 1;e=91}return 1-h.abs(3*h.cos(1.028*t*e)/e)}};r.prototype.refresh=function(t){var r,n,o=!1;for(t===i?(o=!0,it=[],Ft=0,t=e.getElementsByTagName("*")):t.length===i&&(t=[t]),r=0,n=t.length;n>r;r++){var s=t[r],a=s,h=[],l=lt,u=ft,c=!1;if(o&&C in s&&delete s[C],s.attributes){for(var p=0,f=s.attributes.length;f>p;p++){var m=s.attributes[p];if("data-anchor-target"!==m.name)if("data-smooth-scrolling"!==m.name)if("data-edge-strategy"!==m.name)if("data-emit-events"!==m.name){var y=m.name.match(k);if(null!==y){var g={props:m.value,element:s,eventType:m.name.replace(O,L)};h.push(g);var v=y[1];v&&(g.constant=v.substr(1));var _=y[2];/p$/.test(_)?(g.isPercentage=!0,g.offset=(0|_.slice(0,-1))/100):g.offset=0|_;var b=y[3],x=y[4]||b;b&&"start"!==b&&"end"!==b?(g.mode="relative",g.anchors=[b,x]):(g.mode="absolute","end"===b?g.isEnd=!0:g.
1isPercentage||(g.offset=g.offset*kt))}}else c=!0;else u=m.value;else l="off"!==m.value;else if(null===(a=e.querySelector(m.value)))throw'Unable to find anchor target "'+m.value+'"'}var w,T,S;h.length&&(!o&&C in s?(w=it[S=s[C]].styleAttr,T=it[S].classAttr):(S=s[C]=Ft++,w=s.style.cssText,T=Tt(s)),it[S]={element:s,styleAttr:w,classAttr:T,anchorTarget:a,keyFrames:h,smoothScrolling:l,edgeStrategy:u,emitEvents:c,lastFrameIndex:-1},St(s,[d],[]))}}for(bt(),r=0,n=t.length;n>r;r++){var M=it[t[r][C]];M!==i&&(W(M),Z(M))}return et},r.prototype.relativeToAbsolute=function(t,e,i){var r=n.clientHeight,o=t.getBoundingClientRect(),s=o.top,a=o.bottom-o.top;return e===E?s-=r:e===M&&(s-=r/2),i===E?s+=a:i===M&&(s+=a/2),0|(s+=et.getScrollTop())+.5},r.prototype.animateTo=function(t,e){e=e||{};var r=Ct(),n=et.getScrollTop();return(ht={startTop:n,topDiff:t-n,targetTop:t,duration:e.duration||1e3,startTime:r,endTime:r+(e.duration||1e3),easing:z[e.easing||w],done:e.done}).topDiff||(ht.done&&ht.done.call(et,!1),ht=i),et},r.prototype.stopAnimateTo=function(){ht&&ht.done&&ht.done.call(et,!0),ht=i},r.prototype.isAnimatingTo=function(){return!!ht},r.prototype.isMobile=function(){return Ut},r.prototype.setScrollTop=function(e,i){return pt=!0===i,Ut?Bt=h.min(h.max(e,0),Pt):t.scrollTo(0,e),et},r.prototype.getScrollTop=function(){return Ut?Bt:t.pageYOffset||n.scrollTop||o.scrollTop||0},r.prototype.getMaxScrollTop=function(){return Pt},r.prototype.on=function(t,e){return nt[t]=e,et},r.prototype.off=function(t){return delete nt[t],et},r.prototype.destroy=function(){(function(){var e=t.cancelAnimationFrame||t[B.toLowerCase()+"CancelAnimationFrame"];return(Ut||!e)&&(e=function(e){return t.clearTimeout(e)}),e})()(mt),vt(),St(n,[_],[v,b,x]);for(var e=0,r=it.length;r>e;e++)J(it[e].element);n.style.overflow=o.style.overflow="",n.style.height=o.style.height="",rt&&s.setStyle(rt,"transform","none"),et=i,rt=i,nt=i,ot=i,Pt=0,kt=1,st=i,at=i,Rt="down",Dt=-1,Lt=0,It=0,Nt=!1,ht=i,lt=i,ut=i,ct=i,pt=i,Ft=0,ft=i,Ut=!1,Bt=0,dt=i};var j=function(){var r,s,a,l,d,m,y,g,v,_,b;yt(n,[u,c,p,f].join(" "),function(t){var n=t.changedTouches[0];for(l=t.target;3===l.nodeType;)l=l.parentNode;switch(d=n.clientY,m=n.clientX,v=t.timeStamp,A.test(l.tagName)||t.preventDefault(),t.type){case u:r&&r.blur(),et.stopAnimateTo(),r=l,s=y=d,a=m;break;case c:A.test(l.tagName)&&e.activeElement!==l&&t.preventDefault(),b=v-_,et.setScrollTop(Bt-(g=d-y),!0),y=d,_=v;break;default:case p:case f:var o=s-d,x=a-m;if(49>x*x+o*o){if(!A.test(r.tagName)){r.focus();var w=e.createEvent("MouseEvents");w.initMouseEvent("click",!0,!0,t.view,1,n.screenX,n.screenY,n.clientX,n.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null),r.dispatchEvent(w)}return}r=i;var T=g/b;T=h.max(h.min(T,3),-3);var S=h.abs(T/at),M=T*S+.5*at*S*S,E=et.getScrollTop()-M,C=0;E>Pt?(C=(Pt-E)/M,E=Pt):0>E&&(C=-E/M,E=0),et.animateTo(0|E+.5,{easing:"outCubic",duration:S*=1-C})}}),t.scrollTo(0,0),n.style.overflow=o.style.overflow="hidden"},H=function(t,e){for(var i=0,r=it.length;r>i;i++){var n,o,h=it[i],l=h.element,u=h.smoothScrolling?t:e,c=h.keyFrames,p=c.length,f=c[0],v=c[c.length-1],_=f.frame>u,b=u>v.frame,x=_?f:v,w=h.emitEvents,T=h.lastFrameIndex;if(_||b){if(_&&-1===h.edge||b&&1===h.edge)continue;switch(_?(St(l,[m],[g,y]),w&&T>-1&&(_t(l,f.eventType,Rt),h.lastFrameIndex=-1)):(St(l,[g],[m,y]),w&&p>T&&(_t(l,v.eventType,Rt),h.lastFrameIndex=p)),h.edge=_?-1:1,h.edgeStrategy){case"reset":J(l);continue;case"ease":u=x.frame;break;default:case"set":var S=x.props;for(n in S)a.call(S,n)&&(o=K(S[n].value),0===n.indexOf("@")?l.setAttribute(n.substr(1),o):s.setStyle(l,n,o));continue}}else 0!==h.edge&&(St(l,[d,y],[m,g]),h.edge=0);for(var M=0;p-1>M;M++)if(u>=c[M].frame&&c[M+1].frame>=u){var E=c[M],C=c[M+1];for(n in E.props)if(a.call(E.props,n)){var A=(u-E.frame)/(C.frame-E.frame);A=E.props[n].easing(A),o=$(E.props[n].value,C.props[n].value,A),o=K(o),0===n.indexOf("@")?l.setAttribute(n.substr(1),o):s.setStyle(l,n,o)}w&&T!==M&&(_t(l,"down"===Rt?E.eventType:C.eventType,Rt),h.lastFrameIndex=M);break}}},X=function(){Nt&&(Nt=!1,bt());var t,e,r=et.getScrollTop(),n=Ct();if(ht?(n>=ht.endTime?(r=ht.targetTop,t=ht.done,ht=i):(e=ht.easing((n-ht.startTime)/ht.duration),r=0|ht.startTop+e*ht.topDiff),et.setScrollTop(r,!0)):pt||(ct.targetTop-r&&(ct={startTop:Dt,topDiff:r-Dt,targetTop:r,startTime:Ot,endTime:Ot+ut}),ct.endTime>=n&&(e=z.sqrt((n-ct.startTime)/ut),r=0|ct.startTop+e*ct.topDiff)),Ut&&rt&&s.setStyle(rt,"transform","translate(0, "+-Bt+"px) "+dt),pt||Dt!==r){pt=!1;var o={curTop:r,lastTop:Dt,maxTop:Pt,direction:Rt=r>Dt?"down":Dt>r?"up":Rt};!1!==(nt.beforerender&&nt.beforerender.call(et,o))&&(H(r,et.getScrollTop()),Dt=r,nt.render&&nt.render.call(et,o)),t&&t.call(et,!1)}Ot=n},W=function(t){for(var e=0,i=t.keyFrames.length;i>e;e++){for(var r,n,o,s,a=t.keyFrames[e],h={};null!==(s=R.exec(a.props));)n=s[2],null!==(r=(o=s[1]).match(D))?(o=r[1],r=r[2]):r=w,n=n.indexOf("!")?Y(n):[n.slice(1)],h[o]={value:n,easing:z[r]};a.props=h}},Y=function(t){var e=[];return F.lastIndex=0,t=t.replace(F,function(t){return t.replace(I,function(t){return t/255*100+"%"})}),G&&(U.lastIndex=0,t=t.replace(U,function(t){return G+t})),t=t.replace(I,function(t){return e.push(+t),"{?}"}),e.unshift(t),e},Z=function(t){var e,i,r={};for(e=0,i=t.keyFrames.length;i>e;e++)Q(t.keyFrames[e],r);for(r={},e=t.keyFrames.length-1;e>=0;e--)Q(t.keyFrames[e],r)},Q=function(t,e){var i;for(i in e)a.call(t.props,i)||(t.props[i]=e[i]);for(i in t.props)e[i]=t.props[i]}
1,$=function(t,e,i){var r,n=t.length;if(n!==e.length)throw"Can't interpolate between \""+t[0]+'" and "'+e[0]+'"';var o=[t[0]];for(r=1;n>r;r++)o[r]=t[r]+(e[r]-t[r])*i;return o},K=function(t){var e=1;return N.lastIndex=0,t[0].replace(N,function(){return t[e++]})},J=function(t,e){for(var i,r,n=0,o=(t=[].concat(t)).length;o>n;n++)(i=it[(r=t[n])[C]])&&(e?(r.style.cssText=i.dirtyStyleAttr,St(r,i.dirtyClassAttr)):(i.dirtyStyleAttr=r.style.cssText,i.dirtyClassAttr=Tt(r),r.style.cssText=i.styleAttr,St(r,i.classAttr)))},tt=function(){s.setStyle(rt,"transform",dt="translateZ(0)");var t=l(rt),e=t.getPropertyValue("transform"),i=t.getPropertyValue(G+"transform");e&&"none"!==e||i&&"none"!==i||(dt="")};s.setStyle=function(t,e,i){var r=t.style;if("zIndex"===(e=e.replace(O,L).replace("-","")))r[e]=isNaN(i)?i:""+(0|i);else if("float"===e)r.styleFloat=r.cssFloat=i;else try{B&&(r[B+e.slice(0,1).toUpperCase()+e.slice(1)]=i),r[e]=i}catch(n){}};var et,it,rt,nt,ot,st,at,ht,lt,ut,ct,pt,ft,dt,mt,yt=s.addEvent=function(e,i,r){for(var n,o=function(e){return(e=e||t.event).target||(e.target=e.srcElement),e.preventDefault||(e.preventDefault=function(){e.returnValue=!1,e.defaultPrevented=!0}),r.call(this,e)},s=0,a=(i=i.split(" ")).length;a>s;s++)n=i[s],e.addEventListener?e.addEventListener(n,r,!1):e.attachEvent("on"+n,o),Gt.push({element:e,name:n,listener:r})},gt=s.removeEvent=function(t,e,i){for(var r=0,n=(e=e.split(" ")).length;n>r;r++)t.removeEventListener?t.removeEventListener(e[r],i,!1):t.detachEvent("on"+e[r],i)},vt=function(){for(var t,e=0,i=Gt.length;i>e;e++)gt((t=Gt[e]).element,t.name,t.listener);Gt=[]},_t=function(t,e,i){nt.keyframe&&nt.keyframe.call(et,t,e,i)},bt=function(){var t=et.getScrollTop();Pt=0,ot&&!Ut&&(o.style.height=""),function(){var t,e,i,r,o,s,a,l,u,c,p,f=n.clientHeight,d=xt();for(l=0,u=it.length;u>l;l++)for(e=(t=it[l]).element,i=t.anchorTarget,o=0,s=(r=t.keyFrames).length;s>o;o++)p=d[(a=r[o]).constant]||0,a.frame=c=a.offset,a.isPercentage&&(a.frame=c*=f),"relative"===a.mode&&(J(e),a.frame=et.relativeToAbsolute(i,a.anchors[0],a.anchors[1])-c,J(e,!0)),a.frame+=p,ot&&!a.isEnd&&a.frame>Pt&&(Pt=a.frame);for(Pt=h.max(Pt,wt()),l=0,u=it.length;u>l;l++){for(o=0,s=(r=(t=it[l]).keyFrames).length;s>o;o++)p=d[(a=r[o]).constant]||0,a.isEnd&&(a.frame=Pt-a.offset+p);t.keyFrames.sort(At)}}(),ot&&!Ut&&(o.style.height=Pt+n.clientHeight+"px"),Ut?et.setScrollTop(h.min(et.getScrollTop(),Pt)):et.setScrollTop(t,!0),pt=!0},xt=function(){var t,e,i=n.clientHeight,r={};for(t in st)"function"==typeof(e=st[t])?e=e.call(et):/p$/.test(e)&&(e=e.slice(0,-1)/100*i),r[t]=e;return r},wt=function(){return h.max(rt&&rt.offsetHeight||0,o.scrollHeight,o.offsetHeight,n.scrollHeight,n.offsetHeight,n.clientHeight)-n.clientHeight},Tt=function(e){var i="className";return t.SVGElement&&e instanceof t.SVGElement&&(e=e[i],i="baseVal"),e[i]},St=function(e,r,n){var o="className";if(t.SVGElement&&e instanceof t.SVGElement&&(e=e[o],o="baseVal"),n===i)return e[o]=r,i;for(var s=e[o],a=0,h=n.length;h>a;a++)s=Et(s).replace(Et(n[a])," ");s=Mt(s);for(var l=0,u=r.length;u>l;l++)-1===Et(s).indexOf(Et(r[l]))&&(s+=" "+r[l]);e[o]=Mt(s)},Mt=function(t){return t.replace(P,"")},Et=function(t){return" "+t+" "},Ct=Date.now||function(){return+new Date},At=function(t,e){return t.frame-e.frame}
1,Pt=0,kt=1,Rt="down",Dt=-1,Ot=Ct(),Lt=0,It=0,Nt=!1,Ft=0,Ut=!1,Bt=0,Gt=[];"function"==typeof define&&define.amd?define("skrollr",function(){return s}):"undefined"!=typeof module&&module.exports?module.exports=s:t.skrollr=s}(window,document);var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t,e,i,r,n,o,s,a,h,l,u,c,p,f,d,m;_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var r=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},n=function(t,e,i){var r,n,o=t.cycle;for(r in o)t[r]="function"==typeof(n=o[r])?n(i,e[i]):n[i%n.length];delete t.cycle},o=function(t,e,r){i.call(this,t,e,r),this._cycle=0,this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=o.prototype.render},s=1e-10,a=i._internals,h=a.isSelector,l=a.isArray,u=o.prototype=i.to({},.1,{}),c=[];o.version="2.0.1",u.constructor=o,u.kill()._gc=!1,o.killTweensOf=o.killDelayedCallsTo=i.killTweensOf,o.getTweensOf=i.getTweensOf,o.lagSmoothing=i.lagSmoothing,o.ticker=i.ticker,o.render=i.render,u.invalidate=function(){return this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),i.prototype.invalidate.call(this)},u.updateTo=function(t,e){var r,n=this.ratio,o=this.vars.immediateRender||t.immediateRender;for(r in e&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay)),t)this.vars[r]=t[r];if(this._initted||o)if(e)this._initted=!1,o&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&i._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var s=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(s,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||o)for(var a,h=1/(1-n),l=this._firstPT;l;)a=l.s+l.c,l.c*=h,l.s=a-l.c,l=l._next;return this},u.render=function(t,e,r){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var n,o,h,l,u,c,p,f,d,m=this._dirty?this.totalDuration():this._totalDuration,y=this._time,g=this._totalTime,v=this._cycle,_=this._duration,b=this._rawPrevTime;if(t>=m-1e-7&&t>=0?(this._totalTime=m,this._cycle=this._repeat,this._yoyo&&0!=(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=_,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(n=!0,o="onComplete",r=r||this._timeline.autoRemoveChildren),0===_&&(this._initted||!this.vars.lazy||r)&&(this._startTime===this._timeline._duration&&(t=0),(0>b||0>=t&&t>=-1e-7||b===s&&"isPause"!==this.data)&&b!==t&&(r=!0,b>s&&(o="onReverseComplete")),this._rawPrevTime=f=!e||t||b===t?t:s)):1e-7>t?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==g||0===_&&b>0)&&(o="onReverseComplete",n=this._reversed),0>t&&(this._active=!1,0===_&&(this._initted||!this.vars.lazy||r)&&(b>=0&&(r=!0),this._rawPrevTime=f=!e||t||b===t?t:s)),this._initted||(r=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(this._cycle=this._totalTime/(l=_+this._repeatDelay)>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&t>=g&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!=(1&this._cycle)&&(this._time=_-this._time,(d=this._yoyoEase||this.vars.yoyoEase)&&(this._yoyoEase||(this._yoyoEase=d=!0!==d||this._initted?!0===d?this._ease:d instanceof Ease?d:Ease.map[d]:(d=this.vars.ease)?d instanceof Ease?d:"function"==typeof d?new Ease(d,this.vars.easeParams):Ease.map[d]||i.defaultEase:i.defaultEase),this.ratio=d?1-d.getRatio((_-this._time)/_):0)),this._time>_?this._time=_:this._time<0&&(this._time=0)),this._easeType&&!d?(u=this._time/_,(1===(c=this._easeType)||3===c&&u>=.5)&&(u=1-u),3===c&&(u*=2),1===(p=this._easePower)?u*=u:2===p?u*=u*u:3===p?u*=u*u*u:4===p&&(u*=u*u*u*u),this.ratio=1===c?1-u:2===c?u:this._time/_<.5?u/2:1-u/2):d||(this.ratio=this._ease.getRatio(this._time/_))),y!==this._time||r||v!==this._cycle){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!r&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&
1!this._duration))return this._time=y,this._totalTime=g,this._rawPrevTime=b,this._cycle=v,a.lazyTweens.push(this),void(this._lazy=[t,e]);!this._time||n||d?n&&this._ease._calcEnd&&!d&&(this.ratio=this._ease.getRatio(0===this._time?0:1)):this.ratio=this._ease.getRatio(this._time/_)}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==y&&t>=0&&(this._active=!0),0===g&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,!0,r):o||(o="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===_)&&(e||this._callback("onStart"))),h=this._firstPT;h;)h.f?h.t[h.p](h.c*this.ratio+h.s):h.t[h.p]=h.c*this.ratio+h.s,h=h._next;this._onUpdate&&(0>t&&this._startAt&&this._startTime&&this._startAt.render(t,!0,r),e||(this._totalTime!==g||o)&&this._callback("onUpdate")),this._cycle!==v&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),o&&(!this._gc||r)&&(0>t&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,!0,r),n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this._callback(o),0===_&&this._rawPrevTime===s&&f!==s&&(this._rawPrevTime=0))}else g!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},o.to=function(t,e,i){return new o(t,e,i)},o.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new o(t,e,i)},o.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new o(t,e,r)},o.staggerTo=o.allTo=function(t,e,s,a,u,p,f){a=a||0;var d,m,y,g,v=0,_=[],b=function(){s.onComplete&&s.onComplete.apply(s.onCompleteScope||this,arguments),u.apply(f||s.callbackScope||this,p||c)},x=s.cycle,w=s.startAt&&s.startAt.cycle;for(l(t)||("string"==typeof t&&(t=i.selector(t)||t),h(t)&&(t=r(t))),t=t||[],0>a&&((t=r(t)).reverse(),a*=-1),d=t.length-1,y=0;d>=y;y++){for(g in m={},s)m[g]=s[g];if(x&&(n(m,t,y),null!=m.duration&&(e=m.duration,delete m.duration)),w){for(g in w=m.startAt={},s.startAt)w[g]=s.startAt[g];n(m.startAt,t,y)}m.delay=v+(m.delay||0),y===d&&u&&(m.onComplete=b),_[y]=new o(t[y],e,m),v+=a}return _},o.staggerFrom=o.allFrom=function(t,e,i,r,n,s,a){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,o.staggerTo(t,e,i,r,n,s,a)},o.staggerFromTo=o.allFromTo=function(t,e,i,r,n,s,a,h){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,o.staggerTo(t,e,r,n,s,a,h)},o.delayedCall=function(t,e,i,r,n){return new o(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:n,overwrite:0})},o.set=function(t,e){return new o(t,0,e)},o.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var p=function(t,e){for(var r=[],n=0,o=t._first;o;)o instanceof i?r[n++]=o:(e&&(r[n++]=o),n=(r=r.concat(p(o,e))).length),o=o._next;return r},f=o.getAllTweens=function(e){return p(t._rootTimeline,e).concat(p(t._rootFramesTimeline,e))};o.killAll=function(t,i,r,n){null==i&&(i=!0),null==r&&(r=!0);var o,s,a,h=f(0!=n),l=h.length,u=i&&r&&n;for(a=0;l>a;a++)s=h[a],(u||s instanceof e||(o=s.target===s.vars.onComplete)&&r||i&&!o)&&(t?s.totalTime(s._reversed?0:s.totalDuration()):s._enabled(!1,!1))},o.killChildTweensOf=function(t,e){if(null!=t){var n,s,u,c,p,f=a.tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),h(t)&&(t=r(t)),l(t))for(c=t.length;--c>-1;)o.killChildTweensOf(t[c],e);else{for(u in n=[],f)for(s=f[u].target.parentNode;s;)s===t&&(n=n.concat(f[u].tweens)),s=s.parentNode;for(p=n.length,c=0;p>c;c++)e&&n[c].totalTime(n[c].totalDuration()),n[c]._enabled(!1,!1)}}};var d=function(t,i,r,n){i=!1!==i,r=!1!==r;for(var o,s,a=f(n=!1!==n),h=i&&r&&n,l=a.length;--l>-1;)s=a[l],(h||s instanceof e||(o=s.target===s.vars.onComplete)&&r||i&&!o)&&s.paused(t)};return o.pauseAll=function(t,e,i){d(!0,t,e,i)},o.resumeAll=function(t,e,i){d(!1,t,e,i)},o.globalTimeScale=function(e){var r=t._rootTimeline,n=i.ticker.time;return arguments.length?(r._startTime=n-(n-r._startTime)*r._timeScale/(e=e||s),(r=t._rootFramesTimeline)._startTime=(n=i.ticker.frame)-(n-r._startTime)*r._timeScale/e,r._timeScale=t._rootTimeline._timeScale=e,e):r._timeScale},u.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},u.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},u.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},u.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},u.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},u.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},u.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},o},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,
1i){var r=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,r,n=this.vars;for(r in n)h(i=n[r])&&-1!==i.join("").indexOf("{self}")&&(n[r]=this._swapSelfInParams(i));h(n.tweens)&&this.add(n.tweens,0,n.align,n.stagger)},n=1e-10,o=i._internals,s=r._internals={},a=o.isSelector,h=o.isArray,l=o.lazyTweens,u=o.lazyRender,c=_gsScope._gsDefine.globals,p=function(t){var e,i={};for(e in t)i[e]=t[e];return i},f=function(t,e,i){var r,n,o=t.cycle;for(r in o)t[r]="function"==typeof(n=o[r])?n(i,e[i]):n[i%n.length];delete t.cycle},d=s.pauseCallback=function(){},m=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},y=r.prototype=new e;return r.version="2.0.1",y.constructor=r,y.kill()._gc=y._forcingPlayhead=y._hasPause=!1,y.to=function(t,e,r,n){return e?this.add(new(r.repeat&&c.TweenMax||i)(t,e,r),n):this.set(t,r,n)},y.from=function(t,e,r,n){return this.add((r.repeat&&c.TweenMax||i).from(t,e,r),n)},y.fromTo=function(t,e,r,n,o){return e?this.add((n.repeat&&c.TweenMax||i).fromTo(t,e,r,n),o):this.set(t,n,o)},y.staggerTo=function(t,e,n,o,s,h,l,u){var c,d,y=new r({onComplete:h,onCompleteParams:l,callbackScope:u,smoothChildTiming:this.smoothChildTiming}),g=n.cycle;for("string"==typeof t&&(t=i.selector(t)||t),a(t=t||[])&&(t=m(t)),0>(o=o||0)&&((t=m(t)).reverse(),o*=-1),d=0;d<t.length;d++)(c=p(n)).startAt&&(c.startAt=p(c.startAt),c.startAt.cycle&&f(c.startAt,t,d)),g&&(f(c,t,d),null!=c.duration&&(e=c.duration,delete c.duration)),y.to(t[d],e,c,d*o);return this.add(y,s)},y.staggerFrom=function(t,e,i,r,n,o,s,a){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,r,n,o,s,a)},y.staggerFromTo=function(t,e,i,r,n,o,s,a,h){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,r,n,o,s,a,h)},y.call=function(t,e,r,n){return this.add(i.delayedCall(0,t,e,r),n)},y.set=function(t,e,r){return r=this._parseTimeOrLabel(r,0,!0),null==e.immediateRender&&(e.immediateRender=r===this._time&&!this._paused),this.add(new i(t,0,e),r)},r.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var n,o,s,a,h=new r(t),l=h._timeline;for(null==e&&(e=!0),l._remove(h,!0),h._startTime=0,h._rawPrevTime=h._time=h._totalTime=l._time,s=l._first;s;)a=s._next,e&&s instanceof i&&s.target===s.vars.onComplete||(0>(o=s._startTime-s._delay)&&(n=1),h.add(s,o)),s=a;return l.add(h,0),n&&h.totalDuration(),h},y.add=function(n,o,s,a){var l,u,c,p,f,d;if("number"!=typeof o&&(o=this._parseTimeOrLabel(o,0,!0,n)),!(n instanceof t)){if(n instanceof Array||n&&n.push&&h(n)){for(s=s||"normal",a=a||0,l=o,u=n.length,c=0;u>c;c++)h(p=n[c])&&(p=new r({tweens:p})),this.add(p,l),"string"!=typeof p&&"function"!=typeof p&&("sequence"===s?l=p._startTime+p.totalDuration()/p._timeScale:"start"===s&&(p._startTime-=p.delay())),l+=a;return this._uncache(!0)}if("string"==typeof n)return this.addLabel(n,o);if("function"!=typeof n)throw"Cannot add "+n+" into the timeline; it is not a tween, timeline, function, or string.";n=i.delayedCall(0,n)}if(e.prototype.add.call(this,n,o),n._time&&n.render((this.rawTime()-n._startTime)*n._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(d=(f=this).rawTime()>n._startTime;f._timeline;)d&&f._timeline.smoothChildTiming?f.totalTime(f._totalTime,!0):f._gc&&f._enabled(!0,!1),f=f._timeline;return this},y.remove=function(e){if(e instanceof t){this._remove(e,!1);var i=e._timeline=e.vars.useFrames?t._rootFramesTimeline:t._rootTimeline;return e._startTime=(e._paused?e._pauseTime:i._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&h(e)){for(var r=e.length;--r>-1;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},y._remove=function(t,i){return e.prototype._remove.call(this,t,i),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},y.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))}
vendor: 4,124 bytes, line 1
1,y.insert=y.insertMultiple=function(t,e,i,r){return this.add(t,e||0,i,r)},y.appendMultiple=function(t,e,i,r){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,r)},y.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},y.addPause=function(t,e,r,n){var o=i.delayedCall(0,d,r,n||this);return o.vars.onComplete=o.vars.onReverseComplete=e,o.data="isPause",this._hasPause=!0,this.add(o,t)},y.removeLabel=function(t){return delete this._labels[t],this},y.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},y._parseTimeOrLabel=function(e,i,r,n){var o,s;if(n instanceof t&&n.timeline===this)this.remove(n);else if(n&&(n instanceof Array||n.push&&h(n)))for(s=n.length;--s>-1;)n[s]instanceof t&&n[s].timeline===this&&this.remove(n[s]);if(o="number"!=typeof e||i?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof i)return this._parseTimeOrLabel(i,r&&"number"==typeof e&&null==this._labels[i]?e-o:0,r);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=o);else{if(-1===(s=e.indexOf("=")))return null==this._labels[e]?r?this._labels[e]=o+i:i:this._labels[e]+i;i=parseInt(e.charAt(s-1)+"1",10)*Number(e.substr(s+1)),e=s>1?this._parseTimeOrLabel(e.substr(0,s-1),0,r):o}return Number(e)+i},y.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),!1!==e)},y.stop=function(){return this.paused(!0)},y.gotoAndPlay=function(t,e){return this.play(t,e)},y.gotoAndStop=function(t,e){return this.pause(t,e)},y.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,o,s,a,h,c,p,f=this._time,d=this._dirty?this.totalDuration():this._totalDuration,m=this._startTime,y=this._timeScale,g=this._paused;if(f!==this._time&&(t+=this._time-f),t>=d-1e-7&&t>=0)this._totalTime=this._time=d,this._reversed||this._hasPausedChild()||(o=!0,a="onComplete",h=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=t&&t>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===n)&&this._rawPrevTime!==t&&this._first&&(h=!0,this._rawPrevTime>n&&(a="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:n,t=d+1e-4;else if(1e-7>t)if(this._totalTime=this._time=0,(0!==f||0===this._duration&&this._rawPrevTime!==n&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(a="onReverseComplete",o=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(h=o=!0,a="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(h=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:n,0===t&&o)for(r=this._first;r&&0===r._startTime;)r._duration||(o=!1),r=r._next;t=0,this._initted||(h=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=f)for(r=this._first;r&&r._startTime<=t&&!c;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(c=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!c;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(c=r),r=r._prev;c&&(this._time=t=c._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=t}if(this._time!==f&&this._first||i||h||c){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==f&&t>0&&(this._active=!0),0===f&&this.vars.onStart&&(0===this._time&&this._duration||e||this._callback("onStart")),(p=this._time)>=f)for(r=this._first;r&&(s=r._next,p===this._time&&(!this._paused||g));)(r._active||r._startTime<=p&&!r._paused&&!r._gc)&&(c===r&&this.pause(),r.render(r._reversed?(r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale:(t-r._startTime)*r._timeScale,e,i)),r=s;else for(r=this._last;r&&(s=r._prev,p===this._time&&(!this._paused||g));){if(r._active||r._startTime<=f&&!r._paused&&!r._gc){if(c===r){for(c=r._prev;c&&c.endTime()>this._time;)c.render(c._reversed?c.totalDuration()-(t-c._startTime)*c._timeScale:(t-c._startTime)*c._timeScale,e,i),c=c._prev;c=null,this.pause()}r.render(r._reversed?(r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale:(t-r._startTime)*r._timeScale,e,i)}r=s}
1this._onUpdate&&(e||(l.length&&u(),this._callback("onUpdate"))),a&&(this._gc||(m===this._startTime||y!==this._timeScale)&&(0===this._time||d>=this.totalDuration())&&(o&&(l.length&&u(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this._callback(a)))}},y._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof r&&t._hasPausedChild())return!0;t=t._next}return!1},y.getChildren=function(t,e,r,n){n=n||-9999999999;for(var o=[],s=this._first,a=0;s;)s._startTime<n||(s instanceof i?!1!==e&&(o[a++]=s):(!1!==r&&(o[a++]=s),!1!==t&&(a=(o=o.concat(s.getChildren(!0,e,r))).length))),s=s._next;return o},y.getTweensOf=function(t,e){var r,n,o=this._gc,s=[],a=0;for(o&&this._enabled(!0,!0),n=(r=i.getTweensOf(t)).length;--n>-1;)(r[n].timeline===this||e&&this._contains(r[n]))&&(s[a++]=r[n]);return o&&this._enabled(!1,!0),s},y.recent=function(){return this._recent},y._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},y.shiftChildren=function(t,e,i){i=i||0;for(var r,n=this._first,o=this._labels;n;)n._startTime>=i&&(n._startTime+=t),n=n._next;if(e)for(r in o)o[r]>=i&&(o[r]+=t);return this._uncache(!0)},y._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),r=i.length,n=!1;--r>-1;)i[r]._kill(t,e)&&(n=!0);return n},y.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},y.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},y._enabled=function(t,i){if(t===this._gc)for(var r=this._first;r;)r._enabled(t,!0),r=r._next;return e.prototype._enabled.call(this,t,i)},y.totalTime=function(e,i,r){this._forcingPlayhead=!0;var n=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,n},y.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},y.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,r=0,n=this._last,o=999999999999;n;)e=n._prev,n._dirty&&n.totalDuration(),n._startTime>o&&this._sortChildren&&!n._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(n,n._startTime-n._delay),this._calculatingDuration=0):o=n._startTime,n._startTime<0&&!n._paused&&(r-=n._startTime,this._timeline.smoothChildTiming&&(this._startTime+=n._startTime/this._timeScale,this._time-=n._startTime,this._totalTime-=n._startTime,this._rawPrevTime-=n._startTime),this.shiftChildren(-n._startTime,!1,-9999999999),o=0),(i=n._startTime+n._totalDuration/n._timeScale)>r&&(r=i),n=e;this._duration=this._totalDuration=r,this._dirty=!1}return this._totalDuration}return t&&this.totalDuration()?this.timeScale(this._totalDuration/t):this},y.paused=function(e){if(!e)for(var i=this._first,r=this._time;i;)i._startTime===r&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},y.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},y.rawTime=function(t){return t&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(t)-this._startTime)*this._timeScale},r},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var r=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._dirty=!0},n=1e-10,o=e._internals,s=o.lazyTweens,a=o.lazyRender,h=_gsScope._gsDefine.globals,l=new i(null,null,1,0),u=r.prototype=new t;return u.constructor=r,u.kill()._gc=!1,r.version="2.0.1",u.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},u.addCallback=function(t,i,r,n){return this.add(e.delayedCall(0,t,r,n),i)},u.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),r=i.length,n=this._parseTimeOrLabel(e);--r>-1;)i[r]._startTime===n&&i[r]._enabled(!1,!1);return this},u.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},u.tweenTo=function(t,i){i=i||{};var r,n,o,s={ease:l,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},a=i.repeat&&h.TweenMax||e;for(n in i)s[n]=i[n];return s.time=this._parseTimeOrLabel(t),r=Math.abs(Number(s.time)-this._time)/this._timeScale||.001,o=new a(this,r,s),s.onStart=function(){o.target.paused(!0),o.vars.time===o.target.time()||r!==o.duration()||o.isFromTo||o.duration(Math.abs(o.vars.time-o.target.time())/o.target._timeScale).render(o.time(),!0,!0),i.onStart&&i.onStart.apply(i.onStartScope||i.callbackScope||o,i.onStartParams||[])},o}
1,u.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],callbackScope:this},i.immediateRender=!1!==i.immediateRender;var r=this.tweenTo(e,i);return r.isFromTo=1,r.duration(Math.abs(r.vars.time-t)/this._timeScale||.001)},u.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,o,h,l,u,c,p,f,d=this._time,m=this._dirty?this.totalDuration():this._totalDuration,y=this._duration,g=this._totalTime,v=this._startTime,_=this._timeScale,b=this._rawPrevTime,x=this._paused,w=this._cycle;if(d!==this._time&&(t+=this._time-d),t>=m-1e-7&&t>=0)this._locked||(this._totalTime=m,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(o=!0,l="onComplete",u=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=t&&t>=-1e-7||0>b||b===n)&&b!==t&&this._first&&(u=!0,b>n&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:n,this._yoyo&&0!=(1&this._cycle)?this._time=t=0:(this._time=y,t=y+1e-4);else if(1e-7>t)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==d||0===y&&b!==n&&(b>0||0>t&&b>=0)&&!this._locked)&&(l="onReverseComplete",o=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(u=o=!0,l="onReverseComplete"):b>=0&&this._first&&(u=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=y||!e||t||this._rawPrevTime===t?t:n,0===t&&o)for(r=this._first;r&&0===r._startTime;)r._duration||(o=!1),r=r._next;t=0,this._initted||(u=!0)}else if(0===y&&0>b&&(u=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(this._cycle=this._totalTime/(c=y+this._repeatDelay)>>0,0!==this._cycle&&this._cycle===this._totalTime/c&&t>=g&&this._cycle--,this._time=this._totalTime-this._cycle*c,this._yoyo&&0!=(1&this._cycle)&&(this._time=y-this._time),this._time>y?(this._time=y,t=y+1e-4):this._time<0?this._time=t=0:t=this._time)),this._hasPause&&!this._forcingPlayhead&&!e){if((t=this._time)>=d||this._repeat&&w!==this._cycle)for(r=this._first;r&&r._startTime<=t&&!p;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(p=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!p;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(p=r),r=r._prev;p&&p._startTime<y&&(this._time=t=p._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var T=this._yoyo&&0!=(1&w),S=T===(this._yoyo&&0!=(1&this._cycle)),M=this._totalTime,E=this._cycle,C=this._rawPrevTime,A=this._time;if(this._totalTime=w*y,this._cycle<w?T=!T:this._totalTime+=y,this._time=d,this._rawPrevTime=0===y?b-1e-4:b,this._cycle=w,this._locked=!0,this.render(d=T?0:y,e,0===y),e||this._gc||this.vars.onRepeat&&(this._cycle=E,this._locked=!1,this._callback("onRepeat")),d!==this._time)return;if(S&&(this._cycle=w,this._locked=!0,this.render(d=T?y+1e-4:-1e-4,!0,!1)),this._locked=!1,this._paused&&!x)return;this._time=A,this._totalTime=M,this._cycle=E,this._rawPrevTime=C}if(this._time!==d&&this._first||i||u||p){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==g&&t>0&&(this._active=!0),0===g&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||e||this._callback("onStart")),(f=this._time)>=d)for(r=this._first;r&&(h=r._next,f===this._time&&(!this._paused||x));)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(p===r&&this.pause(),r.render(r._reversed?(r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale:(t-r._startTime)*r._timeScale,e,i)),r=h;else for(r=this._last;r&&(h=r._prev,f===this._time&&(!this._paused||x));){if(r._active||r._startTime<=d&&!r._paused&&!r._gc){if(p===r){for(p=r._prev;p&&p.endTime()>this._time;)p.render(p._reversed?p.totalDuration()-(t-p._startTime)*p._timeScale:(t-p._startTime)*p._timeScale,e,i),p=p._prev;p=null,this.pause()}r.render(r._reversed?(r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale:(t-r._startTime)*r._timeScale,e,i)}r=h}this._onUpdate&&(e||(s.length&&a(),this._callback("onUpdate"))),l&&(this._locked||this._gc||(v===this._startTime||_!==this._timeScale)&&(0===this._time||m>=this.totalDuration())&&(o&&(s.length&&a(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[l]&&this._callback(l)))}else g!==this._totalTime&&this._onUpdate&&(e||this._callback("onUp
1date"))},u.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var r,n,o=[],s=this.getChildren(t,e,i),a=0,h=s.length;for(r=0;h>r;r++)(n=s[r]).isActive()&&(o[a++]=n);return o},u.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),r=i.length;for(e=0;r>e;e++)if(i[e].time>t)return i[e].name;return null},u.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(e[i].time<t)return e[i].name;return null},u.getLabelsArray=function(){var t,e=[],i=0;for(t in this._labels)e[i++]={time:this._labels[t],name:t};return e.sort(function(t,e){return t.time-e.time}),e},u.invalidate=function(){return this._locked=!1,t.prototype.invalidate.call(this)},u.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()||0},u.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()||0},u.totalDuration=function(e){return arguments.length?-1!==this._repeat&&e?this.timeScale(this.totalDuration()/e):this:(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},u.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},u.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},u.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},u.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},r},!0),t=180/Math.PI,e=[],i=[],r=[],n={},o=_gsScope._gsDefine.globals,s=function(t,e,i,r){i===r&&(i=r-(r-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=r,this.da=r-t,this.ca=i-t,this.ba=e-t},a=function(t,e,i,r){var n={a:t},o={},s={},a={c:r},h=(t+e)/2,l=(e+i)/2,u=(i+r)/2,c=(h+l)/2,p=(l+u)/2,f=(p-c)/8;return n.b=h+(t-h)/4,o.b=c+f,n.c=o.a=(n.b+o.b)/2,o.c=s.a=(c+p)/2,s.b=p-f,a.b=u+(r-u)/4,s.c=a.a=(s.b+a.b)/2,[n,o,s,a]},h=function(t,n,o,s,h){var l,u,c,p,f,d,m,y,g,v,_,b,x,w=t.length-1,T=0,S=t[0].a;for(l=0;w>l;l++)u=(f=t[T]).a,c=f.d,p=t[T+1].d,h?(x=((b=i[l])+(_=e[l]))*n*.25/(s?.5:r[l]||.5),y=c-((d=c-(c-u)*(s?.5*n:0!==_?x/_:0))+(((m=c+(p-c)*(s?.5*n:0!==b?x/b:0))-d)*(3*_/(_+b)+.5)/4||0))):y=c-((d=c-(c-u)*n*.5)+(m=c+(p-c)*n*.5))/2,m+=y,f.c=g=d+=y,f.b=0!==l?S:S=f.a+.6*(f.c-f.a),f.da=c-u,f.ca=g-u,f.ba=S-u,o?(v=a(u,S,g,c),t.splice(T,1,v[0],v[1],v[2],v[3]),T+=4):T++,S=m;(f=t[T]).b=S,f.c=S+.4*(f.d-S),f.da=f.d-f.a,f.ca=f.c-f.a,f.ba=S-f.a,o&&(v=a(f.a,S,f.c,f.d),t.splice(T,1,v[0],v[1],v[2],v[3]))},l=function(t,r,n,o){var a,h,l,u,c,p,f=[];if(o)for(h=(t=[o].concat(t)).length;--h>-1;)"string"==typeof(p=t[h][r])&&"="===p.charAt(1)&&(t[h][r]=o[r]+Number(p.charAt(0)+p.substr(2)));if(0>(a=t.length-2))return f[0]=new s(t[0][r],0,0,t[0][r]),f;for(h=0;a>h;h++)f[h]=new s(l=t[h][r],0,0,u=t[h+1][r]),n&&(c=t[h+2][r],e[h]=(e[h]||0)+(u-l)*(u-l),i[h]=(i[h]||0)+(c-u)*(c-u));return f[h]=new s(t[h][r],0,0,t[h+1][r]),f},u=function(t,o,s,a,u,c){var p,f,d,m,y,g,v,_,b={},x=[],w=c||t[0];for(f in u="string"==typeof u?","+u+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",null==o&&(o=1),t[0])x.push(f);if(t.length>1){for(_=t[t.length-1],v=!0,p=x.length;--p>-1;)if(f=x[p],Math.abs(w[f]-_[f])>.05){v=!1;break}v&&(t=t.concat(),c&&t.unshift(c),t.push(t[1]),c=t[t.length-3])}for(e.length=i.length=r.length=0,p=x.length;--p>-1;)n[f=x[p]]=-1!==u.indexOf(","+f+","),b[f]=l(t,f,n[f],c);for(p=e.length;--p>-1;)e[p]=Math.sqrt(e[p]),i[p]=Math.sqrt(i[p]);if(!a){for(p=x.length;--p>-1;)if(n[f])for(g=(d=b[x[p]]).length-1,m=0;g>m;m++)r[m]=(r[m]||0)+(y=d[m+1].da/i[m]+d[m].da/e[m]||0)*y;for(p=r.length;--p>-1;
1)r[p]=Math.sqrt(r[p])}for(p=x.length,m=s?4:1;--p>-1;)h(d=b[f=x[p]],o,s,a,n[f]),v&&(d.splice(0,m),d.splice(d.length-m,m));return b},c=function(t,e,i){var r,n,o,a,h,l,u,c,p,f,d={},m="cubic"===(e=e||"soft")?3:2,y="soft"===e,g=[];if(y&&i&&(t=[i].concat(t)),null==t||t.length<m+1)throw"invalid Bezier data";for(c in t[0])g.push(c);for(h=g.length;--h>-1;){for(d[c=g[h]]=a=[],p=0,u=t.length,l=0;u>l;l++)r=null==i?t[l][c]:"string"==typeof(f=t[l][c])&&"="===f.charAt(1)?i[c]+Number(f.charAt(0)+f.substr(2)):Number(f),y&&l>1&&u-1>l&&(a[p++]=(r+a[p-2])/2),a[p++]=r;for(u=p-m+1,p=0,l=0;u>l;l+=m)r=a[l],n=a[l+1],o=a[l+2],a[p++]=f=3===m?new s(r,n,o,2===m?0:a[l+3]):new s(r,(2*n+r)/3,(2*n+o)/3,o);a.length=p}return d},p=function(t,e,i){for(var r,n,o,s,a,h,l,u,c,p,f,d=1/i,m=t.length;--m>-1;)for(s=(p=t[m]).d-(o=p.a),a=p.c-o,h=p.b-o,r=n=0,u=1;i>=u;u++)r=n-(n=((l=d*u)*l*s+3*(c=1-l)*(l*a+c*h))*l),e[f=m*i+u-1]=(e[f]||0)+r*r},f=function(t,e){var i,r,n,o,s=[],a=[],h=0,l=0,u=(e=e>>0||6)-1,c=[],f=[];for(i in t)p(t[i],s,e);for(n=s.length,r=0;n>r;r++)h+=Math.sqrt(s[r]),f[o=r%e]=h,o===u&&(l+=h,c[o=r/e>>0]=f,a[o]=l,h=0,f=[]);return{length:l,lengths:a,segments:c}},d=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._mod={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var r,n,o,s,a,h=e.values||[],l={},p=h[0],d=e.autoRotate||i.vars.orientToBezier;for(r in this._autoRotate=d?d instanceof Array?d:[["x","y","rotation",!0===d?0:Number(d)||0]]:null,p)this._props.push(r);for(o=this._props.length;--o>-1;)this._overwriteProps.push(r=this._props[o]),n=this._func[r]="function"==typeof t[r],l[r]=n?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(t[r]),a||l[r]!==h[0][r]&&(a=l);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?u(h,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,a):c(h,e.type,l),this._segCount=this._beziers[r].length,this._timeRes){var m=f(this._beziers,this._timeRes);this._length=m.length,this._lengths=m.lengths,this._segments=m.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(d=this._autoRotate)for(this._initialRotations=[],d[0]instanceof Array||(this._autoRotate=d=[d]),o=d.length;--o>-1;){for(s=0;3>s;s++)this._func[r=d[o][s]]="function"==typeof t[r]&&t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)];this._initialRotations[o]=(this._func[r=d[o][2]]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,r,n,o,s,a,h,l,u,c,p=this._segCount,f=this._func,d=this._target,m=e!==this._startRatio;if(this._timeRes){if(u=this._lengths,c=this._curSeg,n=this._li,(e*=this._length)>this._l2&&p-1>n){for(l=p-1;l>n&&(this._l2=u[++n])<=e;);this._l1=u[n-1],this._li=n,this._curSeg=c=this._segments[n],this._s2=c[this._s1=this._si=0]}else if(e<this._l1&&n>0){for(;n>0&&(this._l1=u[--n])>=e;);0===n&&e<this._l1?this._l1=0:n++,this._l2=u[n],this._li=n,this._curSeg=c=this._segments[n],this._s1=c[(this._si=c.length-1)-1]||0,this._s2=c[this._si]}if(i=n,n=this._si,(e-=this._l1)>this._s2&&n<c.length-1){for(l=c.length-1;l>n&&(this._s2=c[++n])<=e;);this._s1=c[n-1],this._si=n}else if(e<this._s1&&n>0){for(;n>0&&(this._s1=c[--n])>=e;);0===n&&e<this._s1?this._s1=0:n++,this._s2=c[n],this._si=n}a=(n+(e-this._s1)/(this._s2-this._s1))*this._prec||0}else a=(e-(i=0>e?0:e>=1?p-1:p*e>>0)*(1/p))*p;for(r=1-a,n=this._props.length;--n>-1;)h=(a*a*(s=this._beziers[o=this._props[n]][i]).da+3*r*(a*s.ca+r*s.ba))*a+s.a,this._mod[o]&&(h=this._mod[o](h,d)),f[o]?d[o](h):d[o]=h;if(this._autoRotate){var y,g,v,_,b,x,w,T=this._autoRotate;for(n=T.length;--n>-1;)o=T[n][2],x=T[n][3]||0,w=!0===T[n][4]?1:t,y=this._beziers[T[n][1]],(s=this._beziers[T[n][0]])&&y&&(g=(s=s[i]).a+(s.b-s.a)*a,g+=((_=s.b+(s.c-s.b)*a)-g)*a,_+=(s.c+(s.d-s.c)*a-_)*a,v=(y=y[i]).a+(y.b-y.a)*a,v+=((b=y.b+(y.c-y.b)*a)-v)*a,b+=(y.c+(y.d-y.c)*a-b)*a,h=m?Math.atan2(b-v,_-g)*w+x:this._initialRotations[n],this._mod[o]&&(h=this._mod[o](h,d)),f[o]?d[o](h):d[o]=h)}}}),m=d.prototype,d.bezierThrough=u,d.cubicToQuadratic=a,d._autoCSS=!0,d.quadraticToCubic=function(t,e,
1i){return new s(t,(2*e+t)/3,(2*e+i)/3,i)},d._cssRegister=function(){var t=o.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,r=e._setPluginRatio,n=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,o,s,a,h){e instanceof Array&&(e={values:e}),h=new d;var l,u,c,p=e.values,f=p.length-1,m=[],y={};if(0>f)return a;for(l=0;f>=l;l++)c=i(t,p[l],s,a,h,f!==l),m[l]=c.end;for(u in e)y[u]=e[u];return y.values=m,(a=new n(t,"bezier",0,0,c.pt,2)).data=c,a.plugin=h,a.setRatio=r,0===y.autoRotate&&(y.autoRotate=!0),!y.autoRotate||y.autoRotate instanceof Array||(l=!0===y.autoRotate?0:Number(y.autoRotate),y.autoRotate=null!=c.end.left?[["left","top","rotation",l,!1]]:null!=c.end.x&&[["x","y","rotation",l,!1]]),y.autoRotate&&(s._transform||s._enableTransforms(!1),c.autoRotate=s._target._gsTransform,c.proxy.rotation=c.autoRotate.rotation||0,s._overwriteProps.push("rotation")),h._onInitTween(c.proxy,y,s._tween),a}})}},m._mod=function(t){for(var e,i=this._overwriteProps,r=i.length;--r>-1;)(e=t[i[r]])&&"function"==typeof e&&(this._mod[i[r]]=e)},m._kill=function(t){var e,i,r=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=r.length;--i>-1;)r[i]===e&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;--i>-1;)t[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,t)},_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,r,n,o,s=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=s.prototype.setRatio},a=_gsScope._gsDefine.globals,h={},l=s.prototype=new t("css");l.constructor=s,s.version="1.20.5",s.API=2,s.defaultTransformPerspective=0,s.defaultSkewType="compensated",s.defaultSmoothOrigin=!0,s.suffixMap={top:l="px",right:l,bottom:l,left:l,width:l,height:l,fontSize:l,padding:l,margin:l,perspective:l,lineHeight:""};var u,c,p,f,d,m,y,g,v=/(?:\-|\.|\b)(\d|\.|e\-)+/g,_=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,b=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,x=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,T=/opacity *= *([^)]*)/i,S=/opacity:([^;]*)/i,M=/alpha\(opacity *=.+?\)/i,E=/^(rgb|hsl)/,C=/([A-Z])/g,A=/-([a-z])/gi,P=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,k=function(t,e){return e.toUpperCase()},R=/(?:Left|Right|Width)/i,D=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,O=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,L=/,(?=[^\)]*(?:\(|$))/gi,I=/[\s,\(]/i,N=Math.PI/180,F=180/Math.PI,U={},B={style:{}},G=_gsScope.document||{createElement:function(){return B}},V=function(t,e){return G.createElementNS?G.createElementNS(e||"http://www.w3.org/1999/xhtml",t):G.createElement(t)},q=V("div"),z=V("img"),j=s._internals={_specialProps:h},H=(_gsScope.navigator||{}).userAgent||"",X=function(){var t=H.indexOf("Android"),e=V("a");return p=-1!==H.indexOf("Safari")&&-1===H.indexOf("Chrome")&&(-1===t||parseFloat(H.substr(t+8,2))>3),d=p&&parseFloat(H.substr(H.indexOf("Version/")+8,2))<6,f=-1!==H.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(H)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(H))&&(m=parseFloat(RegExp.$1)),!!e&&(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity))}(),W=function(t){return T.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Y=function(t){_gsScope.console&&console.log(t)},Z="",Q="",$=function(t,e){var i,r,n=(e=e||q).style;if(void 0!==n[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;--r>-1&&void 0===n[i[r]+t];);return r>=0?(Z="-"+(Q=3===r?"ms":i[r]).toLowerCase()+"-",Q+t):null},K=("undefined"!=typeof window?window:G.defaultView||{getComputedStyle:function(){}}).getComputedStyle,J=s.getStyle=function(t,e,i,r,n){var o;return X||"opacity"!==e?(!r&&t.style[e]?o=t.style[e]:(i=i||K(t))?o=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(C,"-$1").toLowerCase()):t.currentStyle&&(o=t.currentStyle[e]),null==n||o&&"none"!==o&&"auto"!==o&&"auto auto"!==o?o:n):W(t)},tt=j.convertToPixels=function(t,i,r,n,o){if("px"===n||!n&&"lineHeight"!==i)return r;if("auto"===n||!r)return 0;var a,h,l,u=R.test(i),c=t,p=q.style,f=0>r,d=1===r;if(f&&(r=-r),d&&(r*=100),"lineHeight"!==i||n)if("%"===n&&-1!==i.indexOf("border"))a=r/100*(u?t.clientWidth:t.clientHeight);else{if(p.cssText="border:0 solid red;position:"+J(t,"position")+";line-height:0;","%"!==n&&c.appendChild&&"v"!==n.charAt(0)&&"rem"!==n)p[u?"borderLeftWidth":"borderTopWidth"]=r+n;else{if(-1!==J(c=t.parentNode||G.body,"display").indexOf("flex")&&(p.position="absolute"),l=e.ticker.frame,(h=c._gsCache)&&u&&h.time===l)return h.width*r/100;p[u?"width":"height"]=r+n}c.appendChild(q),a=parseFloat(q[u?"offsetWidth":"offsetHeight"]),c.removeChild(q),u&&"%"===n&&!1!==s.cacheWidths&&((h=c._gsCache=c._gsCache||{}).time=l,h.width=a/r*100),0!==a||o||(a=tt(t,i,r,n,!0))}else h=K(t).lineHeight,t.style.lineHeight=r,a=parseFloat(K(t).lineHeight),t.style.lineHeight=h;return d&&(a/=100),f?-a:a}
vendor: 5,363 bytes, line 1
1,et=j.calculateOffset=function(t,e,i){if("absolute"!==J(t,"position",i))return 0;var r="left"===e?"Left":"Top",n=J(t,"margin"+r,i);return t["offset"+r]-(tt(t,e,parseFloat(n),n.replace(w,""))||0)},it=function(t,e){var i,r,n,o={};if(e=e||K(t,null))if(i=e.length)for(;--i>-1;)(-1===(n=e[i]).indexOf("-transform")||Pt===n)&&(o[n.replace(A,k)]=e.getPropertyValue(n));else for(i in e)(-1===i.indexOf("Transform")||At===i)&&(o[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===o[i]&&(o[i.replace(A,k)]=e[i]);return X||(o.opacity=W(t)),r=qt(t,e,!1),o.rotation=r.rotation,o.skewX=r.skewX,o.scaleX=r.scaleX,o.scaleY=r.scaleY,o.x=r.x,o.y=r.y,Rt&&(o.z=r.z,o.rotationX=r.rotationX,o.rotationY=r.rotationY,o.scaleZ=r.scaleZ),o.filters&&delete o.filters,o},rt=function(t,e,i,r,n){var o,s,a,h={},l=t.style;for(s in i)"cssText"!==s&&"length"!==s&&isNaN(s)&&(e[s]!==(o=i[s])||n&&n[s])&&-1===s.indexOf("Origin")&&("number"==typeof o||"string"==typeof o)&&(h[s]="auto"!==o||"left"!==s&&"top"!==s?""!==o&&"auto"!==o&&"none"!==o||"string"!=typeof e[s]||""===e[s].replace(x,"")?o:0:et(t,s),void 0!==l[s]&&(a=new vt(l,s,l[s],a)));if(r)for(s in r)"className"!==s&&(h[s]=r[s]);return{difs:h,firstMPT:a}},nt={width:["Left","Right"],height:["Top","Bottom"]},ot=["marginLeft","marginRight","marginTop","marginBottom"],st=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||K(t))[e]||0;if(t.getCTM&&Bt(t))return t.getBBox()[e]||0;var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),n=nt[e],o=n.length;for(i=i||K(t,null);--o>-1;)r-=parseFloat(J(t,"padding"+n[o],i,!0))||0,r-=parseFloat(J(t,"border"+n[o]+"Width",i,!0))||0;return r},at=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";(null==t||""===t)&&(t="0 0");var i,r=t.split(" "),n=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":r[0],o=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":r[1];if(r.length>3&&!e){for(r=t.split(", ").join(",").split(","),t=[],i=0;i<r.length;i++)t.push(at(r[i]));return t.join(",")}return null==o?o="center"===n?"50%":"0":"center"===o&&(o="50%"),("center"===n||isNaN(parseFloat(n))&&-1===(n+"").indexOf("="))&&(n="50%"),t=n+" "+o+(r.length>2?" "+r[2]:""),e&&(e.oxp=-1!==n.indexOf("%"),e.oyp=-1!==o.indexOf("%"),e.oxr="="===n.charAt(1),e.oyr="="===o.charAt(1),e.ox=parseFloat(n.replace(x,"")),e.oy=parseFloat(o.replace(x,"")),e.v=t),e||t},ht=function(t,e){return"function"==typeof t&&(t=t(g,y)),"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)||0},lt=function(t,e){return"function"==typeof t&&(t=t(g,y)),null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)||0},ut=function(t,e,i,r){var n,o,s,a,h;return"function"==typeof t&&(t=t(g,y)),null==t?a=e:"number"==typeof t?a=t:(n=360,o=t.split("_"),s=((h="="===t.charAt(1))?parseInt(t.charAt(0)+"1",10)*parseFloat(o[0].substr(2)):parseFloat(o[0]))*(-1===t.indexOf("rad")?1:F)-(h?0:e),o.length&&(r&&(r[i]=e+s),-1!==t.indexOf("short")&&(s%=n)!=s%180&&(s=0>s?s+n:s-n),-1!==t.indexOf("_cw")&&0>s?s=(s+9999999999*n)%n-(s/n|0)*n:-1!==t.indexOf("ccw")&&s>0&&(s=(s-9999999999*n)%n-(s/n|0)*n)),a=e+s),1e-6>a&&a>-1e-6&&(a=0),a},ct={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},pt=function(t,e,i){return 255*(1>6*(t=0>t?t+1:t>1?t-1:t)?e+(i-e)*t*6:.5>t?i:2>3*t?e+(i-e)*(2/3-t)*6:e)+.5|0},ft=s.parseColor=function(t,e){var i,r,n,o,s,a,h,l,u,c,p;if(t)if("number"==typeof t)i=[t>>16,t>>8&255,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),ct[t])i=ct[t];else if("#"===t.charAt(0))4===t.length&&(r=t.charAt(1),n=t.charAt(2),o=t.charAt(3),t="#"+r+r+n+n+o+o),i=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t];else if("hsl"===t.substr(0,3))if(i=p=t.match(v),e){if(-1!==t.indexOf("="))return t.match(_)}else s=Number(i[0])%360/360,a=Number(i[1])/100,r=2*(h=Number(i[2])/100)-(n=.5>=h?h*(a+1):h+a-h*a),i.length>3&&(i[3]=Number(i[3])),i[0]=pt(s+1/3,r,n),i[1]=pt(s,r,n),i[2]=pt(s-1/3,r,n);else i=t.match(v)||ct.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),i.length>3&&(i[3]=Number(i[3]))}else i=ct.black;return e&&!p&&(r=i[0]/255,n=i[1]/255,o=i[2]/255,h=((l=Math.max(r,n,o))+(u=Math.min(r,n,o)))/2,l===u?s=a=0:(c=l-u,a=h>.5?c/(2-l-u):c/(l+u),s=l===r?(n-o)/c+(o>n?6:0):l===n?(o-r)/c+2:(r-n)/c+4,s*=60),i[0]=s+.5|0,i[1]=100*a+.5|0,i[2]=100*h+.5|0),i},dt=function(t,e){var i,r,n,o=t.match(mt)||[],s=0,a="";if(!o.length)return t;for(i=0;i<o.length;i++)s+=(n=t.substr(s,t.indexOf(r=o[i],s)-s)).length+r.length,3===(r=ft(r,e)).length&&r.push(1),a+=n+(e?"hsla("+r[0]+","+r[1]+"%,"+r[2]+"%,"+r[3]:"rgba("+r.join(","))+")";return a+t.substr(s)},mt="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(l in ct)mt+="|"+l+"\\b";mt=new RegExp(mt+")","gi"),s.colorStringFilter=function(t){var e,i=t[0]+" "+t[1];mt.test(i)&&(e=-1!==i.indexOf("hsl(")||-1!==i.indexOf("hsla("),t[0]=dt(t[0],e),t[1]=dt(t[1],e)),mt.lastIndex=0},e.defaultStringFilter||(e.defaultStringFilter=s.colorStringFilter);
1var yt=function(t,e,i,r){if(null==t)return function(t){return t};var n,o=e?(t.match(mt)||[""])[0]:"",s=t.split(o).join("").match(b)||[],a=t.substr(0,t.indexOf(s[0])),h=")"===t.charAt(t.length-1)?")":"",l=-1!==t.indexOf(" ")?" ":",",u=s.length,c=u>0?s[0].replace(v,""):"";return u?n=e?function(t){var e,p,f,d;if("number"==typeof t)t+=c;else if(r&&L.test(t)){for(d=t.replace(L,"|").split("|"),f=0;f<d.length;f++)d[f]=n(d[f]);return d.join(",")}if(e=(t.match(mt)||[o])[0],f=(p=t.split(e).join("").match(b)||[]).length,u>f--)for(;++f<u;)p[f]=i?p[(f-1)/2|0]:s[f];return a+p.join(l)+l+e+h+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,o,p;if("number"==typeof t)t+=c;else if(r&&L.test(t)){for(o=t.replace(L,"|").split("|"),p=0;p<o.length;p++)o[p]=n(o[p]);return o.join(",")}if(p=(e=t.match(b)||[]).length,u>p--)for(;++p<u;)e[p]=i?e[(p-1)/2|0]:s[p];return a+e.join(l)+h}:function(t){return t}},gt=function(t){return t=t.split(","),function(e,i,r,n,o,s,a){var h,l=(i+"").split(" ");for(a={},h=0;4>h;h++)a[t[h]]=l[h]=l[h]||l[(h-1)/2>>0];return n.parse(e,a,o,s)}},vt=(j._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,r,n,o,s=this.data,a=s.proxy,h=s.firstMPT;h;)e=a[h.v],h.r?e=h.r(e):1e-6>e&&e>-1e-6&&(e=0),h.t[h.p]=e,h=h._next;if(s.autoRotate&&(s.autoRotate.rotation=s.mod?s.mod.call(this._tween,a.rotation,this.t,this._tween):a.rotation),1===t||0===t)for(h=s.firstMPT,o=1===t?"e":"b";h;){if((i=h.t).type){if(1===i.type){for(n=i.xs0+i.s+i.xs1,r=1;r<i.l;r++)n+=i["xn"+r]+i["xs"+(r+1)];i[o]=n}}else i[o]=i.s+i.xs0;h=h._next}},function(t,e,i,r,n){this.t=t,this.p=e,this.v=i,this.r=n,r&&(r._prev=this,this._next=r)}),_t=(j._parseToProxy=function(t,e,i,r,n,o){var s,a,h,l,u,c=r,p={},f={},d=i._transform,m=U;for(i._transform=null,U=e,r=u=i.parse(t,e,r,n),U=m,o&&(i._transform=d,c&&(c._prev=null,c._prev&&(c._prev._next=null)));r&&r!==c;){if(r.type<=1&&(f[a=r.p]=r.s+r.c,p[a]=r.s,o||(l=new vt(r,"s",a,l,r.r),r.c=0),1===r.type))for(s=r.l;--s>0;)f[a=r.p+"_"+(h="xn"+s)]=r.data[h],p[a]=r[h],o||(l=new vt(r,h,a,l,r.rxp[h]));r=r._next}return{proxy:p,end:f,firstMPT:l,pt:u}},j.CSSPropTween=function(t,e,r,n,s,a,h,l,u,c,p){this.t=t,this.p=e,this.s=r,this.c=n,this.n=h||e,t instanceof _t||o.push(this.n),this.r=l?"function"==typeof l?l:Math.round:l,this.type=a||0,u&&(this.pr=u,i=!0),this.b=void 0===c?r:c,this.e=void 0===p?r+n:p,s&&(this._next=s,s._prev=this)}),bt=function(t,e,i,r,n,o){var s=new _t(t,e,i,r-i,n,-1,o);return s.b=i,s.e=s.xs0=r,s},xt=s.parseComplex=function(t,e,i,r,n,o,a,h,l,c){i=i||o||"","function"==typeof r&&(r=r(g,y)),a=new _t(t,e,0,0,a,c?2:1,null,!1,h,i,r),r+="",n&&mt.test(r+i)&&(s.colorStringFilter(r=[i,r]),i=r[0],r=r[1]);var p,f,d,m,b,x,w,T,S,M,E,C,A,P=i.split(", ").join(",").split(" "),k=r.split(", ").join(",").split(" "),R=P.length,D=!1!==u;for((-1!==r.indexOf(",")||-1!==i.indexOf(","))&&(-1!==(r+i).indexOf("rgb")||-1!==(r+i).indexOf("hsl")?(P=P.join(" ").replace(L,", ").split(" "),k=k.join(" ").replace(L,", ").split(" ")):(P=P.join(" ").split(",").join(", ").split(" "),k=k.join(" ").split(",").join(", ").split(" ")),R=P.length),R!==k.length&&(R=(P=(o||"").split(" ")).length),a.plugin=l,a.setRatio=c,mt.lastIndex=0,p=0;R>p;p++)if(m=P[p],b=k[p]+"",(T=parseFloat(m))||0===T)a.appendXtra("",T,ht(b,T),b.replace(_,""),!(!D||-1===b.indexOf("px"))&&Math.round,!0);else if(n&&mt.test(m))C=")"+((C=b.indexOf(")")+1)?b.substr(C):""),A=-1!==b.indexOf("hsl")&&X,M=b,m=ft(m,A),b=ft(b,A),(S=m.length+b.length>6)&&!X&&0===b[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(k[p]).join("transparent")):(X||(S=!1),A?a.appendXtra(M.substr(0,M.indexOf("hsl"))+(S?"hsla(":"hsl("),m[0],ht(b[0],m[0]),",",!1,!0).appendXtra("",m[1],ht(b[1],m[1]),"%,",!1).appendXtra("",m[2],ht(b[2],m[2]),S?"%,":"%"+C,!1):a.appendXtra(M.substr(0,M.indexOf("rgb"))+(S?"rgba(":"rgb("),m[0],b[0]-m[0],",",Math.round,!0).appendXtra("",m[1],b[1]-m[1],",",Math.round).appendXtra("",m[2],b[2]-m[2],S?",":C,Math.round),S&&a.appendXtra("",m=m.length<4?1:m[3],(b.length<4?1:b[3])-m,C,!1)),mt.lastIndex=0;else if(x=m.match(v)){if(!(w=b.match(_))||w.length!==x.length)return a;for(d=0,f=0;f<x.length;f++)M=m.indexOf(E=x[f],d),a.appendXtra(m.substr(d,M-d),Number(E),ht(w[f],E),"",!(!D||"px"!==m.substr(M+E.length,2))&&Math.round,0===f),d=M+E.length;a["xs"+a.l]+=m.substr(d)}else a["xs"+a.l]+=a.l||a["xs"+a.l]?" "+b:b;if(-1!==r.indexOf("=")&&a.data){for(C=a.xs0+a.data.s,p=1;p<a.l;p++)C+=a["xs"+p]+a.data["xn"+p];a.e=C+a["xs"+p]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},wt=9;for((l=_t.prototype).l=l.pr=0;--wt>0;)l["xn"+wt]=0,l["xs"+wt]="";l.xs0="",l._next=l._prev=l.xfirst=l.data=l.plugin=l.setRatio=l.rxp=null,l.appendXtra=function(t,e,
1i,r,n,o){var s=this,a=s.l;return s["xs"+a]+=o&&(a||s["xs"+a])?" "+t:t||"",i||0===a||s.plugin?(s.l++,s.type=s.setRatio?2:1,s["xs"+s.l]=r||"",a>0?(s.data["xn"+a]=e+i,s.rxp["xn"+a]=n,s["xn"+a]=e,s.plugin||(s.xfirst=new _t(s,"xn"+a,e,i,s.xfirst||s,0,s.n,n,s.pr),s.xfirst.xs0=0),s):(s.data={s:e+i},s.rxp={},s.s=e,s.c=i,s.r=n,s)):(s["xs"+a]+=e+(r||""),s)};var Tt=function(t,e){this.p=(e=e||{}).prefix&&$(t)||t,h[t]=h[this.p]=this,this.format=e.formatter||yt(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},St=j._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var r,n=t.split(","),o=e.defaultValue;for(i=i||[o],r=0;r<n.length;r++)e.prefix=0===r&&e.prefix,e.defaultValue=i[r]||o,new Tt(n[r],e)},Mt=j._registerPluginProp=function(t){if(!h[t]){var e=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin";St(t,{parser:function(t,i,r,n,o,s,l){var u=a.com.greensock.plugins[e];return u?(u._cssRegister(),h[r].parse(t,i,r,n,o,s,l)):(Y("Error: "+e+" js file not loaded."),o)}})}};(l=Tt.prototype).parseComplex=function(t,e,i,r,n,o){var s,a,h,l,u,c,p=this.keyword;if(this.multi&&(L.test(i)||L.test(e)?(a=e.replace(L,"|").split("|"),h=i.replace(L,"|").split("|")):p&&(a=[e],h=[i])),h){for(l=h.length>a.length?h.length:a.length,s=0;l>s;s++)e=a[s]=a[s]||this.dflt,i=h[s]=h[s]||this.dflt,p&&(u=e.indexOf(p))!==(c=i.indexOf(p))&&(-1===c?a[s]=a[s].split(p).join(""):-1===u&&(a[s]+=" "+p));e=a.join(", "),i=h.join(", ")}return xt(t,this.p,e,i,this.clrs,this.dflt,r,this.pr,n,o)},l.parse=function(t,e,i,r,o,s,a){return this.parseComplex(t.style,this.format(J(t,this.p,n,!1,this.dflt)),this.format(e),o,s)},s.registerSpecialProp=function(t,e,i){St(t,{parser:function(t,r,n,o,s,a,h){var l=new _t(t,n,0,0,s,2,n,!1,i);return l.plugin=a,l.setRatio=e(t,r,o._tween,n),l},priority:i})},s.useSVGTransformAttr=!0;var Et,Ct="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),At=$("transform"),Pt=Z+"transform",kt=$("transformOrigin"),Rt=null!==$("perspective"),Dt=j.Transform=function(){this.perspective=parseFloat(s.defaultTransformPerspective)||0,this.force3D=!(!1===s.defaultForce3D||!Rt)&&(s.defaultForce3D||"auto")},Ot=_gsScope.SVGElement,Lt=function(t,e,i){var r,n=G.createElementNS("http://www.w3.org/2000/svg",t),o=/([a-z])([A-Z])/g;for(r in i)n.setAttributeNS(null,r.replace(o,"$1-$2").toLowerCase(),i[r]);return e.appendChild(n),n},It=G.documentElement||{},Nt=function(){var t,e,i,r=m||/Android/i.test(H)&&!_gsScope.chrome;return G.createElementNS&&!r&&(t=Lt("svg",It),i=(e=Lt("rect",t,{width:100,height:50,x:100})).getBoundingClientRect().width,e.style[kt]="50% 50%",e.style[At]="scaleX(0.5)",r=i===e.getBoundingClientRect().width&&!(f&&Rt),It.removeChild(t)),r}(),Ft=function(t,e,i,r,n,o){var a,h,l,u,c,p,f,d,m,y,g,v,_,b,x=t._gsTransform,w=Vt(t,!0);x&&(_=x.xOrigin,b=x.yOrigin),(!r||(a=r.split(" ")).length<2)&&(0===(f=t.getBBox()).x&&0===f.y&&f.width+f.height===0&&(f={x:parseFloat(t.hasAttribute("x")?t.getAttribute("x"):t.hasAttribute("cx")?t.getAttribute("cx"):0)||0,y:parseFloat(t.hasAttribute("y")?t.getAttribute("y"):t.hasAttribute("cy")?t.getAttribute("cy"):0)||0,width:0,height:0}),a=[(-1!==(e=at(e).split(" "))[0].indexOf("%")?parseFloat(e[0])/100*f.width:parseFloat(e[0]))+f.x,(-1!==e[1].indexOf("%")?parseFloat(e[1])/100*f.height:parseFloat(e[1]))+f.y]),i.xOrigin=u=parseFloat(a[0]),i.yOrigin=c=parseFloat(a[1]),r&&w!==Gt&&(y=w[4],g=w[5],(v=(p=w[0])*(m=w[3])-(f=w[1])*(d=w[2]))&&(l=u*(-f/v)+c*(p/v)-(p*g-f*y)/v,u=i.xOrigin=a[0]=h=u*(m/v)+c*(-d/v)+(d*g-m*y)/v,c=i.yOrigin=a[1]=l)),x&&(o&&
1(i.xOffset=x.xOffset,i.yOffset=x.yOffset,x=i),n||!1!==n&&!1!==s.defaultSmoothOrigin?(x.xOffset+=(h=u-_)*w[0]+(l=c-b)*w[2]-h,x.yOffset+=h*w[1]+l*w[3]-l):x.xOffset=x.yOffset=0),o||t.setAttribute("data-svg-origin",a.join(" "))},Ut=function(t){var e,i=V("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,n=this.nextSibling,o=this.style.cssText;if(It.appendChild(i),i.appendChild(this),this.style.display="block",t)try{e=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ut}catch(s){}else this._originalGetBBox&&(e=this._originalGetBBox());return n?r.insertBefore(this,n):r.appendChild(this),It.removeChild(i),this.style.cssText=o,e},Bt=function(t){return!(!Ot||!t.getCTM||t.parentNode&&!t.ownerSVGElement||!function(t){try{return t.getBBox()}catch(e){return Ut.call(t,!0)}}(t))},Gt=[1,0,0,1,0,0],Vt=function(t,e){var i,r,n,o,s,a,h=t._gsTransform||new Dt,l=t.style;if(At?r=J(t,Pt,null,!0):t.currentStyle&&(r=(r=t.currentStyle.filter.match(D))&&4===r.length?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),h.x||0,h.y||0].join(","):""),i=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,!At||!(a=!K(t)||"none"===K(t).display)&&t.parentNode||(a&&(o=l.display,l.display="block"),t.parentNode||(s=1,It.appendChild(t)),i=!(r=J(t,Pt,null,!0))||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,o?l.display=o:a&&Xt(l,"display"),s&&It.removeChild(t)),(h.svg||t.getCTM&&Bt(t))&&(i&&-1!==(l[At]+"").indexOf("matrix")&&(r=l[At],i=0),n=t.getAttribute("transform"),i&&n&&(r="matrix("+(n=t.transform.baseVal.consolidate().matrix).a+","+n.b+","+n.c+","+n.d+","+n.e+","+n.f+")",i=0)),i)return Gt;for(n=(r||"").match(v)||[],wt=n.length;--wt>-1;)o=Number(n[wt]),n[wt]=(s=o-(o|=0))?(1e5*s+(0>s?-.5:.5)|0)/1e5+o:o;return e&&n.length>6?[n[0],n[1],n[4],n[5],n[12],n[13]]:n},qt=j.getTransform=function(t,i,r,n){if(t._gsTransform&&r&&!n)return t._gsTransform;var o,a,h,l,u,c,p=r&&t._gsTransform||new Dt,f=p.scaleX<0,d=2e-5,m=1e5,y=Rt&&(parseFloat(J(t,kt,i,!1,"0 0 0").split(" ")[2])||p.zOrigin)||0,g=parseFloat(s.defaultTransformPerspective)||0;if(p.svg=!(!t.getCTM||!Bt(t)),p.svg&&(Ft(t,J(t,kt,i,!1,"50% 50%")+"",p,t.getAttribute("data-svg-origin")),Et=s.useSVGTransformAttr||Nt),(o=Vt(t))!==Gt){if(16===o.length){var v,_,b,x,w,T=o[0],S=o[1],M=o[2],E=o[3],C=o[4],A=o[5],P=o[6],k=o[7],R=o[8],D=o[9],O=o[10],L=o[12],I=o[13],N=o[14],U=o[11],B=Math.atan2(P,O);p.zOrigin&&(L=R*(N=-p.zOrigin)-o[12],I=D*N-o[13],N=O*N+p.zOrigin-o[14]),p.rotationX=B*F,B&&(v=C*(x=Math.cos(-B))+R*(w=Math.sin(-B)),_=A*x+D*w,b=P*x+O*w,R=C*-w+R*x,D=A*-w+D*x,O=P*-w+O*x,U=k*-w+U*x,C=v,A=_,P=b),B=Math.atan2(-M,O),p.rotationY=B*F,B&&(_=S*(x=Math.cos(-B))-D*(w=Math.sin(-B)),b=M*x-O*w,D=S*w+D*x,O=M*w+O*x,U=E*w+U*x,T=v=T*x-R*w,S=_,M=b),B=Math.atan2(S,T),p.rotation=B*F,B&&(v=T*(x=Math.cos(B))+S*(w=Math.sin(B)),_=C*x+A*w,b=R*x+D*w,S=S*x-T*w,A=A*x-C*w,D=D*x-R*w,T=v,C=_,R=b),p.rotationX&&Math.abs(p.rotationX)+Math.abs(p.rotation)>359.9&&(p.rotationX=p.rotation=0,p.rotationY=180-p.rotationY),B=Math.atan2(C,A),p.scaleX=(Math.sqrt(T*T+S*S+M*M)*m+.5|0)/m,p.scaleY=(Math.sqrt(A*A+P*P)*m+.5|0)/m,p.scaleZ=(Math.sqrt(R*R+D*D+O*O)*m+.5|0)/m,T/=p.scaleX,C/=p.scaleY,S/=p.scaleX,A/=p.scaleY,Math.abs(B)>d?(p.skewX=B*F,C=0,"simple"!==p.skewType&&(p.scaleY*=1/Math.cos(B))):p.skewX=0,p.perspective=U?1/(0>U?-U:U):0,p.x=L,p.y=I,p.z=N,p.svg&&(p.x-=p.xOrigin-(p.xOrigin*T-p.yOrigin*C),p.y-=p.yOrigin-(p.yOrigin*S-p.xOrigin*A))}else if(!Rt||n||!o.length||p.x!==o[4]||p.y!==o[5]||!p.rotationX&&!p.rotationY){var G=o.length>=6,V=G?o[0]:1,q=o[1]||0,z=o[2]||0,j=G?o[3]:1;p.x=o[4]||0,p.y=o[5]||0,h=Math.sqrt(V*V+q*q),l=Math.sqrt(j*j+z*z),u=V||q?Math.atan2(q,V)*F:p.rotation||0,c=z||j?Math.atan2(z,j)*F+u:p.skewX||0,p.scaleX=h,p.scaleY=l,p.rotation=u,p.skewX=c,Rt&&(p.rotationX=p.rotationY=p.z=0,p.perspective=g,p.scaleZ=1),p.svg&&(p.x-=p.xOrigin-(p.xOrigin*V+p.yOrigin*z),p.y-=p.yOrigin-(p.xOrigin*q+p.yOrigin*j))}for(a in Math.abs(p.skewX)>90&&Math.abs(p.skewX)<270&&(f?(p.scaleX*=-1,p.skewX+=p.rotation<=0?180:-180,p.rotation+=p.rotation<=0?180:-180):(p.scaleY*=-1,p.skewX+=p.skewX<=0?180:-180)),p.zOrigin=y,p)p[a]<d&&p[a]>-d&&(p[a]=0)}return r&&(t._gsTransform=p,p.svg&&(Et&&t.style[At]?e.delayedCall(.001,function(){Xt(t.style,At)}):!Et&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),p},zt=function(t){var e,i,r=this.data,n=-r.rotation*N,o=n+r.skewX*N,s=1e5,a=(Math.cos(n)*r.scaleX*s|0)/s,h=(Math.sin(n)*r.scaleX*s|0)/s,l=(Math.sin(o)*-r.scaleY*s|0)/s,u=(Math.cos(o)*r.scaleY*s|0)/s,c=this.t.style,p=this.t.currentStyle;if(p){i=h,h=-l,l=-i,e=p.filter,c.filter="";var f,d,y=this.t.offsetWidth,g=this.t.offsetHeight,v="absolute"!==p.position,_="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+h+", M21="+l+", M22="+u,b=r.x+y*r.xPercent/100,x=r.y+g*r.yPercent/100;if(null!=r.ox&&(b+=(f=(r.oxp?y*r.ox*.01:r.ox)-y/2)-(f*a+(d=(r.oyp?g*r.oy*.01:r.oy)-g/2)*h),x+=d-(f*l+d*u)),_+=v?", Dx="+((f=y/2)-(f*a+(d=g/2)*h)+b)+", Dy="+(d-(f*l+d*u)+x)+")":", sizingMethod='auto expand')",c.filter=-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?e.replace(O,_):_+" "+e,(0===t||1===t)&&1===a&&0===h&&0===l&&1===u&&(v&&-1===_.indexOf("Dx=0, Dy=0")||T.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf(e.indexOf("Alpha"))&&c.removeAttribute("filter")),!v){var S,M,E=8>m?1:-1;for(f=r.ieOffsetX||0,d=r.ieOffsetY||0,r.ieOffsetX=Math.round((y-((0>a?-a:a)*y+(0>h?-h:h)*g))/2+b),r.ieOffsetY=Math.round((g-((0>u?-u:u)*g+(0>l?-l:l)*y))/2+x),wt=0;4>wt;wt++)i=-1!==(S=p[M=ot[wt]]).indexOf("px")?parseFloat(S):tt(this.t,M,parseFloat(S),S.replace(w,""))||0,c[M]=(r[M]=Math.round(i-(i!==r[M]?2>wt?-r.ieOffsetX:-r.ieOffsetY:2>wt?f-r.ieOffsetX:d-r.ieOffsetY)*(0===wt||2===wt?1:E)))+"px"}}},jt=j.set3DTransformRatio=j.setTransformRatio=function(t){var e,i,r,n,o,s,a,h,l,u,c,p,d,m,y,g,v,_,b,x,w,T,S,M=this.data,E=this.t.style,C=M.rotation,A=M.rotationX,P=M.rotationY,k=M.scaleX,R=M.scaleY,D=M.scaleZ,O=M.x,L=M.y,I=M.z,F=M.svg,U=M.perspective,B=M.force3D,G=M.skewY,V=M.skewX;if(G&&(V+=G,C+=G),!((1!==t&&0!==t||"auto"!==B||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&B||I||U||P||A||1!==D)||Et&&F||!Rt)C||V||F?(C*=N,T=V*N,S=1e5,i=Math.cos(C)*k,o=Math.sin(C)*k,r=Math.sin(C-T)*-R,s=Math.cos(C-T)*R,T&&"simple"===M.skewType&&(e=Math.tan(T-G*N),r*=e=Math.sqrt(1+e*e),s*=e,G&&(e=Math.tan(G*N),i*=e=Math.sqrt(1+e*e),o*=e)),F&&(O+=M.xOrigin-(M.xOrigin*i+M.yOrigin*r)+M.xOffset,L+=M.yOrigin-(M.xOrigin*o+M.yOrigin*s)+M.yOffset,Et&&(M.xPercent||M.yPercent)&&(y=this.t.getBBox(),O+=.01*M.xPercent*y.width,L+=.01*M.yPercent*y.height),(y=1e-6)>O&&O>-y&&(O=0),y>L&&L>-y&&(L=0)),b=(i*S|0)/S+","+(o*S|0)/S+","+(r*S|0)/S+","+(s*S|0)/S+","+O+","+L+")",F&&Et?this.t.setAttribute("transform","matrix("+b):E[At]=(M.xPercent||M.yPercent?"translate("+M.xPercent+"%,"+M.yPercent+"%) matrix(":"matrix(")+b):E[At]=(M.xPercent||M.yPercent?"translate("+M.xPercent+"%,"+M.yPercent+"%) matrix(":"matrix(")+k+",0,0,"+R+","+O+","+L+")";else{if(f&&((y=1e-4)>k&&k>-y&&(k=D=2e-5),y>R&&R>-y&&(R=D=2e-5),!U||M.z||M.rotationX||M.rotationY||(U=0)),C||V)C*=N,g=i=Math.cos(C),v=o=Math.sin(C),V&&(C-=V*N,g=Math.cos(C),v=Math.sin(C),"simple"===M.skewType&&(e=Math.tan((V-G)*N),g*=e=Math.sqrt(1+e*e),v*=e,M.skewY&&(e=Math.tan(G*N),i*=e=Math.sqrt(1+e*e),o*=e))),r=-v,s=g;else{if(!(P||A||1!==D||U||F))return void(E[At]=(M.xPercent||M.yPercent?"translate("+M.xPercent+"%,"+M.yPercent+"%) translate3d(":"translate3d(")+O+"px,"+L+"px,"+I+"px)"+(1!==k||1!==R?" scale("+k+","+R+")":""));i=s=1,r=o=0}u=1,n=a=h=l=c=p=0,d=U?-1/U:0,m=M.zOrigin,y=1e-6,x=",",w="0",(C=P*N)&&(g=Math.cos(C),h=-(v=Math.sin(C)),c=d*-v,n=i*v,a=o*v,u=g,d*=g,i*=g,o*=g),(C=A*N)&&(e=r*(g=Math.cos(C))+n*(v=Math.sin(C)),_=s*g+a*v,l=u*v,p=d*v,n=r*-v+n*g,a=s*-v+a*g,u*=g,d*=g,r=e,s=_),1!==D&&(n*=D,a*=D,u*=D,d*=D),1!==R&&(r*=R,s*=R,l*=R,p*=R),1!==k&&(i*=k,o*=k,h*=k,c*=k),(m||F)&&(m&&(O+=n*-m,L+=a*-m,I+=u*-m+m),F&&(O+=M.xOrigin-(M.xOrigin*i+M.yOrigin*r)+M.xOffset,L+=M.yOrigin-(M.xOrigin*o+M.yOrigin*s)+M.yOffset),y>O&&O>-y&&(O=w),y>L&&L>-y&&(L=w),y>I&&I>-y&&(I=0)),b=M.xPercent||M.yPercent?"translate("+M.xPercent+"%,"+M.yPercent+"%) matrix3d(":"matrix3d(",b+=(y>i&&i>-y?w:i)+x+(y>o&&o>-y?w:o)+x+(y>h&&h>-y?w:h),b+=x+(y>c&&c>-y?w:c)+x+(y>r&&r>-y?w:r)+x+(y>s&&s>-y?w:s),A||P||1!==D?(b+=x+(y>l&&l>-y?w:l)+x+(y>p&&p>-y?w:p)+x+(y>n&&n>-y?w:n),b+=x+(y>a&&a>-y?w:a)+x+(y>u&&u>-y?w:u)+x+(y>d&&d>-y?w:d)+x):b+=",0,0,0,0,1,0,",E[At]=b+=O+x+L+x+I+x+(U?1+-I/U:1)+")"}};(l=Dt.prototype).x=l.y=l.z=l.skewX=l.skewY=l.rotation=l.rotationX=l.rotationY=l.zOrigin=l.xPercent=l.yPercent=l.xOffset=l.yOffset=0,l.scaleX=l.scaleY=l.scaleZ=1,St("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(t,e,
1i,r,o,a,h){if(r._lastParsedTransform===h)return o;r._lastParsedTransform=h;var l,u=h.scale&&"function"==typeof h.scale?h.scale:0;"function"==typeof h[i]&&(l=h[i],h[i]=e),u&&(h.scale=u(g,t));var c,p,f,d,m,v,_,b,x,w=t._gsTransform,T=t.style,S=Ct.length,M=h,E={},C="transformOrigin",A=qt(t,n,!0,M.parseTransform),P=M.transform&&("function"==typeof M.transform?M.transform(g,y):M.transform);if(A.skewType=M.skewType||A.skewType||s.defaultSkewType,r._transform=A,P&&"string"==typeof P&&At)(p=q.style)[At]=P,p.display="block",p.position="absolute",-1!==P.indexOf("%")&&(p.width=J(t,"width"),p.height=J(t,"height")),G.body.appendChild(q),c=qt(q,null,!1),"simple"===A.skewType&&(c.scaleY*=Math.cos(c.skewX*N)),A.svg&&(v=A.xOrigin,_=A.yOrigin,c.x-=A.xOffset,c.y-=A.yOffset,(M.transformOrigin||M.svgOrigin)&&(P={},Ft(t,at(M.transformOrigin),P,M.svgOrigin,M.smoothOrigin,!0),v=P.xOrigin,_=P.yOrigin,c.x-=P.xOffset-A.xOffset,c.y-=P.yOffset-A.yOffset),(v||_)&&(b=Vt(q,!0),c.x-=v-(v*b[0]+_*b[2]),c.y-=_-(v*b[1]+_*b[3]))),G.body.removeChild(q),c.perspective||(c.perspective=A.perspective),null!=M.xPercent&&(c.xPercent=lt(M.xPercent,A.xPercent)),null!=M.yPercent&&(c.yPercent=lt(M.yPercent,A.yPercent));else if("object"==typeof M){if(c={scaleX:lt(null!=M.scaleX?M.scaleX:M.scale,A.scaleX),scaleY:lt(null!=M.scaleY?M.scaleY:M.scale,A.scaleY),scaleZ:lt(M.scaleZ,A.scaleZ),x:lt(M.x,A.x),y:lt(M.y,A.y),z:lt(M.z,A.z),xPercent:lt(M.xPercent,A.xPercent),yPercent:lt(M.yPercent,A.yPercent),perspective:lt(M.transformPerspective,A.perspective)},null!=(m=M.directionalRotation))if("object"==typeof m)for(p in m)M[p]=m[p];else M.rotation=m;"string"==typeof M.x&&-1!==M.x.indexOf("%")&&(c.x=0,c.xPercent=lt(M.x,A.xPercent)),"string"==typeof M.y&&-1!==M.y.indexOf("%")&&(c.y=0,c.yPercent=lt(M.y,A.yPercent)),c.rotation=ut("rotation"in M?M.rotation:"shortRotation"in M?M.shortRotation+"_short":"rotationZ"in M?M.rotationZ:A.rotation,A.rotation,"rotation",E),Rt&&(c.rotationX=ut("rotationX"in M?M.rotationX:"shortRotationX"in M?M.shortRotationX+"_short":A.rotationX||0,A.rotationX,"rotationX",E),c.rotationY=ut("rotationY"in M?M.rotationY:"shortRotationY"in M?M.shortRotationY+"_short":A.rotationY||0,A.rotationY,"rotationY",E)),c.skewX=ut(M.skewX,A.skewX),c.skewY=ut(M.skewY,A.skewY)}for(Rt&&null!=M.force3D&&(A.force3D=M.force3D,d=!0),(f=A.force3D||A.z||A.rotationX||A.rotationY||c.z||c.rotationX||c.rotationY||c.perspective)||null==M.scale||(c.scaleZ=1);--S>-1;)((P=c[x=Ct[S]]-A[x])>1e-6||-1e-6>P||null!=M[x]||null!=U[x])&&(d=!0,o=new _t(A,x,A[x],P,o),x in E&&(o.e=E[x]),o.xs0=0,o.plugin=a,r._overwriteProps.push(o.n));return P=M.transformOrigin,A.svg&&(P||M.svgOrigin)&&(v=A.xOffset,_=A.yOffset,Ft(t,at(P),c,M.svgOrigin,M.smoothOrigin),o=bt(A,"xOrigin",(w?A:c).xOrigin,c.xOrigin,o,C),o=bt(A,"yOrigin",(w?A:c).yOrigin,c.yOrigin,o,C),(v!==A.xOffset||_!==A.yOffset)&&(o=bt(A,"xOffset",w?v:A.xOffset,A.xOffset,o,C),o=bt(A,"yOffset",w?_:A.yOffset,A.yOffset,o,C)),P="0px 0px"),(P||Rt&&f&&A.zOrigin)&&(At?(d=!0,x=kt,P=(P||J(t,x,n,!1,"50% 50%"))+"",(o=new _t(T,x,0,0,o,-1,C)).b=T[x],o.plugin=a,Rt?(p=A.zOrigin,P=P.split(" "),A.zOrigin=(P.length>2&&(0===p||"0px"!==P[2])?parseFloat(P[2]):p)||0,o.xs0=o.e=P[0]+" "+(P[1]||"50%")+" 0px",(o=new _t(A,"zOrigin",0,0,o,-1,o.n)).b=p,o.xs0=o.e=A.zOrigin):o.xs0=o.e=P):at(P+"",A)),d&&(r._transformType=A.svg&&Et||!f&&3!==this._transformType?2:3),l&&(h[i]=l),u&&(h.scale=u),o},prefix:!0}),St("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),St("borderRadius",{defaultValue:"0px",parser:function(t,e,i,o,s,a){e=this.format(e);var h,l,u,c,p,f,d,m,y,g,v,_,b,x,w,T,S=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],M=t.style;for(y=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),h=e.split(" "),l=0;l<S.length;l++)this.p.indexOf("border")&&(S[l]=$(S[l])),-1!==(p=c=J(t,S[l],n,!1,"0px")).indexOf(" ")&&(c=p.split(" "),p=c[0],c=c[1]),f=u=h[l],d=parseFloat(p),_=p.substr((d+"").length),(b="="===f.charAt(1))?(m=parseInt(f.charAt(0)+"1",10),f=f.substr(2),m*=parseFloat(f),v=f.substr((m+"").length-(0>m?1:0))||""):(m=parseFloat(f),v=f.substr((m+"").length)),""===v&&(v=r[i]||_),v!==_&&(x=tt(t,"borderLeft",d,_),w=tt(t,"borderTop",d,_),"%"===v?(p=x/y*100+"%",c=w/g*100+"%"):"em"===v?(p=x/(T=tt(t,"borderLeft",1,"em"))+"em",c=w/T+"em"):(p=x+"px",c=w+"px"),b&&(f=parseFloat(p)+m+v,u=parseFloat(c)+m+v)),s=xt(M,S[l],p+" "+c,f+" "+u,!1,"0px",s);return s},prefix:!0,formatter:yt("0px 0px 0px 0px",!1,!0)}),St("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(t,e,
vendor: 6,700 bytes, line 1
1i,r,o,s){return xt(t.style,i,this.format(J(t,i,n,!1,"0px 0px")),this.format(e),!1,"0px",o)},prefix:!0,formatter:yt("0px 0px",!1,!0)}),St("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,r,o,s){var a,h,l,u,c,p,f="background-position",d=n||K(t,null),y=this.format((d?m?d.getPropertyValue(f+"-x")+" "+d.getPropertyValue(f+"-y"):d.getPropertyValue(f):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(-1!==y.indexOf("%")!=(-1!==g.indexOf("%"))&&g.split(",").length<2&&(p=J(t,"backgroundImage").replace(P,""))&&"none"!==p){for(a=y.split(" "),h=g.split(" "),z.setAttribute("src",p),l=2;--l>-1;)(u=-1!==(y=a[l]).indexOf("%"))!=(-1!==h[l].indexOf("%"))&&(c=0===l?t.offsetWidth-z.width:t.offsetHeight-z.height,a[l]=u?parseFloat(y)/100*c+"px":parseFloat(y)/c*100+"%");y=a.join(" ")}return this.parseComplex(t.style,y,g,o,s)},formatter:at}),St("backgroundSize",{defaultValue:"0 0",formatter:function(t){return"co"===(t+="").substr(0,2)?t:at(-1===t.indexOf(" ")?t+" "+t:t)}}),St("perspective",{defaultValue:"0px",prefix:!0}),St("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),St("transformStyle",{prefix:!0}),St("backfaceVisibility",{prefix:!0}),St("userSelect",{prefix:!0}),St("margin",{parser:gt("marginTop,marginRight,marginBottom,marginLeft")}),St("padding",{parser:gt("paddingTop,paddingRight,paddingBottom,paddingLeft")}),St("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,r,o,s){var a,h,l;return 9>m?(a="rect("+(h=t.currentStyle).clipTop+(l=8>m?" ":",")+h.clipRight+l+h.clipBottom+l+h.clipLeft+")",e=this.format(e).split(",").join(l)):(a=this.format(J(t,this.p,n,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,a,e,o,s)}}),St("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),St("autoRound,strictUnits",{parser:function(t,e,i,r,n){return n}}),St("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,o,s){var a=J(t,"borderTopWidth",n,!1,"0px"),h=this.format(e).split(" "),l=h[0].replace(w,"");return"px"!==l&&(a=parseFloat(a)/tt(t,"borderTopWidth",1,l)+l),this.parseComplex(t.style,this.format(a+" "+J(t,"borderTopStyle",n,!1,"solid")+" "+J(t,"borderTopColor",n,!1,"#000")),h.join(" "),o,s)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(mt)||["#000"])[0]}}),St("borderWidth",{parser:gt("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),St("float,cssFloat,styleFloat",{parser:function(t,e,i,r,n,o){var s=t.style,a="cssFloat"in s?"cssFloat":"styleFloat";return new _t(s,a,0,0,n,-1,i,!1,0,s[a],e)}});var Ht=function(t){var e,i=this.t,r=i.filter||J(this.data,"filter")||"",n=this.s+this.c*t|0;100===n&&(-1===r.indexOf("atrix(")&&-1===r.indexOf("radient(")&&-1===r.indexOf("oader(")?(i.removeAttribute("filter"),e=!J(this.data,"filter")):(i.filter=r.replace(M,""),e=!0)),e||(this.xn1&&(i.filter=r=r||"alpha(opacity="+n+")"),-1===r.indexOf("pacity")?0===n&&this.xn1||(i.filter=r+" alpha(opacity="+n+")"):i.filter=r.replace(T,"opacity="+n))};St("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,o,s){var a=parseFloat(J(t,"opacity",n,!1,"1")),h=t.style,l="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+a),l&&1===a&&"hidden"===J(t,"visibility",n)&&0!==e&&(a=0),X?o=new _t(h,"opacity",a,e-a,o):((o=new _t(h,"opacity",100*a,100*(e-a),o)).xn1=l?1:0,h.zoom=1,o.type=2,o.b="alpha(opacity="+o.s+")",o.e="alpha(opacity="+(o.s+o.c)+")",o.data=t,o.plugin=s,o.setRatio=Ht),l&&((o=new _t(h,"visibility",0,0,o,-1,null,!1,0,0!==a?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",r._overwriteProps.push(o.n),r._overwriteProps.push(i)),o}});var Xt=function(t,e){e&&(t.removeProperty?(("ms"===e.substr(0,2)||"webkit"===e.substr(0,6))&&(e="-"+e),t.removeProperty(e.replace(C,"-$1").toLowerCase())):t.removeAttribute(e))},Wt=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:Xt(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};St("className",{parser:function(t,e,r,o,s,a,h){var l,u,c,p,f,d=t.getAttribute("class")||"",m=t.style.cssText;if((s=o._classNamePT=new _t(t,r,0,0,s,2)).setRatio=Wt,s.pr=-11,i=!0,s.b=d,u=it(t,n),c=t._gsClassPT){for(p={},f=c.data;f;)p[f.p]=1,f=f._next;c.setRatio(1)}return t._gsClassPT=s,s.e="="!==e.charAt(1)?e:d.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",s.e),l=rt(t,u,it(t),h,p),t.setAttribute("class",d),s.data=l.firstMPT,t.style.cssText=m,s.xfirst=o.parse(t,l.difs,s,a)}});var Yt=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,n,o,s=this.t.style,a=h.transform.parse;if("all"===this.e)s.cssText="",n=!0;else for(r=(e=this.e.split(" ").join("").split(",")).length;--r>-1;)h[i=e[r]]&&(h[i].parse===a?n=!0:i="transformOrigin"===i?kt:h[i].p),Xt(s,i);n&&(Xt(s,At),(o=this.t._gsTransform)&&(o.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(St("clearProps",{parser:function(t,e,r,n,o){return(o=new _t(t,r,0,0,o,2)).setRatio=Yt,o.e=e,o.pr=-10,o.data=n._tween,i=!0,o}}),l="bezier,throwProps,physicsProps,physics2D".split(","),wt=l.length;wt--;)Mt(l[wt]);(l=s.prototype)._firstPT=l._lastParsedTransform=l._transform=null,l._onInitTween=function(t,e,a,l){if(!t.nodeType)return!1;this._target=y=t,this._tween=a,this._vars=e,g=l,u=e.autoRound,i=!1,r=e.suffixMap||s.suffixMap,n=K(t,""),o=this._overwriteProps;var f,m,v,_,b,x,w,T,M,E=t.style;if(c&&""===E.zIndex&&("auto"===(f=J(t,"zIndex",n))||""===f)&&this._addLazySet(E,"zIndex",0),"string"==typeof e&&(_=E.cssText,f=it(t,n),E.cssText=_+";"+e,f=rt(t,f,it(t)).difs,!X&&S.test(e)&&(f.opacity=parseFloat(RegExp.$1)),e=f,E.cssText=_),this._firstPT=m=e.className?h.className.parse(t,e.className,"className",this,null,null,e):this.parse(t,e,null),this._transformType){for(M=3===this._transformType,At?p&&(c=!0,""===E.zIndex&&("auto"===(w=J(t,"zIndex",n))||""===w)&&this._addLazySet(E,"zIndex",0),d&&this._addLazySet(E,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(M?"visible":"hidden"))):E.zoom=1,v=m;v&&v._next;)v=v._next;T=new _t(t,"transform",0,0,null,2),this._linkCSSP(T,null,v),T.setRatio=At?jt:zt,T.data=this._transform||qt(t,n,!0),T.tween=a,T.pr=-1,o.pop()}if(i){for(;m;){for(x=m._next,v=_;v&&v.pr>m.pr;)v=v._next;(m._prev=v?v._prev:b)?m._prev._next=m:_=m,(m._next=v)?v._prev=m:b=m,m=x}this._firstPT=_}return!0}
1,l.parse=function(t,e,i,o){var s,a,l,c,p,f,d,m,v,_,b=t.style;for(s in e){if("function"==typeof(f=e[s])&&(f=f(g,y)),a=h[s])i=a.parse(t,f,s,this,i,o,e);else{if("--"===s.substr(0,2)){this._tween._propLookup[s]=this._addTween.call(this._tween,t.style,"setProperty",K(t).getPropertyValue(s)+"",f+"",s,!1,s);continue}p=J(t,s,n)+"",v="string"==typeof f,"color"===s||"fill"===s||"stroke"===s||-1!==s.indexOf("Color")||v&&E.test(f)?(v||(f=((f=ft(f)).length>3?"rgba(":"rgb(")+f.join(",")+")"),i=xt(b,s,p,f,!0,"transparent",i,0,o)):v&&I.test(f)?i=xt(b,s,p,f,!0,null,i,0,o):(d=(l=parseFloat(p))||0===l?p.substr((l+"").length):"",(""===p||"auto"===p)&&("width"===s||"height"===s?(l=st(t,s,n),d="px"):"left"===s||"top"===s?(l=et(t,s,n),d="px"):(l="opacity"!==s?0:1,d="")),(_=v&&"="===f.charAt(1))?(c=parseInt(f.charAt(0)+"1",10),f=f.substr(2),c*=parseFloat(f),m=f.replace(w,"")):(c=parseFloat(f),m=v?f.replace(w,""):""),""===m&&(m=s in r?r[s]:d),f=c||0===c?(_?c+l:c)+m:e[s],d!==m&&(""!==m||"lineHeight"===s)&&(c||0===c)&&l&&(l=tt(t,s,l,d),"%"===m?(l/=tt(t,s,100,"%")/100,!0!==e.strictUnits&&(p=l+"%")):"em"===m||"rem"===m||"vw"===m||"vh"===m?l/=tt(t,s,1,m):"px"!==m&&(c=tt(t,s,c,m),m="px"),_&&(c||0===c)&&(f=c+l+m)),_&&(c+=l),!l&&0!==l||!c&&0!==c?void 0!==b[s]&&(f||f+""!="NaN"&&null!=f)?(i=new _t(b,s,c||l||0,0,i,-1,s,!1,0,p,f)).xs0="none"!==f||"display"!==s&&-1===s.indexOf("Style")?f:p:Y("invalid "+s+" tween value: "+e[s]):(i=new _t(b,s,l,c-l,i,0,s,!1!==u&&("px"===m||"zIndex"===s),0,p,f)).xs0=m)}o&&i&&!i.plugin&&(i.plugin=o)}return i},l.setRatio=function(t){var e,i,r,n=this._firstPT;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;n;){if(e=n.c*t+n.s,n.r?e=n.r(e):1e-6>e&&e>-1e-6&&(e=0),n.type)if(1===n.type)if(2===(r=n.l))n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2;else if(3===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3;else if(4===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4;else if(5===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4+n.xn4+n.xs5;else{for(i=n.xs0+e+n.xs1,r=1;r<n.l;r++)i+=n["xn"+r]+n["xs"+(r+1)];n.t[n.p]=i}else-1===n.type?n.t[n.p]=n.xs0:n.setRatio&&n.setRatio(t);else n.t[n.p]=e+n.xs0;n=n._next}else for(;n;)2!==n.type?n.t[n.p]=n.b:n.setRatio(t),n=n._next;else for(;n;){if(2!==n.type)if(n.r&&-1!==n.type)if(e=n.r(n.s+n.c),n.type){if(1===n.type){for(r=n.l,i=n.xs0+e+n.xs1,r=1;r<n.l;r++)i+=n["xn"+r]+n["xs"+(r+1)];n.t[n.p]=i}}else n.t[n.p]=e+n.xs0;else n.t[n.p]=n.e;else n.setRatio(t);n=n._next}},l._enableTransforms=function(t){this._transform=this._transform||qt(this._target,n,!0),this._transformType=this._transform.svg&&Et||!t&&3!==this._transformType?2:3};var Zt=function(t){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};l._addLazySet=function(t,e,i){var r=this._firstPT=new _t(t,e,0,0,this._firstPT,2);r.e=i,r.setRatio=Zt,r.data=this},l._linkCSSP=function(t,e,i,r){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,r=!0),i?i._next=t:r||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},l._mod=function(t){for(var e=this._firstPT;e;)"function"==typeof t[e.p]&&(e.r=t[e.p]),e=e._next},l._kill=function(e){var i,r,n,o=e;if(e.autoAlpha||e.alpha){for(r in o={},e)o[r]=e[r];o.opacity=1,o.autoAlpha&&(o.visibility=1)}for(e.className&&(i=this._classNamePT)&&((n=i.xfirst)&&n._prev?this._linkCSSP(n._prev,i._next,n._prev._prev):n===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,n._prev),this._classNamePT=null),i=this._firstPT;i;)i.plugin&&i.plugin!==r&&i.plugin._kill&&(i.plugin._kill(e),r=i.plugin),i=i._next;return t.prototype._kill.call(this,o)};var Qt=function(t,e,i){var r,n,o,s;if(t.slice)for(n=t.length;--n>-1;)Qt(t[n],e,i);else for(n=(r=t.childNodes).length;--n>-1;)s=(o=r[n]).type,o.style&&(e.push(it(o)),i&&i.push(o)),1!==s&&9!==s&&11!==s||!o.childNodes.length||Qt(o,e,i)};return s.cascadeTo=function(t,i,r){var n,o,s,a,h=e.to(t,i,r),l=[h],u=[],c=[],p=[],f=e._internals.reservedProps;
1for(Qt(t=h._targets||h.target,u,p),h.render(i,!0,!0),Qt(t,c),h.render(0,!0,!0),h._enabled(!0),n=p.length;--n>-1;)if((o=rt(p[n],u[n],c[n])).firstMPT){for(s in o=o.difs,r)f[s]&&(o[s]=r[s]);for(s in a={},o)a[s]=u[n][s];l.push(e.fromTo(p[n],i,a,o))}return l},t.activate([s]),s},!0),function(){var t=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=function(t){var e=1>t?Math.pow(10,(t+"").length-2):1;return function(i){return(Math.round(i/t)*t*e|0)/e}},i=function(t,e){for(;t;)t.f||t.blob||(t.m=e||Math.round),t=t._next},r=t.prototype;r._onInitAllProps=function(){var t,r,n,o,s=this._tween,a=s.vars.roundProps,h={},l=s._propLookup.roundProps;if("object"!=typeof a||a.push)for("string"==typeof a&&(a=a.split(",")),n=a.length;--n>-1;)h[a[n]]=Math.round;else for(o in a)h[o]=e(a[o]);for(o in h)for(t=s._firstPT;t;)r=t._next,t.pg?t.t._mod(h):t.n===o&&(2===t.f&&t.t?i(t.t._firstPT,h[o]):(this._add(t.t,o,t.s,t.c,h[o]),r&&(r._prev=t._prev),t._prev?t._prev._next=r:s._firstPT===t&&(s._firstPT=r),t._next=t._prev=null,s._propLookup[o]=l)),t=r;return!1},r._add=function(t,e,i,r,n){this._addTween(t,e,i,i+r,e,n||Math.round),this._overwriteProps.push(e)}}(),_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(t,e,i,r){var n,o;if("function"!=typeof t.setAttribute)return!1;for(n in e)"function"==typeof(o=e[n])&&(o=o(r,t)),this._addTween(t,"setAttribute",t.getAttribute(n)+"",o+"",n,!1,n),this._overwriteProps.push(n);return!0}}),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(t,e,i,r){"object"!=typeof e&&(e={rotation:e}),this.finals={};var n,o,s,a,h,l,u=!0===e.useRadians?2*Math.PI:360;for(n in e)"useRadians"!==n&&("function"==typeof(a=e[n])&&(a=a(r,t)),o=(l=(a+"").split("_"))[0],s=parseFloat("function"!=typeof t[n]?t[n]:t[n.indexOf("set")||"function"!=typeof t["get"+n.substr(3)]?n:"get"+n.substr(3)]()),h=(a=this.finals[n]="string"==typeof o&&"="===o.charAt(1)?s+parseInt(o.charAt(0)+"1",10)*Number(o.substr(2)):Number(o)||0)-s,l.length&&(-1!==(o=l.join("_")).indexOf("short")&&(h%=u)!=h%(u/2)&&(h=0>h?h+u:h-u),-1!==o.indexOf("_cw")&&0>h?h=(h+9999999999*u)%u-(h/u|0)*u:-1!==o.indexOf("ccw")&&h>0&&(h=(h-9999999999*u)%u-(h/u|0)*u)),(h>1e-6||-1e-6>h)&&(this._addTween(t,n,s,s+h,n),this._overwriteProps.push(n)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,r,n,o=_gsScope.GreenSockGlobals||_gsScope,s=2*Math.PI,a=Math.PI/2,h=o.com.greensock._class,l=function(e,i){var r=h("easing."+e,function(){},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,r},u=t.register||function(){},c=function(t,e,i,r,n){var o=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new r},!0);return u(o,t),o},p=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},f=function(e,i){var r=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t){return new r(t)},r},d=c("Back",f("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),f("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),f("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),m=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=!0===i},!0),y=m.prototype=new t;return y.constructor=m,y.getRatio=function(t){var e=t+(.5-t)*this._p;return t<this._p1?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1===t?0:1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},m.ease=new m(.7,.7),y.config=m.config=function(t,e,i){return new m(t,e,i)},(y=(e=h("easing.SteppedEase",function(t,e){this._p1=1/(t=t||1),this._p2=t+(e?0:1),this._p3=e?1:0},!0)).prototype=new t).constructor=e,y.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),((this._p2*t|0)+this._p3)*this._p1},y.config=e.config=function(t,i){return new e(t,i)}
1,(y=(i=h("easing.ExpoScaleEase",function(t,e,i){this._p1=Math.log(e/t),this._p2=e-t,this._p3=t,this._ease=i},!0)).prototype=new t).constructor=i,y.getRatio=function(t){return this._ease&&(t=this._ease.getRatio(t)),(this._p3*Math.exp(this._p1*t)-this._p3)/this._p2},y.config=i.config=function(t,e,r){return new i(t,e,r)},(y=(r=h("easing.RoughEase",function(e){for(var i,r,n,o,s,a,h=(e=e||{}).taper||"none",l=[],u=0,c=0|(e.points||20),f=c,d=!1!==e.randomize,m=!0===e.clamp,y=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--f>-1;)i=d?Math.random():1/c*f,r=y?y.getRatio(i):i,n="none"===h?g:"out"===h?(o=1-i)*o*g:"in"===h?i*i*g:.5>i?(o=2*i)*o*.5*g:(o=2*(1-i))*o*.5*g,d?r+=Math.random()*n-.5*n:f%2?r+=.5*n:r-=.5*n,m&&(r>1?r=1:0>r&&(r=0)),l[u++]={x:i,y:r};for(l.sort(function(t,e){return t.x-e.x}),a=new p(1,1,null),f=c;--f>-1;)a=new p((s=l[f]).x,s.y,a);this._prev=new p(0,0,0!==a.t?a:a.next)},!0)).prototype=new t).constructor=r,y.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&t<=e.t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},y.config=function(t){return new r(t)},r.ease=new r,c("Bounce",l("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),l("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),l("BounceInOut",function(t){var e=.5>t;return t=1/2.75>(t=e?1-2*t:2*t-1)?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),c("Circ",l("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),l("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),l("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),c("Elastic",(n=function(e,i,r){var n=h("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||r)/(1>t?t:1),this._p3=this._p2/s*(Math.asin(1/this._p1)||0),this._p2=s/this._p2},!0),o=n.prototype=new t;return o.constructor=n,o.getRatio=i,o.config=function(t,e){return new n(t,e)},n})("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),n("ElasticIn",function(t){return-this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)},.3),n("ElasticInOut",function(t){return(t*=2)<1?this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),c("Expo",l("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),l("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),l("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),c("Sine",l("SineOut",function(t){return Math.sin(t*a)}),l("SineIn",function(t){return 1-Math.cos(t*a)}),l("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),u(o.SlowMo,"SlowMo","ease,"),u(r,"RoughEase","ease,"),u(e,"SteppedEase","ease,"),d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t,e){"use strict";var i={},r=t.document,n=t.GreenSockGlobals=t.GreenSockGlobals||t,o=n[e];if(o)return"undefined"!=typeof module&&module.exports&&(module.exports=o),o;var s,a,h,l,u,c=function(t){var e,i=t.split("."),r=n;for(e=0;e<i.length;e++)r[i[e]]=r=r[i[e]]||{};return r},p=c("com.greensock"),f=1e-10,d=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},m=function(){},y=function(){var t=Object.prototype.toString,e=t.call([]);return function(i){return null!=i&&(i instanceof Array||"object"==typeof i&&!!i.push&&t.call(i)===e)}}(),g={},v=function(r,o,s,a){this.sc=g[r]?g[r].sc:[],g[r]=this,this.gsClass=null,this.func=s;var h=[];this.check=function(l){for(var u,p,f,d,m=o.length,y=m;--m>-1;)(u=g[o[m]]||new v(o[m],[])).gsClass?(h[m]=u.gsClass,y--):l&&u.sc.push(this);if(0===y&&s){if(f=(p=("com.greensock."+r).split(".")).pop(),d=c(p.join("."))[f]=this.gsClass=s.apply(s,h),a)if(n[f]=i[f]=d,"undefined"!=typeof module&&module.exports)if(r===e)for(m in module.exports=i[e]=d,i)d[m]=i[m];else i[e]&&(i[e][f]=d);else"function"==typeof define&&define.amd&&define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+r.split(".").pop(),[],function(){return d});for(m=0;m<this.sc.length;m++)this.sc[m].check()}},this.check(!0)}
1,_=t._gsDefine=function(t,e,i,r){return new v(t,e,i,r)},b=p._class=function(t,e,i){return e=e||function(){},_(t,[],function(){return e},i),e};_.globals=n;var x=[0,0,1,1],w=b("easing.Ease",function(t,e,i,r){this._func=t,this._type=i||0,this._power=r||0,this._params=e?x.concat(e):x},!0),T=w.map={},S=w.register=function(t,e,i,r){for(var n,o,s,a,h=e.split(","),l=h.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--l>-1;)for(o=h[l],n=r?b("easing."+o,null,!0):p.easing[o]||{},s=u.length;--s>-1;)T[o+"."+(a=u[s])]=T[a+o]=n[a]=t.getRatio?t:t[a]||new t};for((h=w.prototype)._calcEnd=!1,h.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,r=1===e?1-t:2===e?t:.5>t?2*t:2*(1-t);return 1===i?r*=r:2===i?r*=r*r:3===i?r*=r*r*r:4===i&&(r*=r*r*r*r),1===e?1-r:2===e?r:.5>t?r/2:1-r/2},a=(s=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;--a>-1;)h=s[a]+",Power"+a,S(new w(null,null,1,a),h,"easeOut",!0),S(new w(null,null,2,a),h,"easeIn"+(0===a?",easeNone":"")),S(new w(null,null,3,a),h,"easeInOut");T.linear=p.easing.Linear.easeIn,T.swing=p.easing.Quad.easeInOut;var M=b("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(h=M.prototype).addEventListener=function(t,e,i,r,n){n=n||0;var o,s,a=this._listeners[t],h=0;for(this!==l||u||l.wake(),null==a&&(this._listeners[t]=a=[]),s=a.length;--s>-1;)(o=a[s]).c===e&&o.s===i?a.splice(s,1):0===h&&o.pr<n&&(h=s+1);a.splice(h,0,{c:e,s:i,up:r,pr:n})},h.removeEventListener=function(t,e){var i,r=this._listeners[t];if(r)for(i=r.length;--i>-1;)if(r[i].c===e)return void r.splice(i,1)},h.dispatchEvent=function(t){var e,i,r,n=this._listeners[t];if(n)for((e=n.length)>1&&(n=n.slice(0)),i=this._eventTarget;--e>-1;)(r=n[e])&&(r.up?r.c.call(r.s||i,{type:t,target:i}):r.c.call(r.s||i))};var E=t.requestAnimationFrame,C=t.cancelAnimationFrame,A=Date.now||function(){return(new Date).getTime()},P=A();for(a=(s=["ms","moz","webkit","o"]).length;--a>-1&&!E;)E=t[s[a]+"RequestAnimationFrame"],C=t[s[a]+"CancelAnimationFrame"]||t[s[a]+"CancelRequestAnimationFrame"];b("Ticker",function(t,e){var i,n,o,s,a,h=this,c=A(),p=!(!1===e||!E)&&"auto",d=500,y=33,g=function(t){var e,r,l=A()-P;l>d&&(c+=l-y),h.time=((P+=l)-c)/1e3,e=h.time-a,(!i||e>0||!0===t)&&(h.frame++,a+=e+(e>=s?.004:s-e),r=!0),!0!==t&&(o=n(g)),r&&h.dispatchEvent("tick")};M.call(h),h.time=h.frame=0,h.tick=function(){g(!0)},h.lagSmoothing=function(t,e){return arguments.length?(d=t||1/f,void(y=Math.min(e,d,0))):1/f>d},h.sleep=function(){null!=o&&(p&&C?C(o):clearTimeout(o),n=m,o=null,h===l&&(u=!1))},h.wake=function(t){null!==o?h.sleep():t?c+=-P+(P=A()):h.frame>10&&(P=A()-d+5),n=0===i?m:p&&E?E:function(t){return setTimeout(t,1e3*(a-h.time)+1|0)},h===l&&(u=!0),g(2)},h.fps=function(t){return arguments.length?(a=this.time+(s=1/((i=t)||60)),void h.wake()):i},h.useRAF=function(t){return arguments.length?(h.sleep(),p=t,void h.fps(i)):p},h.fps(t),setTimeout(function(){"auto"===p&&h.frame<5&&"hidden"!==(r||{}).visibilityState&&h.useRAF(!1)},1500)}),(h=p.Ticker.prototype=new p.events.EventDispatcher).constructor=p.Ticker;var k=b("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!0===e.immediateRender,this.data=e.data,this._reversed=!0===e.reversed,Z){u||l.wake();var i=this.vars.useFrames?Y:Z;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});l=k.ticker=new p.Ticker,(h=k.prototype)._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var R=function(){u&&A()-P>2e3&&("hidden"!==(r||{}).visibilityState||!l.lagSmoothing())&&l.wake();var t=setTimeout(R,2e3);t.unref&&t.unref()};R(),h.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},h.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},h.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},h.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},h.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},h.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)}
vendor: 8,702 bytes, line 1
1,h.render=function(t,e,i){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<i+this.totalDuration()/this._timeScale-1e-7},h._enabled=function(t,e){return u||l.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},h._kill=function(t,e){return this._enabled(!1,!1)},h.kill=function(t,e){return this._kill(t,e),this},h._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},h._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();--e>-1;)"{self}"===t[e]&&(i[e]=this);return i},h._callback=function(t){var e=this.vars,i=e[t],r=e[t+"Params"],n=e[t+"Scope"]||e.callbackScope||this;switch(r?r.length:0){case 0:i.call(n);break;case 1:i.call(n,r[0]);break;case 2:i.call(n,r[0],r[1]);break;default:i.apply(n,r)}},h.eventCallback=function(t,e,i,r){if("on"===(t||"").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[t];null==e?delete n[t]:(n[t]=e,n[t+"Params"]=y(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,n[t+"Scope"]=r),"onUpdate"===t&&(this._onUpdate=e)}return this},h.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},h.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},h.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},h.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},h.totalTime=function(t,e,i){if(u||l.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>t&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,n=this._timeline;if(t>r&&!i&&(t=r),this._startTime=(this._paused?this._pauseTime:n._time)-(this._reversed?r-t:t)/this._timeScale,n._dirty||this._uncache(!1),n._timeline)for(;n._timeline;)n._timeline._time!==(n._startTime+n._totalTime)/n._timeScale&&n.totalTime(n._totalTime,!0),n=n._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==t||0===this._duration)&&(I.length&&$(),this.render(t,e,!1),I.length&&$())}return this},h.progress=h.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},h.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},h.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(t){if(!arguments.length)return this._timeScale;var e,i;for(t=t||f,this._timeline&&this._timeline.smoothChildTiming&&(i=(e=this._pauseTime)||0===e?e:this._timeline.totalTime(),this._startTime=i-(i-this._startTime)*this._timeScale/t),this._timeScale=t,i=this.timeline;i&&i.timeline;)i._dirty=!0,i.totalDuration(),i=i.timeline;return this},h.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(t){if(!arguments.length)return this._paused;var e,i,r=this._timeline;return t!=this._paused&&r&&(u||t||l.wake(),i=(e=r.rawTime())-this._pauseTime,!t&&r.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&this.render(e=r.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,e===this._totalTime,!0)),this._gc&&!t&&this._enabled(!0,!1),this};var D=b("core.SimpleTimeline",function(t){k.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(h=D.prototype=new k).constructor=D,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(t,e,i,r){var n,o;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=this.rawTime()-(t._timeline.rawTime()-t._pauseTime)),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),n=this._last,this._sortChildren)for(o=t._startTime;n&&n._startTime>o;)n=n._prev;return n?(t._next=n._next,n._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=n,this._recent=t,this._timeline&&this._uncache(!0),this},h._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(t,e,i){var r,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;n;)r=n._next,(n._active||t>=n._startTime&&!n._paused&&!n._gc)&&n.render(n._reversed?(n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale:(t-n._startTime)*n._timeScale,e,i),n=r},h.rawTime=function(){return u||l.wake(),this._totalTime};var O=b("TweenLite",function(e,i,r){if(k.call(this,i,r),this.render=O.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:O.selector(e)||e;var n,o,s,a=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),h=this.vars.overwrite;if(this._overwrite=h=null==h?W[O.defaultOverwrite]:"number"==typeof h?h>>0:W[h],(a||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=d(e),this._propLookup=[],this._siblings=[],n=0;n<s.length;n++)(o=s[n])?"string"!=typeof o?o.length&&o!==t&&o[0]&&(o[0]===t||o[0].nodeType&&o[0].style&&!o.nodeType)?(s.splice(n--,1),this._targets=s=s.concat(d(o))):(this._siblings[n]=K(o,this,!1),1===h&&this._siblings[n].length>1&&tt(o,this,null,1,this._siblings[n])):"string"==typeof(o=s[n--]=O.selector(o))&&s.splice(n+1,1):s.splice(n--,1);else this._propLookup={},this._siblings=K(e,this,!1),1===h&&this._siblings.length>1&&tt(e,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-f,this.render(Math.min(0,-this._delay)))},!0),L=function(e){return e&&e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType)};(h=O.prototype=new k).constructor=O,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,O.version="2.0.1",O.defaultEase=h._ease=new w(null,null,1,1),O.defaultOverwrite="auto",O.ticker=l,O.autoSleep=120,O.lagSmoothing=function(t,e){l.lagSmoothing(t,e)},O.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(O.selector=i,i(e)):(r||(r=t.document),r?r.querySelectorAll?r.querySelectorAll(e):r.getElementById("#"===e.charAt(0)?e.substr(1):e):e)};var I=[],N={},F=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,U=/[\+-]=-?[\.\d]/,B=function(t){for(var e,i=this._firstPT;i;)e=i.blob?1===t&&null!=this.end?this.end:t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m.call(this._tween,e,this._target||i.t,this._tween):1e-6>e&&e>-1e-6&&!i.blob&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},G=function(t,e,i,r){var n,o,s,a,h,l,u,c=[],p=0,f="",d=0;for(c.start=t,c.end=e,t=c[0]=t+"",e=c[1]=e+"",i&&(i(c),t=c[0],e=c[1]),c.length=0,n=t.match(F)||[],o=e.match(F)||[],r&&(r._next=null,r.blob=1,c._firstPT=c._applyPT=r),h=o.length,a=0;h>a;a++)f+=(l=e.substr(p,e.indexOf(u=o[a],p)-p))||!a?l:",",p+=l.length,d?d=(d+1)%5:"rgba("===l.substr(-5)&&(d=1),u===n[a]||n.length<=a?f+=u:(f&&(c.push(f),f=""),s=parseFloat(n[a]),c.push(s),c._firstPT={_next:c._firstPT,t:c,p:c.length-1,s:s,c:("="===u.charAt(1)?parseInt(u.charAt(0)+"1",10)*parseFloat(u.substr(2)):parseFloat(u)-s)||0,f:0,m:d&&4>d?Math.round:0}),p+=u.length;return(f+=e.substr(p))&&c.push(f),c.setRatio=B,U.test(e)&&(c.end=null),c},V=function(t,e,i,r,n,o,s,a,h){"function"==typeof r&&(r=r(h||0,t));var l=typeof t[e],u="function"!==l?"":e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),c="get"!==i?i:u?s?t[u](s):t[u]():t[e],p="str
1ing"==typeof r&&"="===r.charAt(1),f={t:t,p:e,s:c,f:"function"===l,pg:0,n:n||e,m:o?"function"==typeof o?o:Math.round:0,pr:0,c:p?parseInt(r.charAt(0)+"1",10)*parseFloat(r.substr(2)):parseFloat(r)-c||0};return("number"!=typeof c||"number"!=typeof r&&!p)&&(s||isNaN(c)||!p&&isNaN(r)||"boolean"==typeof c||"boolean"==typeof r?(f.fp=s,f={t:G(c,p?parseFloat(f.s)+f.c+(f.s+"").replace(/[0-9\-\.]/g,""):r,a||O.defaultStringFilter,f),p:"setRatio",s:0,c:1,f:2,pg:0,n:n||e,pr:0,m:0}):(f.s=parseFloat(c),p||(f.c=parseFloat(r)-f.s||0))),f.c?((f._next=this._firstPT)&&(f._next._prev=f),this._firstPT=f,f):void 0},q=O._internals={isArray:y,isSelector:L,lazyTweens:I,blobDif:G},z=O._plugins={},j=q.tweenLookup={},H=0,X=q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},W={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Y=k._rootFramesTimeline=new D,Z=k._rootTimeline=new D,Q=30,$=q.lazyRender=function(){var t,e=I.length;for(N={};--e>-1;)(t=I[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);I.length=0};Z._startTime=l.time,Y._startTime=l.frame,Z._active=Y._active=!0,setTimeout($,1),k._updateRoot=O.render=function(){var t,e,i;if(I.length&&$(),Z.render((l.time-Z._startTime)*Z._timeScale,!1,!1),Y.render((l.frame-Y._startTime)*Y._timeScale,!1,!1),I.length&&$(),l.frame>=Q){for(i in Q=l.frame+(parseInt(O.autoSleep,10)||120),j){for(t=(e=j[i].tweens).length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete j[i]}if((!(i=Z._first)||i._paused)&&O.autoSleep&&!Y._first&&1===l._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||l.sleep()}}},l.addEventListener("tick",k._updateRoot);var K=function(t,e,i){var r,n,o=t._gsTweenID;if(j[o||(t._gsTweenID=o="t"+H++)]||(j[o]={target:t,tweens:[]}),e&&((r=j[o].tweens)[n=r.length]=e,i))for(;--n>-1;)r[n]===e&&r.splice(n,1);return j[o].tweens},J=function(t,e,i,r){var n,o,s=t.vars.onOverwrite;return s&&(n=s(t,e,i,r)),(s=O.onOverwrite)&&(o=s(t,e,i,r)),!1!==n&&!1!==o},tt=function(t,e,i,r,n){var o,s,a,h;if(1===r||r>=4){for(h=n.length,o=0;h>o;o++)if((a=n[o])!==e)a._gc||a._kill(null,t,e)&&(s=!0);else if(5===r)break;return s}var l,u=e._startTime+f,c=[],p=0,d=0===e._duration;for(o=n.length;--o>-1;)(a=n[o])===e||a._gc||a._paused||(a._timeline!==e._timeline?(l=l||et(e,0,d),0===et(a,l,d)&&(c[p++]=a)):a._startTime<=u&&a._startTime+a.totalDuration()/a._timeScale>u&&((d||!a._initted)&&u-a._startTime<=2e-10||(c[p++]=a)));for(o=p;--o>-1;)if(a=c[o],2===r&&a._kill(i,t,e)&&(s=!0),2!==r||!a._firstPT&&a._initted){if(2!==r&&!J(a,e))continue;a._enabled(!1,!1)&&(s=!0)}return s},et=function(t,e,i){for(var r=t._timeline,n=r._timeScale,o=t._startTime;r._timeline;){if(o+=r._startTime,n*=r._timeScale,r._paused)return-100;r=r._timeline}return(o/=n)>e?o-e:i&&o===e||!t._initted&&2*f>o-e?f:(o+=t.totalDuration()/t._timeScale/n)>e+f?0:o-e-f};h._init=function(){var t,e,i,r,n,o,s=this.vars,a=this._overwrittenProps,h=this._duration,l=!!s.immediateRender,u=s.ease;if(s.startAt){for(r in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),n={},s.startAt)n[r]=s.startAt[r];if(n.data="isStart",n.overwrite=!1,n.immediateRender=!0,n.lazy=l&&!1!==s.lazy,n.startAt=n.delay=null,n.onUpdate=s.onUpdate,n.onUpdateParams=s.onUpdateParams,n.onUpdateScope=s.onUpdateScope||s.callbackScope||this,this._startAt=O.to(this.target||{},0,n),l)if(this._time>0)this._startAt=null;else if(0!==h)return}else if(s.runBackwards&&0!==h)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{for(r in 0!==this._time&&(l=!1),i={},s)X[r]&&"autoCSS"!==r||(i[r]=s[r]);if(i.overwrite=0,i.data="isFromStart",i.lazy=l&&!1!==s.lazy,i.immediateRender=l,this._startAt=O.to(this.target,0,i),l){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof w?u:"function"==typeof u?new w(u,s.easeParams):T[u]||O.defaultEase:O.defaultEase,s.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,s.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(o=this._targets.length,t=0;o>t;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],a?a[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,a,0);if(e&&O._onPluginEvent("_onInitAllProps",this),a&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),s.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=s.onUpdate,this._initted=!0}
vendor: 5,576 bytes, line 1
1,h._initProps=function(e,i,r,n,o){var s,a,h,l,u,c;if(null==e)return!1;for(s in N[e._gsTweenID]&&$(),this.vars.css||e.style&&e!==t&&e.nodeType&&z.css&&!1!==this.vars.autoCSS&&function(t,e){var i,r={};for(i in t)X[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!z[i]||z[i]&&z[i]._autoCSS)||(r[i]=t[i],delete t[i]);t.css=r}(this.vars,e),this.vars)if(c=this.vars[s],X[s])c&&(c instanceof Array||c.push&&y(c))&&-1!==c.join("").indexOf("{self}")&&(this.vars[s]=c=this._swapSelfInParams(c,this));else if(z[s]&&(l=new z[s])._onInitTween(e,this.vars[s],this,o)){for(this._firstPT=u={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:s,pg:1,pr:l._priority,m:0},a=l._overwriteProps.length;--a>-1;)i[l._overwriteProps[a]]=this._firstPT;(l._priority||l._onInitAllProps)&&(h=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else i[s]=V.call(this,e,s,"get",c,s,0,null,this.vars.stringFilter,o);return n&&this._kill(n,e)?this._initProps(e,i,r,n,o):this._overwrite>1&&this._firstPT&&r.length>1&&tt(e,this,i,this._overwrite,r)?(this._kill(i,e),this._initProps(e,i,r,n,o)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(N[e._gsTweenID]=!0),h)},h.render=function(t,e,i){var r,n,o,s,a=this._time,h=this._duration,l=this._rawPrevTime;if(t>=h-1e-7&&t>=0)this._totalTime=this._time=h,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(r=!0,n="onComplete",i=i||this._timeline.autoRemoveChildren),0===h&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0>l||0>=t&&t>=-1e-7||l===f&&"isPause"!==this.data)&&l!==t&&(i=!0,l>f&&(n="onReverseComplete")),this._rawPrevTime=s=!e||t||l===t?t:f);else if(1e-7>t)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==a||0===h&&l>0)&&(n="onReverseComplete",r=this._reversed),0>t&&(this._active=!1,0===h&&(this._initted||!this.vars.lazy||i)&&(l>=0&&(l!==f||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=s=!e||t||l===t?t:f)),(!this._initted||this._startAt&&this._startAt.progress())&&(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/h,c=this._easeType,p=this._easePower;(1===c||3===c&&u>=.5)&&(u=1-u),3===c&&(u*=2),1===p?u*=u:2===p?u*=u*u:3===p?u*=u*u*u:4===p&&(u*=u*u*u*u),this.ratio=1===c?1-u:2===c?u:.5>t/h?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/h);if(this._time!==a||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=a,this._rawPrevTime=l,I.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/h):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==a&&t>=0&&(this._active=!0),0===a&&(this._startAt&&(t>=0?this._startAt.render(t,!0,i):n||(n="_dummyGS")),this.vars.onStart&&(0!==this._time||0===h)&&(e||this._callback("onStart"))),o=this._firstPT;o;)o.f?o.t[o.p](o.c*this.ratio+o.s):o.t[o.p]=o.c*this.ratio+o.s,o=o._next;this._onUpdate&&(0>t&&this._startAt&&-1e-4!==t&&this._startAt.render(t,!0,i),e||(this._time!==a||r||i)&&this._callback("onUpdate")),n&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,!0,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[n]&&this._callback(n),0===h&&this._rawPrevTime===f&&s!==f&&(this._rawPrevTime=0))}},h._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:O.selector(e)||e;var r,n,o,s,a,h,l,u,c,p=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((y(e)||L(e))&&"number"!=typeof e[0])for(r=e.length;--r>-1;)this._kill(t,e[r],i)&&(h=!0);else{if(this._targets){for(r=this._targets.length;--r>-1;)if(e===this._targets[r]){a=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],n=this._overwrittenProps[r]=t?this._overwrittenProps[r]||{}:"all";break}}else{if(e!==this.target)return!1;a=this._propLookup,n=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(a){if(l=t||a,u=t!==n&&"all"!==n&&t!==a&&("object"!=typeof t||!t._tempKill),i&&(O.onOverwrite||this.vars.onOverwrite)){for(o in l)a[o]&&(c||(c=[]),c.push(o));if((c||!t)&&!J(this,i,e,c))return!1}for(o in l)(s=a[o])&&(p&&(s.f?s.t[s.p](s.s):s.t[s.p]=s.s,h=!0),s.pg&&s.t._kill(l)&&(h=!0),s.pg&&0!==s.t._overwriteProps.length||(s._prev?s._prev._next=s._next:s===this._firstPT&&(this._firstPT=s._next),s._next&&(s._next._prev=s._prev),s._next=s._prev=null),delete a[o]),u&&(n[o]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return h},h.invalidate=function(){return this._notifyPluginsOfEnabled&&O._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],k.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-f,this.render(Math.min(0,-this._delay))),this},h._enabled=function(t,e){if(u||l.wake(),t&&this._gc){var i,r=this._targets;if(r)for(i=r.length;--i>-1;)this._siblings[i]=K(r[i],this,!0);else this._siblings=K(this.target,this,!0)}return k.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&O._onPluginEvent(t?"_onEnable":"_onDisable",this)}
1,O.to=function(t,e,i){return new O(t,e,i)},O.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new O(t,e,i)},O.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new O(t,e,r)},O.delayedCall=function(t,e,i,r,n){return new O(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:n,overwrite:0})},O.set=function(t,e){return new O(t,0,e)},O.getTweensOf=function(t,e){if(null==t)return[];var i,r,n,o;if(t="string"!=typeof t?t:O.selector(t)||t,(y(t)||L(t))&&"number"!=typeof t[0]){for(i=t.length,r=[];--i>-1;)r=r.concat(O.getTweensOf(t[i],e));for(i=r.length;--i>-1;)for(o=r[i],n=i;--n>-1;)o===r[n]&&r.splice(i,1)}else if(t._gsTweenID)for(i=(r=K(t).concat()).length;--i>-1;)(r[i]._gc||e&&!r[i].isActive())&&r.splice(i,1);return r||[]},O.killTweensOf=O.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var r=O.getTweensOf(t,e),n=r.length;--n>-1;)r[n]._kill(i,t)};var it=b("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=it.prototype},!0);if(h=it.prototype,it.version="1.19.0",it.API=2,h._firstPT=null,h._addTween=V,h.setRatio=B,h._kill=function(t){var e,i=this._overwriteProps,r=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;r;)null!=t[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._next;return!1},h._mod=h._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},O._onPluginEvent=function(t,e){var i,r,n,o,s,a=e._firstPT;if("_onInitAllProps"===t){for(;a;){for(s=a._next,r=n;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:o)?a._prev._next=a:n=a,(a._next=r)?r._prev=a:o=a,a=s}a=e._firstPT=n}for(;a;)a.pg&&"function"==typeof a.t[t]&&a.t[t]()&&(i=!0),a=a._next;return i},it.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===it.API&&(z[(new t[e])._propName]=t[e]);return!0},_.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,r=t.priority||0,n=t.overwriteProps,o={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},s=b("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){it.call(this,i,r),this._overwriteProps=n||[]},!0===t.global),a=s.prototype=new it(i);for(e in a.constructor=s,s.API=t.API,o)"function"==typeof t[e]&&(a[o[e]]=t[e]);return s.version=t.version,it.activate([s]),s},s=t._gsQueue){for(a=0;a<s.length;a++)s[a]();for(h in g)g[h].func||t.console.log("GSAP encountered missing dependency: "+h)}u=!1}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax"),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).p5=t()}(function(){return function t(e,i,r){function n(s,a){if(!i[s]){if(!e[s]){var h="function"==typeof require&&require;if(!a&&h)return h(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[s]={exports:{}};e[s][0].call(u.exports,function(t){return n(e[s][1][t]||t)},u,u.exports,t,e,i,r)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)n(r[s]);return n}({1:[function(t,e,i){"use strict";i.byteLength=function(t){var e=l(t),i=e[1];return 3*(e[0]+i)/4-i},i.toByteArray=function(t){for(var e,i=l(t),r=i[0],s=i[1],a=new o(3*(r+(p=s))/4-p),h=0,u=0<s?r-4:r,c=0;c<u;c+=4)e=n[t.charCodeAt(c)]<<18|n[t.charCodeAt(c+1)]<<12|n[t.charCodeAt(c+2)]<<6|n[t.charCodeAt(c+3)],a[h++]=e>>16&255,a[h++]=e>>8&255,a[h++]=255&e;var p;return 2===s&&(e=n[t.charCodeAt(c)]<<2|n[t.charCodeAt(c+1)]>>4,a[h++]=255&e),1===s&&(e=n[t.charCodeAt(c)]<<10|n[t.charCodeAt(c+1)]<<4|n[t.charCodeAt(c+2)]>>2,a[h++]=e>>8&255,a[h++]=255&e),a},i.fromByteArray=function(t){for(var e,i=t.length,n=i%3,o=[],s=0,a=i-n;s<a;s+=16383)o.push(u(t,s,a<s+16383?a:s+16383));return 1===n?o.push(r[(e=t[i-1])>>2]+r[e<<4&63]+"=="):2===n&&o.push(r[(e=(t[i-2]<<8)+t[i-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",a=0,h=s.length;a<h;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function l(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function u(t,e,i){for(var n,o=[],s=e;s<i;s+=3)o.push(r[(n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]))>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],2:[function(t,e,i){},{}],3:[function(t,e,i){"use strict";var r=t("base64-js"),n=t("ieee754");i.Buffer=a,i.SlowBuffer=function(t){return+t!=t&&(t=0),a.alloc(+t)},i.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(o<t)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,i){if("number"!=typeof t)return h(t,e,i);if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}function h(t,e,i){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var i=0|f(t,e),r=s(i),n=r.write(t,e);return n!==i&&(r=r.slice(0,n)),r}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer))return function(t,e,i){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(i||0))throw new RangeError('"length" is outside of buffer bounds');var r;return(r=void 0===e&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,e):new Uint8Array(t,e,i)).__proto__=a.prototype,r}(t,e,i);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return a.from(r,e,i);var n=function(t){if(a.isBuffer(t)){var e=0|p(t.length),i=s(e);return 0===i.length||t.copy(i,0,0,e),i}return void 0!==t.length?"number"!=typeof t.length||F(t.length)?s(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return l(t),s(t<0?0:0|p(t))}function c(t){for(var e=t.length<0?0:0|p(t.length),i=s(e),r=0;r<e;r+=1)i[r]=255&t[r];return i}function p(t){if(o<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var i=t.length,r=2<arguments.length&&!0===arguments[2];if(!r&&0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return L(t).length;default:if(n)return r?-1:O(t).length;e=(""+e).toLowerCase(),n=!0}}function d(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function m(t,e,i,r,n){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):2147483647<i?i=2147483647:i<-2147483648&&(i=-2147483648),F(i=+i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:y(t,e,i,r,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,r,n){var o,s=1,a=t.length,h=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a/=s=2,h/=2,i/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var u=-1;for(o=i;o<a;
1o++)if(l(t,o)===l(e,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===h)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(a<i+h&&(i=a-h),o=i;0<=o;o--){for(var c=!0,p=0;p<h;p++)if(l(t,o+p)!==l(e,p)){c=!1;break}if(c)return o}return-1}function g(t,e,i,r){i=Number(i)||0;var n=t.length-i;r?n<(r=Number(r))&&(r=n):r=n;var o=e.length;o/2<r&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(F(a))return s;t[i+s]=a}return s}function v(t,e,i,r){return I(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,r)}function _(t,e,i){return r.fromByteArray(0===e&&i===t.length?t:t.slice(e,i))}function b(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n<i;){var o,s,a,h,l=t[n],u=null,c=239<l?4:223<l?3:191<l?2:1;if(n+c<=i)switch(c){case 1:l<128&&(u=l);break;case 2:128==(192&(o=t[n+1]))&&127<(h=(31&l)<<6|63&o)&&(u=h);break;case 3:s=t[n+2],128==(192&(o=t[n+1]))&&128==(192&s)&&2047<(h=(15&l)<<12|(63&o)<<6|63&s)&&(h<55296||57343<h)&&(u=h);break;case 4:s=t[n+2],a=t[n+3],128==(192&(o=t[n+1]))&&128==(192&s)&&128==(192&a)&&65535<(h=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)&&h<1114112&&(u=h)}null===u?(u=65533,c=1):65535<u&&(r.push((u-=65536)>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=c}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);for(var i="",r=0;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=x));return i}(r)}i.kMaxLength=o,(a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,i){return h(t,e,i)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,i){return n=e,o=i,l(r=t),r<=0?s(r):void 0!==n?"string"==typeof o?s(r).fill(n,o):s(r).fill(n):s(r);var r,n,o},a.allocUnsafe=function(t){return u(t)},a.allocUnsafeSlow=function(t){return u(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(N(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var i=t.length,r=e.length,n=0,o=Math.min(i,r);n<o;++n)if(t[n]!==e[n]){i=t[n],r=e[n];break}return i<r?-1:r<i?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var i;if(void 0===e)for(i=e=0;i<t.length;++i)e+=t[i].length;var r=a.allocUnsafe(e),n=0;for(i=0;i<t.length;++i){var o=t[i];if(N(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},a.byteLength=f,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this}
1,a.prototype.toLocaleString=a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?b(this,0,t):(function(t,e,i){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,i);case"utf8":case"utf-8":return b(this,e,i);case"ascii":return w(this,e,i);case"latin1":case"binary":return T(this,e,i);case"base64":return _(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}).apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=i.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},a.prototype.compare=function(t,e,i,r,n){if(N(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(n<=r&&i<=e)return 0;if(n<=r)return-1;if(i<=e)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(r>>>=0),s=(i>>>=0)-(e>>>=0),h=Math.min(o,s),l=this.slice(r,n),u=t.slice(e,i),c=0;c<h;++c)if(l[c]!==u[c]){o=l[c],s=u[c];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},a.prototype.indexOf=function(t,e,i){return m(this,t,e,i,!0)},a.prototype.lastIndexOf=function(t,e,i){return m(this,t,e,i,!1)},a.prototype.write=function(t,e,i,r){if(void 0===e)r="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)r=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-e;if((void 0===i||n<i)&&(i=n),0<t.length&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,s,a,h,l,u,c=!1;;)switch(r){case"hex":return g(this,t,e,i);case"utf8":case"utf-8":return u=i,I(O(t,this.length-(l=e)),this,l,u);case"ascii":return v(this,t,e,i);case"latin1":case"binary":return v(this,t,e,i);case"base64":return a=e,h=i,I(L(t),this,a,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=i,I(function(t,e){for(var i,r,n=[],o=0;o<t.length&&!((e-=2)<0);++o)r=(i=t.charCodeAt(o))>>8,n.push(i%256),n.push(r);return n}(t,this.length-(o=e)),this,o,s);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),c=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function w(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(127&t[n]);return r}function T(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(t[n]);return r}function S(t,e,i){var r=t.length;(!e||e<0)&&(e=0),(!i||i<0||r<i)&&(i=r);for(var n="",o=e;o<i;++o)n+=D(t[o]);return n}function M(t,e,i){for(var r=t.slice(e,i),n="",o=0;o<r.length;o+=2)n+=String.fromCharCode(r[o]+256*r[o+1]);return n}function E(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(i<t+e)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,i,r,n,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n<e||e<o)throw new RangeError('"value" argument is out of bounds');if(i+r>t.length)throw new RangeError("Index out of range")}function A(t,e,i,r,n,o){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function P(t,e,i,r,o){return e=+e,i>>>=0,o||A(t,0,i,4),n.write(t,e,i,r,23,4),i+4}function k(t,e,i,r,o){return e=+e,i>>>=0,o||A(t,0,i,8),n.write(t,e,i,r,52,8),i+8}a.prototype.slice=function(t,e){var i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):i<t&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):i<e&&(e=i),e<t&&(e=t);var r=this.subarray(t,e);return r.__proto__=a.prototype,r}
vendor: 4,198 bytes, line 1
1,a.prototype.readUIntLE=function(t,e,i){t>>>=0,e>>>=0,i||E(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r},a.prototype.readUIntBE=function(t,e,i){t>>>=0,e>>>=0,i||E(t,e,this.length);for(var r=this[t+--e],n=1;0<e&&(n*=256);)r+=this[t+--e]*n;return r},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,i){t>>>=0,e>>>=0,i||E(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return(n*=128)<=r&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,i){t>>>=0,e>>>=0,i||E(t,e,this.length);for(var r=e,n=1,o=this[t+--r];0<r&&(n*=256);)o+=this[t+--r]*n;return(n*=128)<=o&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,i,r){t=+t,e>>>=0,i>>>=0,r||C(this,t,e,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[e]=255&t;++o<i&&(n*=256);)this[e+o]=t/n&255;return e+i},a.prototype.writeUIntBE=function(t,e,i,r){t=+t,e>>>=0,i>>>=0,r||C(this,t,e,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[e+n]=255&t;0<=--n&&(o*=256);)this[e+n]=t/o&255;return e+i},a.prototype.writeUInt8=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e>>>=0,!r){var n=Math.pow(2,8*i-1);C(this,t,e,i,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o<i&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+i},a.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e>>>=0,!r){var n=Math.pow(2,8*i-1);C(this,t,e,i,n-1,-n)}var o=i-1,s=1,a=0;for(this[e+o]=255&t;0<=--o&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+i},a.prototype.writeInt8=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4}
vendor: 2,145 bytes, line 1
1,a.prototype.writeInt32BE=function(t,e,i){return t=+t,e>>>=0,i||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,i){return P(this,t,e,!0,i)},a.prototype.writeFloatBE=function(t,e,i){return P(this,t,e,!1,i)},a.prototype.writeDoubleLE=function(t,e,i){return k(this,t,e,!0,i)},a.prototype.writeDoubleBE=function(t,e,i){return k(this,t,e,!1,i)},a.prototype.copy=function(t,e,i,r){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),0<r&&r<i&&(r=i),r===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-i&&(r=t.length-e+i);var n=r-i;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,i,r);else if(this===t&&i<e&&e<r)for(var o=n-1;0<=o;--o)t[o+e]=this[o+i];else Uint8Array.prototype.set.call(t,this.subarray(i,r),e);return n},a.prototype.fill=function(t,e,i,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var n=t.charCodeAt(0);("utf8"===r&&n<128||"latin1"===r)&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var o;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(o=e;o<i;++o)this[o]=t;else{var s=a.isBuffer(t)?t:a.from(t,r),h=s.length;if(0===h)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<i-e;++o)this[o+e]=s[o%h]}return this};var R=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function O(t,e){var i;e=e||1/0;for(var r=t.length,n=null,o=[],s=0;s<r;
1++s){if(55295<(i=t.charCodeAt(s))&&i<57344){if(!n){if(56319<i){-1<(e-=3)&&o.push(239,191,189);continue}if(s+1===r){-1<(e-=3)&&o.push(239,191,189);continue}n=i;continue}if(i<56320){-1<(e-=3)&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&-1<(e-=3)&&o.push(239,191,189);if(n=null,i<128){if((e-=1)<0)break;o.push(i)}else if(i<2048){if((e-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function L(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function I(t,e,i,r){for(var n=0;n<r&&!(n+i>=e.length||n>=t.length);++n)e[n+i]=t[n];return n}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}},{"base64-js":1,ieee754:7}],4:[function(t,e,i){(function(r,n){var o;o=function(){"use strict";function e(t){return"function"==typeof t}var i=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,s=void 0,a=void 0,h=function(t,e){m[o]=t,m[o+1]=e,2===(o+=2)&&(a?a(y):x())},l="undefined"!=typeof window?window:void 0,u=l||{},c=u.MutationObserver||u.WebKitMutationObserver,p="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(y,1)}}var m=new Array(1e3);function y(){for(var t=0;t<o;t+=2)(0,m[t])(m[t+1]),m[t]=void 0,m[t+1]=void 0;o=0}var g,v,_,b,x=void 0;function w(t,e){var i=this,r=new this.constructor(M);void 0===r[S]&&G(r);var n=i._state;if(n){var o=arguments[n-1];h(function(){return U(n,r,o,i._result)})}else N(i,r,t,e);return r}function T(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(M);return D(e,t),e}x=p?function(){return r.nextTick(y)}:c?(v=0,_=new c(y),b=document.createTextNode(""),_.observe(b,{characterData:!0}),function(){b.data=v=++v%2}):f?((g=new MessageChannel).port1.onmessage=y,function(){return g.port2.postMessage(0)}):void 0===l&&"function"==typeof t?function(){try{var t=Function("return this")().require("vertx");return void 0!==(s=t.runOnLoop||t.runOnContext)?function(){s(y)}:d()}catch(t){return d()}}():d();var S=Math.random().toString(36).substring(2);function M(){}var E=void 0,C=1,A=2,P={error:null};function k(t){try{return t.then}catch(t){return P.error=t,P}}function R(t,i,r){var n,o,s,a;i.constructor===t.constructor&&r===w&&i.constructor.resolve===T?(s=t,(a=i)._state===C?L(s,a._result):a._state===A?I(s,a._result):N(a,void 0,function(t){return D(s,t)},function(t){return I(s,t)})):r===P?(I(t,P.error),P.error=null):void 0===r?L(t,i):e(r)?(n=i,o=r,h(function(t){var e=!1,i=function(t,e,i,r){try{t.call(e,i,r)}catch(t){return t}}(o,n,function(i){e||(e=!0,n!==i?D(t,i):L(t,i))},function(i){e||(e=!0,I(t,i))});!e&&i&&(e=!0,I(t,i))},t)):L(t,i)}function D(t,e){var i,r;t===e?I(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(i=e),null===i||"object"!==r&&"function"!==r?L(t,e):R(t,e,k(e)))}function O(t){t._onerror&&t._onerror(t._result),F(t)}function L(t,e){t._state===E&&(t._result=e,t._state=C,0!==t._subscribers.length&&h(F,t))}function I(t,e){t._state===E&&(t._state=A,t._result=e,h(O,t))}function N(t,e,i,r){var n=t._subscribers,o=n.length;t._onerror=null,n[o]=e,n[o+C]=i,n[o+A]=r,0===o&&t._state&&h(F,t)}function F(t){var e=t._subscribers,i=t._state;if(0!==e.length){for(var r=void 0,n=void 0,o=t._result,s=0;s<e.length;s+=3)n=e[s+i],(r=e[s])?U(i,r,n,o):n(o);t._subscribers.length=0}}function U(t,i,r,n){var o=e(r),s=void 0,a=void 0,h=void 0,l=void 0;if(o){if((s=function(t,e){try{return t(e)}catch(t){return P.error=t,P}}(r,n))===P?(l=!0,a=s.error,s.error=null):h=!0,i===s)return void I(i,new TypeError("A promises callback cannot return that same promise."))}else s=n,h=!0;i._state!==E||(o&&h?D(i,s):l?I(i,a):t===C?L(i,s):t===A&&I(i,s))}var B=0;function G(t){t[S]=B++,t._state=void 0,t._result=void 0,t._subscribers=[]}var V=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(M),this.promise[S]||G(this.promise),i(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===E&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,r=i.resolve;if(r===T){var n=k(t);if(n===w&&t._state!==E)this._settledAt(t._state,e,t._result);else if("function"!=typeof n)this._remaining--,this._result[e]=t;else if(i===q){var o=new i(M);R(o,t,n),this._willSettleAt(o,e)}
1else this._willSettleAt(new i(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,i){var r=this.promise;r._state===E&&(this._remaining--,t===A?I(r,i):this._result[e]=i),0===this._remaining&&L(r,this._result)},t.prototype._willSettleAt=function(t,e){var i=this;N(t,void 0,function(t){return i._settledAt(C,e,t)},function(t){return i._settledAt(A,e,t)})},t}(),q=function(){function t(e){this[S]=B++,this._result=this._state=void 0,this._subscribers=[],M!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(t,e){try{e(function(e){D(t,e)},function(e){I(t,e)})}catch(e){I(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var i=this.constructor;return e(t)?this.then(function(e){return i.resolve(t()).then(function(){return e})},function(e){return i.resolve(t()).then(function(){throw e})}):this.then(t,t)},t}();return q.prototype.then=w,q.all=function(t){return new V(this,t).promise},q.race=function(t){var e=this;return i(t)?new e(function(i,r){for(var n=t.length,o=0;o<n;o++)e.resolve(t[o]).then(i,r)}):new e(function(t,e){return e(new TypeError("You must pass an array to race."))})},q.resolve=T,q.reject=function(t){var e=new this(M);return I(e,t),e},q._setScheduler=function(t){a=t},q._setAsap=function(t){h=t},q._asap=h,q.polyfill=function(){var t=void 0;if(void 0!==n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===i&&!e.cast)return}t.Promise=q},q.Promise=q},"object"==typeof i&&void 0!==e?e.exports=o():this.ES6Promise=o()}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:10}],5:[function(t,e,i){!function(t,r){if(void 0!==i&&void 0!==e)r(0,e);else{var n={exports:{}};r(0,n),t.fetchJsonp=n.exports}}(this,function(t,e){"use strict";function i(e){try{delete window[e]}catch(t){window[e]=void 0}}function r(t){var e=document.getElementById(t);e&&document.getElementsByTagName("head")[0].removeChild(e)}e.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t,o=e.timeout||5e3,s=e.jsonpCallback||"callback",a=void 0;return new Promise(function(h,l){var u=e.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=s+"_"+u;window[u]=function(t){h({ok:!0,json:function(){return Promise.resolve(t)}}),a&&clearTimeout(a),r(c),i(u)},n+=-1===n.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+n+s+"="+u),e.charset&&p.setAttribute("charset",e.charset),p.id=c,document.getElementsByTagName("head")[0].appendChild(p),a=setTimeout(function(){l(new Error("JSONP request to "+t+" timed out")),i(u),r(c),window[u]=function(){i(u)}},o),p.onerror=function(){l(new Error("JSONP request to "+t+" failed")),i(u),r(c),a&&clearTimeout(a)}})}})},{}],6:[function(t,e,i){var r=r||function(t){"use strict";if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},i=t.document.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in i,n=/constructor/i.test(t.HTMLElement)||t.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},a=function(t){setTimeout(function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()},4e4)},h=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},l=function(l,u,c){c||(l=h(l));
1var p,f=this,d="application/octet-stream"===l.type,m=function(){!function(t,e,i){for(var r=(e=[].concat(e)).length;r--;){var n=t["on"+e[r]];if("function"==typeof n)try{n.call(t,t)}catch(t){s(t)}}}(f,"writestart progress write writeend".split(" "))};if(f.readyState=f.INIT,r)return p=e().createObjectURL(l),void setTimeout(function(){var t,e;i.href=p,i.download=u,t=i,e=new MouseEvent("click"),t.dispatchEvent(e),m(),a(p),f.readyState=f.DONE});!function(){if((o||d&&n)&&t.FileReader){var i=new FileReader;return i.onloadend=function(){var e=o?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,f.readyState=f.DONE,m()},i.readAsDataURL(l),f.readyState=f.INIT}p||(p=e().createObjectURL(l)),d?t.location.href=p:t.open(p,"_blank")||(t.location.href=p),f.readyState=f.DONE,m(),a(p)}()},u=l.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,i){return e=e||t.name||"download",i||(t=h(t)),navigator.msSaveOrOpenBlob(t,e)}:(u.abort=function(){},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(t,e,i){return new l(t,e||t.name||"download",i)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==e&&e.exports&&(e.exports.saveAs=r)},{}],7:[function(t,e,i){i.read=function(t,e,i,r,n){var o,s,a=8*n-r-1,h=(1<<a)-1,l=h>>1,u=-7,c=i?n-1:0,p=i?-1:1,f=t[e+c];for(c+=p,o=f&(1<<-u)-1,f>>=-u,u+=a;0<u;o=256*o+t[e+c],c+=p,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;0<u;s=256*s+t[e+c],c+=p,u-=8);if(0===o)o=1-l;else{if(o===h)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=l}return(f?-1:1)*s*Math.pow(2,o-r)},i.write=function(t,e,i,r,n,o){var s,a,h,l=8*o-n-1,u=(1<<l)-1,c=u>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),2<=(e+=1<=s+c?p/h:p*Math.pow(2,1-c))*h&&(s++,h/=2),u<=s+c?(a=0,s=u):1<=s+c?(a=(e*h-1)*Math.pow(2,n),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,n),s=0));8<=n;t[i+f]=255&a,f+=d,a/=256,n-=8);for(s=s<<n|a,l+=n;0<l;t[i+f]=255&s,f+=d,s/=256,l-=8);t[i+f-d]|=128*m}},{}],8:[function(t,e,i){"use strict";var r;function n(t,e){return t.b===e.b&&t.a===e.a}function o(t,e){return t.b<e.b||t.b===e.b&&t.a<=e.a}function s(t,e,i){var r=e.b-t.b,n=i.b-e.b;return 0<r+n?r<n?e.a-t.a+r/(r+n)*(t.a-i.a):e.a-i.a+n/(r+n)*(i.a-t.a):0}function a(t,e,i){var r=e.b-t.b,n=i.b-e.b;return 0<r+n?(e.a-i.a)*r+(e.a-t.a)*n:0}function h(t,e){return t.a<e.a||t.a===e.a&&t.b<=e.b}function l(t,e,i){var r=e.a-t.a,n=i.a-e.a;return 0<r+n?r<n?e.b-t.b+r/(r+n)*(t.b-i.b):e.b-i.b+n/(r+n)*(i.b-t.b):0}function u(t,e,i){var r=e.a-t.a,n=i.a-e.a;return 0<r+n?(e.b-i.b)*r+(e.b-t.b)*n:0}function c(t,e,i,r){return(t=t<0?0:t)<=(i=i<0?0:i)?0===i?(e+r)/2:e+t/(t+i)*(r-e):r+i/(t+i)*(e-r)}function p(t){var e=g(t.b);return _(e,t.c),_(e.b,t.c),b(e,t.a),e}function f(t,e){var i=!1,r=!1;t!==e&&(e.a!==t.a&&(r=!0,w(e.a,t.a)),e.d!==t.d&&(i=!0,T(e.d,t.d)),v(e,t),r||(_(e,t.a),t.a.c=t),i||(b(e,t.d),t.d.a=t))}function d(t){var e=t.b,i=!1;t.d!==t.b.d&&(i=!0,T(t.d,t.b.d)),t.c===t?w(t.a,null):(t.b.d.a=K(t),t.a.c=t.c,v(t,K(t)),i||b(t,t.d)),e.c===e?(w(e.a,null),T(e.d,null)):(t.d.a=K(e),e.a.c=e.c,v(e,K(e))),x(t)}function m(t){var e=g(t),i=e.b;return v(e,t.e),e.a=t.b.a,_(i,e.a),e.d=i.d=t.d,e=e.b,v(t.b,K(t.b)),v(t.b,e),t.b.a=e.a,e.b.a.c=e.b,e.b.d=t.b.d,e.f=t.f,e.b.f=t.b.f,e}function y(t,e){var i=!1,r=g(t),n=r.b;return e.d!==t.d&&(i=!0,T(e.d,t.d)),v(r,t.e),v(n,e),r.a=t.b.a,n.a=e.a,r.d=n.d=t.d,t.d.a=n,i||b(r,t.d),r}function g(t){var e=new $,i=new $;return(((i.h=t.b.h).b.h=e).h=t).b.h=i,e.b=i,((e.c=e).e=i).b=e,(i.c=i).e=e}function v(t,e){var i=t.c,r=e.c;i.b.e=e,(r.b.e=t).c=r,e.c=i}function _(t,e){var i=e.f,r=new tt(e,i);for(i.e=r,i=(e.f=r).c=t;i.a=r,(i=i.c)!==t;);}function b(t,e){var i=e.d,r=new Q(e,i);for(i.b=r,(e.d=r).a=t,r.c=e.c,i=t;i.d=r,(i=i.e)!==t;);}function x(t){var e=t.h;(e.b.h=t=t.b.h).b.h=e}function w(t,e){for(var i=t.c,r=i;r.a=e,(r=r.c)!==i;);((r=t.e).f=i=t.f).e=r}function T(t,e){for(var i=t.a,r=i;r.d=e,(r=r.e)!==i;);((r=t.b).d=i=t.d).b=r}function S(t){var e=0;return Math.abs(t[1])>Math.abs(t[0])&&(e=1),Math.abs(t[2])>Math.abs(t[e])&&(e=2),e}var M=4e150;function E(t,e){t.f+=e.f,t.b.f+=e.b.f}function C(t,e,i){return i=i.a,(e=e.a).b.a===(t=t.a)?i.b.a===t?o(e.a,i.a)?a(i.b.a,e.a,i.a)<=0:0<=a(e.b.a,i.a,e.a):a(i.b.a,t,i.a)<=0:i.b.a===t?0<=a(e.b.a,t,e.a):(e=s(e.b.a,t,e.a),(t=s(i.b.a,t,i.a))<=e)}function A(t){t.a.i=null;var e=t.e;e.a.c=e.c,e.c.a=e.a,t.e=null}function P(t,e){d(t.a),t.c=!1,(t.a=e).i=t}function k(t){for(var e=t.a.a;(t=pt(t)).a.a===e;);return t.c&&(P(t,e=y(ct(t).a.b,t.a.e)),t=pt(t)),t}function R(t,e,i){var r=new ut;return r.a=i,r.e=H(t.f,e.e,r),i.i=r}function D(t,e){switch(t.s){case 100130:return 0!=(1&e);case 100131:return 0!==e;case 100132:return 0<e;case 100133:return e<0;case 100134:return 2<=e||e<=-2}return!1}function O(t){var e=t.a,i=e.d;i.c=t.d,i.a=e,A(t)}function L(t,e,i){for(e=(t=e).a;t!==i;){t.c=!1;var r=ct(t),n=r.a;if(n.a!==e.a){if(!r.c){O(t);break}P(r,n=y(e.c.b,n.b))}e.c!==n&&(f(K(n),n),f(e,n)),O(t),e=r.a,t=r}return e}function I(t,e,i,r,n,o){for(var s=!0;
1R(t,e,i.b),(i=i.c)!==r;);for(null===n&&(n=ct(e).a.b.c);(i=(r=ct(e)).a.b).a===n.a;)i.c!==n&&(f(K(i),i),f(K(n),i)),r.f=e.f-i.f,r.d=D(t,r.f),e.b=!0,!s&&B(t,e)&&(E(i,n),A(e),d(n)),s=!1,e=r,n=i;e.b=!0,o&&V(t,e)}function N(t,e,i,r,n){var o=[e.g[0],e.g[1],e.g[2]];e.d=null,e.d=t.o&&t.o(o,i,r,t.c)||null,null===e.d&&(n?t.n||(Z(t,100156),t.n=!0):e.d=i[0])}function F(t,e,i){var r=[null,null,null,null];r[0]=e.a.d,r[1]=i.a.d,N(t,e.a,r,[.5,.5,0,0],!1),f(e,i)}function U(t,e,i,r,n){var o=Math.abs(e.b-t.b)+Math.abs(e.a-t.a),s=Math.abs(i.b-t.b)+Math.abs(i.a-t.a),a=n+1;r[n]=.5*s/(o+s),r[a]=.5*o/(o+s),t.g[0]+=r[n]*e.g[0]+r[a]*i.g[0],t.g[1]+=r[n]*e.g[1]+r[a]*i.g[1],t.g[2]+=r[n]*e.g[2]+r[a]*i.g[2]}function B(t,e){var i=ct(e),r=e.a,s=i.a;if(o(r.a,s.a)){if(0<a(s.b.a,r.a,s.a))return!1;if(n(r.a,s.a)){if(r.a!==s.a){i=t.e;var h=r.a.h;if(0<=h){var l=(i=i.b).d,u=i.e,c=i.c,p=c[h];l[p]=l[i.a],(c[l[p]]=p)<=--i.a&&(p<=1?ht(i,p):o(u[l[p>>1]],u[l[p]])?ht(i,p):lt(i,p)),u[h]=null,c[h]=i.b,i.b=h}else for(i.c[-(h+1)]=null;0<i.a&&null===i.c[i.d[i.a-1]];)--i.a;F(t,K(s),r)}}else m(s.b),f(r,K(s)),e.b=i.b=!0}else{if(a(r.b.a,s.a,r.a)<0)return!1;pt(e).b=e.b=!0,m(r.b),f(K(s),r)}return!0}function G(t,e){var i=ct(e),r=e.a,p=i.a,d=r.a,y=p.a,g=r.b.a,v=p.b.a,_=new tt;if(a(g,t.a,d),a(v,t.a,y),d===y||Math.min(d.a,g.a)>Math.max(y.a,v.a))return!1;if(o(d,y)){if(0<a(v,d,y))return!1}else if(a(g,y,d)<0)return!1;var b,x,w=g,T=d,S=v,M=y;if(o(w,T)||(b=w,w=T,T=b),o(S,M)||(b=S,S=M,M=b),o(w,S)||(b=w,w=S,S=b,b=T,T=M,M=b),o(S,T)?o(T,M)?((b=s(w,S,T))+(x=s(S,T,M))<0&&(b=-b,x=-x),_.b=c(b,S.b,x,T.b)):((b=a(w,S,T))+(x=-a(w,M,T))<0&&(b=-b,x=-x),_.b=c(b,S.b,x,M.b)):_.b=(S.b+T.b)/2,h(w,T)||(b=w,w=T,T=b),h(S,M)||(b=S,S=M,M=b),h(w,S)||(b=w,w=S,S=b,b=T,T=M,M=b),h(S,T)?h(T,M)?((b=l(w,S,T))+(x=l(S,T,M))<0&&(b=-b,x=-x),_.a=c(b,S.a,x,T.a)):((b=u(w,S,T))+(x=-u(w,M,T))<0&&(b=-b,x=-x),_.a=c(b,S.a,x,M.a)):_.a=(S.a+T.a)/2,o(_,t.a)&&(_.b=t.a.b,_.a=t.a.a),o(w=o(d,y)?d:y,_)&&(_.b=w.b,_.a=w.a),n(_,d)||n(_,y))return B(t,e),!1;if(!n(g,t.a)&&0<=a(g,t.a,_)||!n(v,t.a)&&a(v,t.a,_)<=0){if(v===t.a)return m(r.b),f(p.b,r),r=ct(e=k(e)).a,L(t,ct(e),i),I(t,e,K(r),r,r,!0),!0;if(g!==t.a)return 0<=a(g,t.a,_)&&(pt(e).b=e.b=!0,m(r.b),r.a.b=t.a.b,r.a.a=t.a.a),a(v,t.a,_)<=0&&(e.b=i.b=!0,m(p.b),p.a.b=t.a.b,p.a.a=t.a.a),!1;for(m(p.b),f(r.e,K(p)),y=(d=i=e).a.b.a;(d=pt(d)).a.b.a===y;);return d=ct(e=d).a.b.c,i.a=K(p),I(t,e,(p=L(t,i,null)).c,r.b.c,d,!0),!0}return m(r.b),m(p.b),f(K(p),r),r.a.b=_.b,r.a.a=_.a,r.a.h=it(t.e,r.a),p=[0,0,0,0],_=[d.d,g.d,y.d,v.d],(r=r.a).g[0]=r.g[1]=r.g[2]=0,U(r,d,g,p,0),U(r,y,v,p,2),N(t,r,_,p,!0),pt(e).b=e.b=i.b=!0,!1}function V(t,e){for(var i=ct(e);;){for(;i.b;)i=ct(e=i);if(!(e.b||null!==(e=pt(i=e))&&e.b))break;e.b=!1;var r,n=e.a,s=i.a;if(r=n.b.a!==s.b.a)t:{var h=ct(r=e),l=r.a,u=h.a,c=void 0;if(o(l.b.a,u.b.a)){if(a(l.b.a,u.b.a,l.a)<0){r=!1;break t}pt(r).b=r.b=!0,c=m(l),f(u.b,c),c.d.c=r.d}else{if(0<a(u.b.a,l.b.a,u.a)){r=!1;break t}r.b=h.b=!0,c=m(u),f(l.e,u.b),c.b.d.c=r.d}r=!0}if(r&&(i.c?(A(i),d(s),s=(i=ct(e)).a):e.c&&(A(e),d(n),n=(e=pt(i)).a)),n.a!==s.a)if(n.b.a===s.b.a||e.c||i.c||n.b.a!==t.a&&s.b.a!==t.a)B(t,e);else if(G(t,e))break;n.a===s.a&&n.b.a===s.b.a&&(E(s,n),A(e),d(n),e=pt(i))}}function q(t,e){for(var i=(t.a=e).c;null===i.i;)if((i=i.c)===e.c){i=t;var r=e;(l=new ut).a=r.c.b;for(var s=(c=i.f).a;null!==(s=s.a).b&&!c.c(c.b,l,s.b););var h=ct(c=s.b),l=c.a;if(s=h.a,0===a(l.b.a,r,l.a))n((l=c.a).a,r)||n(l.b.a,r)||(m(l.b),c.c&&(d(l.c),c.c=!1),f(r.c,l),q(i,r));else{var u=o(s.b.a,l.b.a)?c:h;h=void 0,c.d||u.c?(h=u===c?y(r.c.b,l.e):y(s.b.c.b,r.c).b,u.c?P(u,h):((c=R(l=i,c,h)).f=pt(c).f+c.a.f,c.d=D(l,c.f)),q(i,r)):I(i,c,r.c,r.c,null,!0)}return}if(c=(l=ct(i=k(i.i))).a,(l=L(t,l,null)).c===c){l=(c=l).c,s=ct(i);var c,p=!1;(h=i.a).b.a!==(u=s.a).b.a&&G(t,i),n(h.a,t.a)&&(f(K(l),h),l=ct(i=k(i)).a,L(t,ct(i),s),p=!0),n(u.a,t.a)&&(f(c,K(u)),c=L(t,s,null),p=!0),p?I(t,i,c.c,l,l,!0):(r=o(u.a,h.a)?K(u):h,I(t,i,r=y(c.c.b,r),r.c,r.c,!1),r.b.i.c=!0,V(t,i))}else I(t,i,l.c,c,c,!0)}function z(t,e){var i=new ut,r=p(t.b);r.a.b=M,r.a.a=e,r.b.a.b=-M,r.b.a.a=e,t.a=r.b.a,i.a=r,i.f=0,i.d=!1,i.c=!1,i.h=!0,i.b=!1,r=H(r=t.f,r.a,i),i.e=r}function j(t){this.a=new X,this.b=t,this.c=C}
1function H(t,e,i){for(;null!==(e=e.c).b&&!t.c(t.b,e.b,i););return t=new X(i,e.a,e),e.a.c=t,e.a=t}function X(t,e,i){this.b=t||null,this.a=e||this,this.c=i||this}function W(){this.d=0,this.p=this.b=this.q=null,this.j=[0,0,0],this.s=100130,this.n=!1,this.o=this.a=this.e=this.f=null,this.m=!1,this.c=this.r=this.i=this.k=this.l=this.h=null}function Y(t,e){if(t.d!==e)for(;t.d!==e;)if(t.d<e)switch(t.d){case 0:Z(t,100151),t.u(null);break;case 1:Z(t,100152),t.t()}else switch(t.d){case 2:Z(t,100154),t.v();break;case 1:Z(t,100153),t.w()}}function Z(t,e){t.p&&t.p(e,t.c)}function Q(t,e){this.b=t||this,this.d=e||this,this.a=null,this.c=!1}function $(){(this.h=this).i=this.d=this.a=this.e=this.c=this.b=null,this.f=0}function K(t){return t.b.e}function J(){this.c=new tt,this.a=new Q,this.b=new $,this.d=new $,this.b.b=this.d,this.d.b=this.b}function tt(t,e){this.e=t||this,this.f=e||this,this.d=this.c=null,this.g=[0,0,0],this.h=this.a=this.b=0}function et(){this.c=[],this.d=null,this.a=0,this.e=!1,this.b=new nt}function it(t,e){if(t.e){var i,r=t.b,n=++r.a;return 2*n>r.f&&(r.f*=2,r.c=ot(r.c,r.f+1)),0===r.b?i=n:(i=r.b,r.b=r.c[r.b]),r.e[i]=e,r.c[i]=n,r.d[n]=i,r.h&&lt(r,n),i}return r=t.a++,t.c[r]=e,-(r+1)}function rt(t){if(0===t.a)return at(t.b);var e=t.c[t.d[t.a-1]];if(0!==t.b.a&&o(st(t.b),e))return at(t.b);for(;--t.a,0<t.a&&null===t.c[t.d[t.a-1]];);return e}function nt(){this.d=ot([0],33),this.e=[null,null],this.c=[0,0],this.a=0,this.f=32,this.b=0,this.h=!1,this.d[1]=1}function ot(t,e){for(var i=Array(e),r=0;r<t.length;r++)i[r]=t[r];for(;r<e;r++)i[r]=0;return i}function st(t){return t.e[t.d[1]]}function at(t){var e=t.d,i=t.e,r=t.c,n=e[1],o=i[n];return 0<t.a&&(e[1]=e[t.a],r[e[1]]=1,i[n]=null,r[n]=t.b,t.b=n,0<--t.a&&ht(t,1)),o}function ht(t,e){for(var i=t.d,r=t.e,n=t.c,s=e,a=i[s];;){var h=s<<1;h<t.a&&o(r[i[h+1]],r[i[h]])&&(h+=1);var l=i[h];if(h>t.a||o(r[a],r[l])){n[i[s]=a]=s;break}n[i[s]=l]=s,s=h}}function lt(t,e){for(var i=t.d,r=t.e,n=t.c,s=e,a=i[s];;){var h=s>>1,l=i[h];if(0===h||o(r[l],r[a])){n[i[s]=a]=s;break}n[i[s]=l]=s,s=h}}function ut(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function ct(t){return t.e.c.b}function pt(t){return t.e.a.b}(r=W.prototype).x=function(){Y(this,0)},r.B=function(t,e){switch(t){case 100142:return;case 100140:switch(e){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=e)}break;case 100141:return void(this.m=!!e);default:return void Z(this,100900)}Z(this,100901)},r.y=function(t){switch(t){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:Z(this,100900)}return!1},r.A=function(t,e,i){this.j[0]=t,this.j[1]=e,this.j[2]=i},r.z=function(t,e){var i=e||null;switch(t){case 100100:case 100106:this.h=i;break;case 100104:case 100110:this.l=i;break;case 100101:case 100107:this.k=i;break;case 100102:case 100108:this.i=i;break;case 100103:case 100109:this.p=i;break;case 100105:case 100111:this.o=i;break;case 100112:this.r=i;break;default:Z(this,100900)}},r.C=function(t,e){var i=!1,r=[0,0,0];Y(this,2);for(var n=0;n<3;++n){var o=t[n];o<-1e150&&(o=-1e150,i=!0),1e150<o&&(o=1e150,i=!0),r[n]=o}i&&Z(this,100155),null===(i=this.q)?f(i=p(this.b),i.b):(m(i),i=i.e),i.a.d=e,i.a.g[0]=r[0],i.a.g[1]=r[1],i.a.g[2]=r[2],i.f=1,i.b.f=-1,this.q=i},r.u=function(t){Y(this,0),this.d=1,this.b=new J,this.c=t},r.t=function(){Y(this,1),this.d=2,this.q=null},r.v=function(){Y(this,2),this.d=1},r.w=function(){Y(this,1),this.d=0;var t,e,i=!1,r=[c=this.j[0],s=this.j[1],l=this.j[2]];if(0===c&&0===s&&0===l){for(var s=[-2e150,-2e150,-2e150],h=[2e150,2e150,2e150],l=[],u=[],c=(i=this.b.c).e;c!==i;c=c.e)for(var p=0;p<3;++p){var f=c.g[p];f<h[p]&&(h[p]=f,u[p]=c),f>s[p]&&(s[p]=f,l[p]=c)}if(c=0,s[1]-h[1]>s[0]-h[0]&&(c=1),s[2]-h[2]>s[c]-h[c]&&(c=2),h[c]>=s[c])r[0]=0,r[1]=0,r[2]=1;else{for(s=0,h=u[c],u=[0,0,0],h=[h.g[0]-(l=l[c]).g[0],h.g[1]-l.g[1],h.g[2]-l.g[2]],p=[0,0,0],c=i.e;c!==i;c=c.e)p[0]=c.g[0]-l.g[0],p[1]=c.g[1]-l.g[1],p[2]=c.g[2]-l.g[2],u[0]=h[1]*p[2]-h[2]*p[1],u[1]=h[2]*p[0]-h[0]*p[2],u[2]=h[0]*p[1]-h[1]*p[0],s<(f=u[0]*u[0]+u[1]*u[1]+u[2]*u[2])&&(s=f,r[0]=u[0],r[1]=u[1],r[2]=u[2]);s<=0&&(r[0]=r[1]=r[2]=0,r[S(h)]=1)}i=!0}for(s=((u=S(r))+1)%3,l=(u+2)%3,u=0<r[u]?1:-1,r=(c=this.b.c).e;r!==c;r=r.e)r.b=r.g[s],r.a=u*r.g[l];
1if(i){for(r=0,c=(i=this.b.a).b;c!==i;c=c.b)if(!((s=c.a).f<=0))for(;r+=(s.a.b-s.b.a.b)*(s.a.a+s.b.a.a),(s=s.e)!==c.a;);if(r<0)for(i=(r=this.b.c).e;i!==r;i=i.e)i.a=-i.a}for(this.n=!1,c=(r=this.b.b).h;c!==r;c=i)i=c.h,s=c.e,n(c.a,c.b.a)&&c.e.e!==c&&(F(this,s,c),d(c),s=(c=s).e),s.e===c&&(s!==c&&(s!==i&&s!==i.b||(i=i.h),d(s)),c!==i&&c!==i.b||(i=i.h),d(c));for(this.e=r=new et,c=(i=this.b.c).e;c!==i;c=c.e)c.h=it(r,c);for(function(t){t.d=[];for(var e=0;e<t.a;e++)t.d[e]=e;var i;t.d.sort((i=t.c,function(t,e){return o(i[t],i[e])?1:-1})),t.e=!0,function(t){for(var e=t.a;1<=e;--e)ht(t,e);t.h=!0}(t.b)}(r),this.f=new j(this),z(this,-M),z(this,M);null!==(r=rt(this.e));){for(;;){t:if(c=this.e,0===c.a)i=st(c.b);else if(i=c.c[c.d[c.a-1]],0!==c.b.a&&(c=st(c.b),o(c,i))){i=c;break t}if(null===i||!n(i,r))break;i=rt(this.e),F(this,r.c,i.c)}q(this,r)}for(this.a=this.f.a.a.b.a.a,r=0;null!==(i=this.f.a.a.b);)i.h||++r,A(i);for(this.f=null,(r=this.e).b=null,r.d=null,this.e=r.c=null,c=(r=this.b).a.b;c!==r.a;c=i)i=c.b,(c=c.a).e.e===c&&(E(c.c,c),d(c));
1if(!this.n){if(r=this.b,this.m)for(c=r.b.h;c!==r.b;c=i)i=c.h,c.b.d.c!==c.d.c?c.f=c.d.c?1:-1:d(c);else for(c=r.a.b;c!==r.a;c=i)if(i=c.b,c.c){for(c=c.a;o(c.b.a,c.a);c=c.c.b);for(;o(c.a,c.b.a);c=c.e);for(s=c.c.b,l=void 0;c.e!==s;)if(o(c.b.a,s.a)){for(;s.e!==c&&(o((e=s.e).b.a,e.a)||a(s.a,s.b.a,s.e.b.a)<=0);)s=(l=y(s.e,s)).b;s=s.c.b}else{for(;s.e!==c&&(o((t=c.c.b).a,t.b.a)||0<=a(c.b.a,c.a,c.c.b.a));)c=(l=y(c,c.c.b)).b;c=c.e}for(;s.e.e!==c;)s=(l=y(s.e,s)).b}if(this.h||this.i||this.k||this.l)if(this.m){for(i=(r=this.b).a.b;i!==r.a;i=i.b)if(i.c){for(this.h&&this.h(2,this.c),c=i.a;this.k&&this.k(c.a.d,this.c),(c=c.e)!==i.a;);this.i&&this.i(this.c)}}else{for(i=!!this.l,c=!1,s=-1,l=(r=this.b).a.d;l!==r.a;l=l.d)if(l.c)for(c||(this.h&&this.h(4,this.c),c=!0),u=l.a;i&&s!==(h=u.b.d.c?0:1)&&(s=h,this.l&&this.l(!!s,this.c)),this.k&&this.k(u.a.d,this.c),(u=u.e)!==l.a;);c&&this.i&&this.i(this.c)}if(this.r){for(c=(r=this.b).a.b;c!==r.a;c=i)if(i=c.b,!c.c){for(l=(s=c.a).e,u=void 0;l=(u=l).e,(u.d=null)===u.b.d&&(u.c===u?w(u.a,null):(u.a.c=u.c,v(u,K(u))),(h=u.b).c===h?w(h.a,null):(h.a.c=h.c,v(h,K(h))),x(u)),u!==s;);s=c.d,((c=c.b).d=s).b=c}return this.r(this.b),void(this.c=this.b=null)}}this.b=this.c=null},this.libtess={GluTesselator:W,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}},W.prototype.gluDeleteTess=W.prototype.x,W.prototype.gluTessProperty=W.prototype.B,W.prototype.gluGetTessProperty=W.prototype.y,W.prototype.gluTessNormal=W.prototype.A,W.prototype.gluTessCallback=W.prototype.z,W.prototype.gluTessVertex=W.prototype.C,W.prototype.gluTessBeginPolygon=W.prototype.u,W.prototype.gluTessBeginContour=W.prototype.t,W.prototype.gluTessEndContour=W.prototype.v,W.prototype.gluTessEndPolygon=W.prototype.w,void 0!==e&&(e.exports=this.libtess)},{}],9:[function(t,e,i){(function(r){!function(e){"use strict";var i,n;String.prototype.codePointAt||(i=function(){try{var t={},e=Object.defineProperty,i=e(t,t,t)&&e}catch(t){}return i}(),n=function(t){if(null==this)throw TypeError();var e=String(this),i=e.length,r=t?Number(t):0;if(r!=r&&(r=0),!(r<0||i<=r)){var n,o=e.charCodeAt(r);return 55296<=o&&o<=56319&&r+1<i&&56320<=(n=e.charCodeAt(r+1))&&n<=57343?1024*(o-55296)+n-56320+65536:o}},i?i(String.prototype,"codePointAt",{value:n,configurable:!0,writable:!0}):String.prototype.codePointAt=n);var o=0,s=-3;function a(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function h(t,e){this.source=t,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new a,this.dtree=new a}var l=new a,u=new a,c=new Uint8Array(30),p=new Uint16Array(30),f=new Uint8Array(30),d=new Uint16Array(30),m=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),y=new a,g=new Uint8Array(320);function v(t,e,i,r){var n,o;for(n=0;n<i;++n)t[n]=0;for(n=0;n<30-i;++n)t[n+i]=n/i|0;for(o=r,n=0;n<30;++n)e[n]=o,o+=1<<t[n]}var _=new Uint16Array(16);function b(t,e,i,r){var n,o;for(n=0;n<16;++n)t.table[n]=0;for(n=0;n<r;++n)t.table[e[i+n]]++;for(n=o=t.table[0]=0;n<16;++n)_[n]=o,o+=t.table[n];for(n=0;n<r;++n)e[i+n]&&(t.trans[_[e[i+n]]++]=n)}function x(t){t.bitcount--||(t.tag=t.source[t.sourceIndex++],t.bitcount=7);var e=1&t.tag;return t.tag>>>=1,e}function w(t,e,i){if(!e)return i;for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var r=t.tag&65535>>>16-e;return t.tag>>>=e,t.bitcount-=e,r+i}function T(t,e){for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;for(var i=0,r=0,n=0,o=t.tag;r=2*r+(1&o),o>>>=1,i+=e.table[++n],0<=(r-=e.table[n]););return t.tag=o,t.bitcount-=n,e.trans[i+r]}function S(t,e,i){var r,n,o,s,a,h;for(r=w(t,5,257),n=w(t,5,1),o=w(t,4,4),s=0;s<19;++s)g[s]=0;for(s=0;s<o;++s){var l=w(t,3,0);g[m[s]]=l}for(b(y,g,0,19),a=0;a<r+n;){var u=T(t,y);switch(u){case 16:var c=g[a-1];for(h=w(t,2,3);h;--h)g[a++]=c;break;case 17:for(h=w(t,3,3);h;--h)g[a++]=0;break;case 18:for(h=w(t,7,11);h;--h)g[a++]=0;break;default:g[a++]=u}}b(e,g,0,r),b(i,g,r,n)}function M(t,e,i){for(;;){var r,n,s,a,h=T(t,e);if(256===h)return o;if(h<256)t.dest[t.destLen++]=h;else for(r=w(t,c[h-=257],p[h]),n=T(t,i),a=s=t.destLen-w(t,f[n],d[n]);a<s+r;
1++a)t.dest[t.destLen++]=t.dest[a]}}function E(t){for(var e,i;8<t.bitcount;)t.sourceIndex--,t.bitcount-=8;if((e=256*(e=t.source[t.sourceIndex+1])+t.source[t.sourceIndex])!==(65535&~(256*t.source[t.sourceIndex+3]+t.source[t.sourceIndex+2])))return s;for(t.sourceIndex+=4,i=e;i;--i)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,o}!function(t,e){var i;for(i=0;i<7;++i)t.table[i]=0;for(t.table[7]=24,t.table[8]=152,t.table[9]=112,i=0;i<24;++i)t.trans[i]=256+i;for(i=0;i<144;++i)t.trans[24+i]=i;for(i=0;i<8;++i)t.trans[168+i]=280+i;for(i=0;i<112;++i)t.trans[176+i]=144+i;for(i=0;i<5;++i)e.table[i]=0;for(e.table[5]=32,i=0;i<32;++i)e.trans[i]=i}(l,u),v(c,p,4,3),v(f,d,2,1),c[28]=0,p[28]=258;var C=function(t,e){var i,r,n=new h(t,e);do{switch(i=x(n),w(n,2,0)){case 0:r=E(n);break;case 1:r=M(n,l,u);break;case 2:S(n,n.ltree,n.dtree),r=M(n,n.ltree,n.dtree);break;default:r=s}if(r!==o)throw new Error("Data error")}while(!i);return n.destLen<n.dest.length?"function"==typeof n.dest.slice?n.dest.slice(0,n.destLen):n.dest.subarray(0,n.destLen):n.dest};function A(t,e,i,r,n){return Math.pow(1-n,3)*t+3*Math.pow(1-n,2)*n*e+3*(1-n)*Math.pow(n,2)*i+Math.pow(n,3)*r}function P(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function k(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function R(t){throw new Error(t)}function D(t,e){t||R(e)}P.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},P.prototype.addPoint=function(t,e){"number"==typeof t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),"number"==typeof e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))},P.prototype.addX=function(t){this.addPoint(t,null)},P.prototype.addY=function(t){this.addPoint(null,t)},P.prototype.addBezier=function(t,e,i,r,n,o,s,a){var h=this,l=[t,e],u=[i,r],c=[n,o],p=[s,a];this.addPoint(t,e),this.addPoint(s,a);for(var f=0;f<=1;f++){var d=6*l[f]-12*u[f]+6*c[f],m=-3*l[f]+9*u[f]-9*c[f]+3*p[f],y=3*u[f]-3*l[f];if(0!==m){var g=Math.pow(d,2)-4*y*m;if(!(g<0)){var v=(-d+Math.sqrt(g))/(2*m);0<v&&v<1&&(0===f&&h.addX(A(l[f],u[f],c[f],p[f],v)),1===f&&h.addY(A(l[f],u[f],c[f],p[f],v)));var _=(-d-Math.sqrt(g))/(2*m);0<_&&_<1&&(0===f&&h.addX(A(l[f],u[f],c[f],p[f],_)),1===f&&h.addY(A(l[f],u[f],c[f],p[f],_)))}}else{if(0===d)continue;var b=-y/d;0<b&&b<1&&(0===f&&h.addX(A(l[f],u[f],c[f],p[f],b)),1===f&&h.addY(A(l[f],u[f],c[f],p[f],b)))}}},P.prototype.addQuad=function(t,e,i,r,n,o){var s=t+2/3*(i-t),a=e+2/3*(r-e);this.addBezier(t,e,s,a,s+1/3*(n-t),a+1/3*(o-e),n,o)},k.prototype.moveTo=function(t,e){this.commands.push({type:"M",x:t,y:e})},k.prototype.lineTo=function(t,e){this.commands.push({type:"L",x:t,y:e})},k.prototype.curveTo=k.prototype.bezierCurveTo=function(t,e,i,r,n,o){this.commands.push({type:"C",x1:t,y1:e,x2:i,y2:r,x:n,y:o})},k.prototype.quadTo=k.prototype.quadraticCurveTo=function(t,e,i,r){this.commands.push({type:"Q",x1:t,y1:e,x:i,y:r})},k.prototype.close=k.prototype.closePath=function(){this.commands.push({type:"Z"})},k.prototype.extend=function(t){if(t.commands)t=t.commands;else if(t instanceof P){var e=t;return this.moveTo(e.x1,e.y1),this.lineTo(e.x2,e.y1),this.lineTo(e.x2,e.y2),this.lineTo(e.x1,e.y2),void this.close()}Array.prototype.push.apply(this.commands,t)},k.prototype.getBoundingBox=function(){for(var t=new P,e=0,i=0,r=0,n=0,o=0;o<this.commands.length;o++){var s=this.commands[o];switch(s.type){case"M":t.addPoint(s.x,s.y),e=r=s.x,i=n=s.y;break;case"L":t.addPoint(s.x,s.y),r=s.x,n=s.y;break;case"Q":t.addQuad(r,n,s.x1,s.y1,s.x,s.y),r=s.x,n=s.y;break;case"C":t.addBezier(r,n,s.x1,s.y1,s.x2,s.y2,s.x,s.y),r=s.x,n=s.y;break;case"Z":r=e,n=i;break;default:throw new Error("Unexpected path command "+s.type)}}return t.isEmpty()&&t.addPoint(0,0),t},k.prototype.draw=function(t){t.beginPath();for(var e=0;e<this.commands.length;e+=1){var i=this.commands[e];"M"===i.type?t.moveTo(i.x,i.y):"L"===i.type?t.lineTo(i.x,i.y):"C"===i.type?t.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y):"Q"===i.t
1ype?t.quadraticCurveTo(i.x1,i.y1,i.x,i.y):"Z"===i.type&&t.closePath()}this.fill&&(t.fillStyle=this.fill,t.fill()),this.stroke&&(t.strokeStyle=this.stroke,t.lineWidth=this.strokeWidth,t.stroke())},k.prototype.toPathData=function(t){function e(){for(var e,i=arguments,r="",n=0;n<arguments.length;n+=1){var o=i[n];0<=o&&0<n&&(r+=" "),r+=(e=o,Math.round(e)===e?""+Math.round(e):e.toFixed(t))}return r}t=void 0!==t?t:2;for(var i="",r=0;r<this.commands.length;r+=1){var n=this.commands[r];"M"===n.type?i+="M"+e(n.x,n.y):"L"===n.type?i+="L"+e(n.x,n.y):"C"===n.type?i+="C"+e(n.x1,n.y1,n.x2,n.y2,n.x,n.y):"Q"===n.type?i+="Q"+e(n.x1,n.y1,n.x,n.y):"Z"===n.type&&(i+="Z")}return i},k.prototype.toSVG=function(t){var e='<path d="';return e+=this.toPathData(t),e+='"',this.fill&&"black"!==this.fill&&(e+=null===this.fill?' fill="none"':' fill="'+this.fill+'"'),this.stroke&&(e+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),e+"/>"},k.prototype.toDOMElement=function(t){var e=this.toPathData(t),i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",e),i};var O={fail:R,argument:D,assert:D},L=2147483648,I={},N={},F={};function U(t){return function(){return t}}N.BYTE=function(t){return O.argument(0<=t&&t<=255,"Byte value should be between 0 and 255."),[t]},F.BYTE=U(1),N.CHAR=function(t){return[t.charCodeAt(0)]},F.CHAR=U(1),N.CHARARRAY=function(t){for(var e=[],i=0;i<t.length;i+=1)e[i]=t.charCodeAt(i);return e},F.CHARARRAY=function(t){return t.length},N.USHORT=function(t){return[t>>8&255,255&t]},F.USHORT=U(2),N.SHORT=function(t){return 32768<=t&&(t=-(65536-t)),[t>>8&255,255&t]},F.SHORT=U(2),N.UINT24=function(t){return[t>>16&255,t>>8&255,255&t]},F.UINT24=U(3),N.ULONG=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},F.ULONG=U(4),N.LONG=function(t){return L<=t&&(t=-(2*L-t)),[t>>24&255,t>>16&255,t>>8&255,255&t]},F.LONG=U(4),N.FIXED=N.ULONG,F.FIXED=F.ULONG,N.FWORD=N.SHORT,F.FWORD=F.SHORT,N.UFWORD=N.USHORT,F.UFWORD=F.USHORT,N.LONGDATETIME=function(t){return[0,0,0,0,t>>24&255,t>>16&255,t>>8&255,255&t]},F.LONGDATETIME=U(8),N.TAG=function(t){return O.argument(4===t.length,"Tag should be exactly 4 ASCII characters."),[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]},F.TAG=U(4),N.Card8=N.BYTE,F.Card8=F.BYTE,N.Card16=N.USHORT,F.Card16=F.USHORT,N.OffSize=N.BYTE,F.OffSize=F.BYTE,N.SID=N.USHORT,F.SID=F.USHORT,N.NUMBER=function(t){return-107<=t&&t<=107?[t+139]:108<=t&&t<=1131?[247+((t-=108)>>8),255&t]:-1131<=t&&t<=-108?[251+((t=-t-108)>>8),255&t]:-32768<=t&&t<=32767?N.NUMBER16(t):N.NUMBER32(t)},F.NUMBER=function(t){return N.NUMBER(t).length}
vendor: 7,813 bytes, line 1
1,N.NUMBER16=function(t){return[28,t>>8&255,255&t]},F.NUMBER16=U(3),N.NUMBER32=function(t){return[29,t>>24&255,t>>16&255,t>>8&255,255&t]},F.NUMBER32=U(5),N.REAL=function(t){var e=t.toString(),i=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(e);if(i){var r=parseFloat("1e"+((i[2]?+i[2]:0)+i[1].length));e=(Math.round(t*r)/r).toString()}for(var n="",o=0,s=e.length;o<s;o+=1){var a=e[o];n+="e"===a?"-"===e[++o]?"c":"b":"."===a?"a":"-"===a?"e":a}for(var h=[30],l=0,u=(n+=1&n.length?"f":"ff").length;l<u;l+=2)h.push(parseInt(n.substr(l,2),16));return h},F.REAL=function(t){return N.REAL(t).length},N.NAME=N.CHARARRAY,F.NAME=F.CHARARRAY,N.STRING=N.CHARARRAY,F.STRING=F.CHARARRAY,I.UTF8=function(t,e,i){for(var r=[],n=i,o=0;o<n;o++,e+=1)r[o]=t.getUint8(e);return String.fromCharCode.apply(null,r)},I.UTF16=function(t,e,i){for(var r=[],n=i/2,o=0;o<n;o++,e+=2)r[o]=t.getUint16(e);return String.fromCharCode.apply(null,r)},N.UTF16=function(t){for(var e=[],i=0;i<t.length;i+=1){var r=t.charCodeAt(i);e[e.length]=r>>8&255,e[e.length]=255&r}return e},F.UTF16=function(t){return 2*t.length};var B={"x-mac-croatian":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u03a9\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\uf8ff\xa9\u2044\u20ac\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e","x-mac-gaelic":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1e02\xb1\u2264\u2265\u1e03\u010a\u010b\u1e0a\u1e0b\u1e1e\u1e1f\u0120\u0121\u1e40\xe6\xf8\u1e41\u1e56\u1e57\u027c\u0192\u017f\u1e60\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u1e61\u1e9b\xff\u0178\u1e6a\u20ac\u2039\u203a\u0176\u0177\u1e6b\xb7\u1ef2\u1ef3\u204a\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1e84\u1e85\u1e80\u1e81\u1e82\u1e83","x-mac-greek":"\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20ac\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026\xa0\u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\xad","x-mac-icelandic":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140a\u140b\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144e\u144f\u1450\u1451\u1455\u1456\u1466\u146d\u146e\u146f\u1470\u1472\u1473\u1483\u148b\u148c\u148d\u148e\u1490\u1491\xb0\u14a1\u14a5\u14a6\u2022\xb6\u14a7\xae\xa9\u2122\u14a8\u14aa\u14ab\u14bb\u14c2\u14c3\u14c4\u14c5\u14c7\u14c8\u14d0\u14ef\u14f0\u14f1\u14f2\u14f4\u14f5\u1505\u14d5\u14d6\u14d7\u14d8\u14da\u14db\u14ea\u1528\u1529\u152a\u152b\u152d\u2026\xa0\u152e\u153e\u1555\u1556\u1557\u2013\u2014\u201c\u201d\u2018\u2019\u1558\u1559\u155a\u155d\u1546\u1547\u1548\u1549\u154b\u154c\u1550\u157f\u1580\u1581\u1582\u1583\u1584\u1585\u158f\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15a0\u15a1\u15a2\u15a3\u15a4\u15a5\u15a6\u157c\u0141\u0142","x-mac-ce":"\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026\xa0\u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7",macintosh:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","x-mac-romanian":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\u0103\u0219\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\u021a\u021b\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","x-mac-turkish":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\uf8a0\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"};
1I.MACSTRING=function(t,e,i,r){var n=B[r];if(void 0!==n){for(var o="",s=0;s<i;s++){var a=t.getUint8(e+s);o+=a<=127?String.fromCharCode(a):n[127&a]}return o}};var G,V="function"==typeof WeakMap&&new WeakMap;function q(t){return-128<=t&&t<=127}function z(t,e,i){for(var r=0,n=t.length;e<n&&r<64&&0===t[e];)++e,++r;return i.push(128|r-1),e}function j(t,e,i){for(var r=0,n=t.length,o=e;o<n&&r<64;){var s=t[o];if(!q(s))break;if(0===s&&o+1<n&&0===t[o+1])break;++o,++r}i.push(r-1);for(var a=e;a<o;++a)i.push(t[a]+256&255);return o}function H(t,e,i){for(var r=0,n=t.length,o=e;o<n&&r<64;){var s=t[o];if(0===s)break;if(q(s)&&o+1<n&&q(t[o+1]))break;++o,++r}i.push(64|r-1);for(var a=e;a<o;++a){var h=t[a];i.push(h+65536>>8&255,h+256&255)}return o}N.MACSTRING=function(t,e){var i=function(t){if(!G)for(var e in G={},B)G[e]=new String(e);var i=G[t];if(void 0!==i){if(V){var r=V.get(i);if(void 0!==r)return r}var n=B[t];if(void 0!==n){for(var o={},s=0;s<n.length;s++)o[n.charCodeAt(s)]=s+128;return V&&V.set(i,o),o}}}(e);if(void 0!==i){for(var r=[],n=0;n<t.length;n++){var o=t.charCodeAt(n);if(128<=o&&void 0===(o=i[o]))return;r[n]=o}return r}},F.MACSTRING=function(t,e){var i=N.MACSTRING(t,e);return void 0!==i?i.length:0},N.VARDELTAS=function(t){for(var e=0,i=[];e<t.length;){var r=t[e];e=0===r?z(t,e,i):-128<=r&&r<=127?j(t,e,i):H(t,e,i)}return i},N.INDEX=function(t){for(var e=1,i=[e],r=[],n=0;n<t.length;n+=1){var o=N.OBJECT(t[n]);Array.prototype.push.apply(r,o),i.push(e+=o.length)}if(0===r.length)return[0,0];for(var s=[],a=1+Math.floor(Math.log(e)/Math.log(2))/8|0,h=[void 0,N.BYTE,N.USHORT,N.UINT24,N.ULONG][a],l=0;l<i.length;l+=1){var u=h(i[l]);Array.prototype.push.apply(s,u)}return Array.prototype.concat(N.Card16(t.length),N.OffSize(a),s,r)},F.INDEX=function(t){return N.INDEX(t).length},N.DICT=function(t){for(var e=[],i=Object.keys(t),r=i.length,n=0;n<r;n+=1){var o=parseInt(i[n],0),s=t[o];e=(e=e.concat(N.OPERAND(s.value,s.type))).concat(N.OPERATOR(o))}return e},F.DICT=function(t){return N.DICT(t).length},N.OPERATOR=function(t){return t<1200?[t]:[12,t-1200]},N.OPERAND=function(t,e){var i=[];if(Array.isArray(e))for(var r=0;r<e.length;r+=1)O.argument(t.length===e.length,"Not enough arguments given for type"+e),i=i.concat(N.OPERAND(t[r],e[r]));else if("SID"===e)i=i.concat(N.NUMBER(t));else if("offset"===e)i=i.concat(N.NUMBER32(t));else if("number"===e)i=i.concat(N.NUMBER(t));else{if("real"!==e)throw new Error("Unknown operand type "+e);i=i.concat(N.REAL(t))}return i},N.OP=N.BYTE,F.OP=F.BYTE;var X="function"==typeof WeakMap&&new WeakMap;function W(t,e,i){for(var r=0;r<e.length;r+=1){var n=e[r];this[n.name]=n.value}if(this.tableName=t,this.fields=e,i)for(var o=Object.keys(i),s=0;s<o.length;s+=1){var a=o[s];void 0!==this[a]&&(this[a]=i[a])}}function Y(t,e,i){void 0===i&&(i=e.length);var r=new Array(e.length+1);r[0]={name:t+"Count",type:"USHORT",value:i};for(var n=0;n<e.length;n++)r[n+1]={name:t+n,type:"USHORT",value:e[n]};return r}function Z(t,e,i){var r=e.length,n=new Array(r+1);n[0]={name:t+"Count",type:"USHORT",value:r};for(var o=0;o<r;o++)n[o+1]={name:t+o,type:"TABLE",value:i(e[o],o)};return n}function Q(t,e,i){var r=e.length,n=[];n[0]={name:t+"Count",type:"USHORT",value:r};for(var o=0;o<r;o++)n=n.concat(i(e[o],o));return n}function $(t){1===t.format?W.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(Y("glyph",t.glyphs))):O.assert(!1,"Can't create coverage table format 2 yet.")}function K(t){W.call(this,"scriptListTable",Q("scriptRecord",t,function(t,e){var i=t.script,r=i.defaultLangSys;return O.assert(!!r,"Unable to write GSUB: script "+t.tag+" has no default language system."),[{name:"scriptTag"+e,type:"TAG",value:t.tag},{name:"script"+e,type:"TABLE",value:new W("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new W("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(Y("featureIndex",r.featureIndexes)))}].concat(Q("langSys",i.langSysRecords,function(t,e){var i=t.langSys;return[{name:"langSysTag"+e,type:"TAG",value:t.tag},{name:"langSys"+e,type:"TABLE",value:new W("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(Y("featureIndex",i.featureIndexes)))}]})))}]}))}function J(t){W.call(this,"featureListTable",Q("featureRecord",t,function(t,e){var i=t.feature;return[{name:"featureTag"+e,type:"TAG",value:t.tag},{name:"feature"+e,type:"TABLE",value:new W("featureTable",[{name:"featureParam
1s",type:"USHORT",value:i.featureParams}].concat(Y("lookupListIndex",i.lookupListIndexes)))}]}))}function tt(t,e){W.call(this,"lookupListTable",Z("lookup",t,function(t){var i=e[t.lookupType];return O.assert(!!i,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new W("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(Z("subtable",t.subtables,i)))}))}N.CHARSTRING=function(t){if(X){var e=X.get(t);if(void 0!==e)return e}for(var i=[],r=t.length,n=0;n<r;n+=1){var o=t[n];i=i.concat(N[o.type](o.value))}return X&&X.set(t,i),i},F.CHARSTRING=function(t){return N.CHARSTRING(t).length},N.OBJECT=function(t){var e=N[t.type];return O.argument(void 0!==e,"No encoding function for type "+t.type),e(t.value)},F.OBJECT=function(t){var e=F[t.type];return O.argument(void 0!==e,"No sizeOf function for type "+t.type),e(t.value)},N.TABLE=function(t){for(var e=[],i=t.fields.length,r=[],n=[],o=0;o<i;o+=1){var s=t.fields[o],a=N[s.type];O.argument(void 0!==a,"No encoding function for field type "+s.type+" ("+s.name+")");var h=t[s.name];void 0===h&&(h=s.value);var l=a(h);"TABLE"===s.type?(n.push(e.length),e=e.concat([0,0]),r.push(l)):e=e.concat(l)}for(var u=0;u<r.length;u+=1){var c=n[u],p=e.length;O.argument(p<65536,"Table "+t.tableName+" too big."),e[c]=p>>8,e[c+1]=255&p,e=e.concat(r[u])}return e},F.TABLE=function(t){for(var e=0,i=t.fields.length,r=0;r<i;r+=1){var n=t.fields[r],o=F[n.type];O.argument(void 0!==o,"No sizeOf function for field type "+n.type+" ("+n.name+")");var s=t[n.name];void 0===s&&(s=n.value),e+=o(s),"TABLE"===n.type&&(e+=2)}return e},N.RECORD=N.TABLE,F.RECORD=F.TABLE,N.LITERAL=function(t){return t},F.LITERAL=function(t){return t.length},W.prototype.encode=function(){return N.TABLE(this)},W.prototype.sizeOf=function(){return F.TABLE(this)};var et={Table:W,Record:W,Coverage:($.prototype=Object.create(W.prototype)).constructor=$,ScriptList:(K.prototype=Object.create(W.prototype)).constructor=K,FeatureList:(J.prototype=Object.create(W.prototype)).constructor=J,LookupList:(tt.prototype=Object.create(W.prototype)).constructor=tt,ushortList:Y,tableList:Z,recordList:Q};function it(t,e){return t.getUint8(e)}function rt(t,e){return t.getUint16(e,!1)}function nt(t,e){return t.getUint32(e,!1)}function ot(t,e){return t.getInt16(e,!1)+t.getUint16(e+2,!1)/65535}var st={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function at(t,e){this.data=t,this.offset=e,this.relativeOffset=0}at.prototype.parseByte=function(){var t=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,t},at.prototype.parseChar=function(){var t=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,t},at.prototype.parseCard8=at.prototype.parseByte,at.prototype.parseCard16=at.prototype.parseUShort=function(){var t=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,t},at.prototype.parseSID=at.prototype.parseUShort,at.prototype.parseOffset16=at.prototype.parseUShort,at.prototype.parseShort=function(){var t=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,t},at.prototype.parseF2Dot14=function(){var t=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,t},at.prototype.parseOffset32=at.prototype.parseULong=function(){var t=nt(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,t},at.prototype.parseFixed=function(){var t=ot(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,t},at.prototype.parseString=function(t){var e=this.data,i=this.offset+this.relativeOffset,r="";this.relativeOffset+=t;for(var n=0;n<t;n++)r+=String.fromCharCode(e.getUint8(i+n));return r},at.prototype.parseTag=function(){return this.parseString(4)},at.prototype.parseLongDateTime=function(){var t=nt(this.data,this.offset+this.relativeOffset+4);return t-=2082844800,this.relativeOffset+=8,t},at.prototype.parseVersion=function(t){var e=rt(this.data,this.offset+this.relativeOffset),i=rt(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===t&&(t=4096),e+i/t/10},at.prototype.skip=function(t,e){void 0===e&&(e=1),this.relativeOffset+=st[t]*e},at.prototype.parseULongList=function(t){void 0===t&&(t=this.parseULong());for(var e=new Array(t),i=this.data,r=this.offset+this.relativeOffset,n=0;n<t;n++)e[n]=i.getUint32(r),r+=4;return this.relativeOffset+=4*t,e},at.prototype.parseOffset16List=at.prototype.parseUShortList=function(t){void 0===t&&(t=this.parseUShort());for(var e=new Array(t),i=this.data,r=this.offset+this.relativeOffset,n=0;n<t;n++)e[n]=i.getUint16(r),r+=2;return this.relativeOffset+=2*t,e},at.prototype.parseShortList=function(t){for(var e=new Array(t),i=this.data,r=this.offset+this.relativeOffset,n=0;n<t;n++)e[n]=i.getInt16(r),r+=2;return this.relativeOffset+=2*t,e},at.prototype.parseByteList=function(t){for(var e=new Array(t),i=this.data,r=this.offset+this.relativeOffset,n=0;n<t;n++)e[n]=i.getUint8(r++);return this.relativeOffset+=t,e},at.prototype.parseList=function(t,e){e||(e=t,t=this.parseUShort());for(var i=new Array(t),r=0;r<t;r++)i[r]=e.call(this);return i},at.prototype.parseList32=function(t,e){e||(e=t,t=this.parseULong());for(var i=new Array(t),r=0;r<t;r++)i[r]=e.call(this);return i},at.prototype.parseRecordList=function(t,e){e||(e=t,t=this.parseUShort());for(var i=new Array(t),r=Object.keys(e),n=0;n<t;n++){for(var o={},s=0;s<r.length;s++){var a=r[s];
1o[a]=e[a].call(this)}i[n]=o}return i},at.prototype.parseRecordList32=function(t,e){e||(e=t,t=this.parseULong());for(var i=new Array(t),r=Object.keys(e),n=0;n<t;n++){for(var o={},s=0;s<r.length;s++){var a=r[s];o[a]=e[a].call(this)}i[n]=o}return i},at.prototype.parseStruct=function(t){if("function"==typeof t)return t.call(this);for(var e=Object.keys(t),i={},r=0;r<e.length;r++){var n=e[r];i[n]=t[n].call(this)}return i},at.prototype.parseValueRecord=function(t){if(void 0===t&&(t=this.parseUShort()),0!==t){var e={};return 1&t&&(e.xPlacement=this.parseShort()),2&t&&(e.yPlacement=this.parseShort()),4&t&&(e.xAdvance=this.parseShort()),8&t&&(e.yAdvance=this.parseShort()),16&t&&(e.xPlaDevice=void 0,this.parseShort()),32&t&&(e.yPlaDevice=void 0,this.parseShort()),64&t&&(e.xAdvDevice=void 0,this.parseShort()),128&t&&(e.yAdvDevice=void 0,this.parseShort()),e}},at.prototype.parseValueRecordList=function(){for(var t=this.parseUShort(),e=this.parseUShort(),i=new Array(e),r=0;r<e;r++)i[r]=this.parseValueRecord(t);return i},at.prototype.parsePointer=function(t){var e=this.parseOffset16();if(0<e)return new at(this.data,this.offset+e).parseStruct(t)},at.prototype.parsePointer32=function(t){var e=this.parseOffset32();if(0<e)return new at(this.data,this.offset+e).parseStruct(t)},at.prototype.parseListOfLists=function(t){for(var e=this,i=this.parseOffset16List(),r=i.length,n=this.relativeOffset,o=new Array(r),s=0;s<r;s++){var a=i[s];if(0!==a)if(e.relativeOffset=a,t){for(var h=e.parseOffset16List(),l=new Array(h.length),u=0;u<h.length;u++)e.relativeOffset=a+h[u],l[u]=t.call(e);o[s]=l}else o[s]=e.parseUShortList();else o[s]=void 0}return this.relativeOffset=n,o},at.prototype.parseCoverage=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort(),i=this.parseUShort();if(1===e)return{format:1,glyphs:this.parseUShortList(i)};if(2!==e)throw new Error("0x"+t.toString(16)+": Coverage format must be 1 or 2.");for(var r=new Array(i),n=0;n<i;n++)r[n]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:r}},at.prototype.parseClassDef=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();if(1===e)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===e)return{format:2,ranges:this.parseRecordList({start:at.uShort,end:at.uShort,classId:at.uShort})};throw new Error("0x"+t.toString(16)+": ClassDef format must be 1 or 2.")},at.list=function(t,e){return function(){return this.parseList(t,e)}},at.list32=function(t,e){return function(){return this.parseList32(t,e)}},at.recordList=function(t,e){return function(){return this.parseRecordList(t,e)}},at.recordList32=function(t,e){return function(){return this.parseRecordList32(t,e)}},at.pointer=function(t){return function(){return this.parsePointer(t)}},at.pointer32=function(t){return function(){return this.parsePointer32(t)}},at.tag=at.prototype.parseTag,at.byte=at.prototype.parseByte,at.uShort=at.offset16=at.prototype.parseUShort,at.uShortList=at.prototype.parseUShortList,at.uLong=at.offset32=at.prototype.parseULong,at.uLongList=at.prototype.parseULongList,at.struct=at.prototype.parseStruct,at.coverage=at.prototype.parseCoverage,at.classDef=at.prototype.parseClassDef;var ht={reserved:at.uShort,reqFeatureIndex:at.uShort,featureIndexes:at.uShortList};at.prototype.parseScriptList=function(){return this.parsePointer(at.recordList({tag:at.tag,script:at.pointer({defaultLangSys:at.pointer(ht),langSysRecords:at.recordList({tag:at.tag,langSys:at.pointer(ht)})})}))||[]},at.prototype.parseFeatureList=function(){return this.parsePointer(at.recordList({tag:at.tag,feature:at.pointer({featureParams:at.offset16,lookupListIndexes:at.uShortList})}))||[]},at.prototype.parseLookupList=function(t){return this.parsePointer(at.list(at.pointer(function(){var e=this.parseUShort();O.argument(1<=e&&e<=9,"GPOS/GSUB lookup type "+e+" unknown.");var i=this.parseUShort(),r=16&i;return{lookupType:e,lookupFlag:i,subtables:this.parseList(at.pointer(t[e])),markFilteringSet:r?this.parseUShort():void 0}})))||[]},at.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var t=this.parseUShort(),e=this.parseUShort();return O.argument(1===t&&e<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:at.offset32,featureTableSubstitutionOffset:at.offset32})})||[]};var lt={getByte:it,getCard8:it,getUShort:rt,getCard16:rt,getShort:function(t,e){return t.getInt16(e,!1)},getULong:nt,getFixed:ot,getTag:function(t,e){for(var i="",r=e;r<e+4;r+=1)i+=String.fromCharCode(t.getInt8(r));return i}
1,getOffset:function(t,e,i){for(var r=0,n=0;n<i;n+=1)r<<=8,r+=t.getUint8(e+n);return r},getBytes:function(t,e,i){for(var r=[],n=e;n<i;n+=1)r.push(t.getUint8(n));return r},bytesToString:function(t){for(var e="",i=0;i<t.length;i+=1)e+=String.fromCharCode(t[i]);return e},Parser:at},ut={parse:function(t,e){var i={};i.version=lt.getUShort(t,e),O.argument(0===i.version,"cmap table version should be 0."),i.numTables=lt.getUShort(t,e+2);for(var r=-1,n=i.numTables-1;0<=n;n-=1){var o=lt.getUShort(t,e+4+8*n),s=lt.getUShort(t,e+4+8*n+2);if(3===o&&(0===s||1===s||10===s)||0===o&&(0===s||1===s||2===s||3===s||4===s)){r=lt.getULong(t,e+4+8*n+4);break}}if(-1===r)throw new Error("No valid cmap sub-tables found.");var a=new lt.Parser(t,e+r);if(i.format=a.parseUShort(),12===i.format)!function(t,e){var i;e.parseUShort(),t.length=e.parseULong(),t.language=e.parseULong(),t.groupCount=i=e.parseULong(),t.glyphIndexMap={};for(var r=0;r<i;r+=1)for(var n=e.parseULong(),o=e.parseULong(),s=e.parseULong(),a=n;a<=o;a+=1)t.glyphIndexMap[a]=s,s++}(i,a);else{if(4!==i.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+i.format+").");!function(t,e,i,r,n){var o;t.length=e.parseUShort(),t.language=e.parseUShort(),t.segCount=o=e.parseUShort()>>1,e.skip("uShort",3),t.glyphIndexMap={};for(var s=new lt.Parser(i,r+n+14),a=new lt.Parser(i,r+n+16+2*o),h=new lt.Parser(i,r+n+16+4*o),l=new lt.Parser(i,r+n+16+6*o),u=r+n+16+8*o,c=0;c<o-1;c+=1)for(var p=void 0,f=s.parseUShort(),d=a.parseUShort(),m=h.parseShort(),y=l.parseUShort(),g=d;g<=f;g+=1)0!==y?(u=l.offset+l.relativeOffset-2,u+=y,0!==(p=lt.getUShort(i,u+=2*(g-d)))&&(p=p+m&65535)):p=g+m&65535,t.glyphIndexMap[g]=p}(i,a,t,e,r)}return i},make:function(t){var e,i=!0;for(e=t.length-1;0<e;e-=1)if(65535<t.get(e).unicode){console.log("Adding CMAP format 12 (needed!)"),i=!1;break}var r=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:i?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:i?12:20}];i||(r=r.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),r=r.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var n,o,s=new et.Table("cmap",r);for(s.segments=[],e=0;e<t.length;e+=1){for(var a=t.get(e),h=0;h<a.unicodes.length;h+=1)s.segments.push({end:n=a.unicodes[h],start:n,delta:-(n-(o=e)),offset:0,glyphIndex:o});s.segments=s.segments.sort(function(t,e){return t.start-e.start})}s.segments.push({end:65535,start:65535,delta:1,offset:0});var l=s.segments.length,u=0,c=[],p=[],f=[],d=[],m=[],y=[];for(e=0;e<l;e+=1){var g=s.segments[e];g.end<=65535&&g.start<=65535?(c=c.concat({name:"end_"+e,type:"USHORT",value:g.end}),p=p.concat({name:"start_"+e,type:"USHORT",value:g.start}),f=f.concat({name:"idDelta_"+e,type:"SHORT",value:g.delta}),d=d.concat({name:"idRangeOffset_"+e,type:"USHORT",value:g.offset}),void 0!==g.glyphId&&(m=m.concat({name:"glyph_"+e,type:"USHORT",value:g.glyphId}))):u+=1,i||void 0===g.glyphIndex||(y=(y=(y=y.concat({name:"cmap12Start_"+e,type:"ULONG",value:g.start})).concat({name:"cmap12End_"+e,type:"ULONG",value:g.end})).concat({name:"cmap12Glyph_"+e,type:"ULONG",value:g.glyphIndex}))}if(s.segCountX2=2*(l-u),s.searchRange=2*Math.pow(2,Math.floor(Math.log(l-u)/Math.log(2))),s.entrySelector=Math.log(s.searchRange/2)/Math.log(2),s.rangeShift=s.segCountX2-s.searchRange,s.fields=s.fields.concat(c),s.fields.push({name:"reservedPad",type:"USHORT",value:0}),s.fields=s.fields.concat(p),s.fields=s.fields.concat(f),s.fields=s.fields.concat(d),s.fields=s.fields.concat(m),s.cmap4Length=14+2*c.length+2+2*p.length+2*f.length+2*d.length+2*m.length,!i){var v=16+4*y.length;s.cmap12Offset=20+s.cmap4Length,s.fields=s.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:v},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:y.length/3}]),s.fields=s.fields.concat(y)}return s}},ct=[".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","periodce
1ntered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],pt=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","end
1ash","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"],ft=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],dt=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslas
1h","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function mt(t){this.font=t}function yt(t){this.cmap=t}function gt(t,e){this.encoding=t,this.charset=e}function vt(t){switch(t.version){case 1:this.names=dt.slice();break;case 2:this.names=new Array(t.numberOfGlyphs);for(var e=0;e<t.numberOfGlyphs;e++)this.names[e]=t.glyphNameIndex[e]<dt.length?dt[t.glyphNameIndex[e]]:t.names[t.glyphNameIndex[e]-dt.length];break;case 2.5:this.names=new Array(t.numberOfGlyphs);for(var i=0;i<t.numberOfGlyphs;i++)this.names[i]=dt[i+t.glyphNameIndex[i]];break;case 3:default:this.names=[]}}mt.prototype.charToGlyphIndex=function(t){var e=t.codePointAt(0),i=this.font.glyphs;if(i)for(var r=0;r<i.length;r+=1)for(var n=i.get(r),o=0;o<n.unicodes.length;o+=1)if(n.unicodes[o]===e)return r;return null},yt.prototype.charToGlyphIndex=function(t){return this.cmap.glyphIndexMap[t.codePointAt(0)]||0},gt.prototype.charToGlyphIndex=function(t){var e=t.codePointAt(0);return this.charset.indexOf(this.encoding[e])},vt.prototype.nameToGlyphIndex=function(t){return this.names.indexOf(t)},vt.prototype.glyphIndexToName=function(t){return this.names[t]};var _t=function(t,e,i,r,n){t.beginPath(),t.moveTo(e,i),t.lineTo(r,n),t.stroke()};function bt(t){this.bindConstructorValues(t)}function xt(t,e,i){Object.defineProperty(t,e,{get:function(){return t[i]},set:function(e){t[i]=e},enumerable:!0,configurable:!0})}function wt(t,e){if(this.font=t,this.glyphs={},Array.isArray(e))for(var i=0;i<e.length;i++)this.glyphs[i]=e[i];this.length=e&&e.length||0}bt.prototype.bindConstructorValues=function(t){var e;this.index=t.index||0,this.name=t.name||null,this.unicode=t.unicode||void 0,this.unicodes=t.unicodes||void 0!==t.unicode?[t.unicode]:[],t.xMin&&(this.xMin=t.xMin),t.yMin&&(this.yMin=t.yMin),t.xMax&&(this.xMax=t.xMax),t.yMax&&(this.yMax=t.yMax),t.advanceWidth&&(this.advanceWidth=t.advanceWidth),Object.defineProperty(this,"path",(e=t.path||new k,{configurable:!0,get:function(){return"function"==typeof e&&(e=e()),e},set:function(t){e=t}}))},bt.prototype.addUnicode=function(t){0===this.unicodes.length&&(this.unicode=t),this.unicodes.push(t)},bt.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},bt.prototype.getPath=function(t,e,i,r,n){var o,s;t=void 0!==t?t:0,e=void 0!==e?e:0,i=void 0!==i?i:72,r||(r={});var a=r.xScale,h=r.yScale;if(r.hinting&&n&&n.hinting&&(s=this.path&&n.hinting.exec(this,i)),s)o=n.hinting.getCommands(s),t=Math.round(t),e=Math.round(e),a=h=1;else{o=this.path.commands;var l=1/this.path.unitsPerEm*i;void 0===a&&(a=l),void 0===h&&(h=l)}for(var u=new k,c=0;c<o.length;c+=1){var p=o[c];"M"===p.type?u.moveTo(t+p.x*a,e+-p.y*h):"L"===p.type?u.lineTo(t+p.x*a,e+-p.y*h):"Q"===p.type?u.quadraticCurveTo(t+p.x1*a,e+-p.y1*h,t+p.x*a,e+-p.y*h):"C"===p.type?u.curveTo(t+p.x1*a,e+-p.y1*h,t+p.x2*a,e+-p.y2*h,t+p.x*a,e+-p.y*h):"Z"===p.type&&u.closePath()}return u},bt.prototype.getContours=function(){if(void 0===this.points)return[];for(var t=[],e=[],i=0;i<this.points.length;i+=1){var r=this.points[i];e.push(r),r.lastPointOfContour&&(t.push(e),e=[])}return O.argument(0===e.length,"There are still points left in the current contour."),t},bt.prototype.getMetrics=function(){for(var t=this.path.commands,e=[],i=[],r=0;r<t.length;r+=1){var n=t[r];"Z"!==n.type&&(e.push(n.x),i.push(n.y)),"Q"!==n.type&&"C"!==n.type||(e.push(n.x1),i.push(n.y1)),"C"===n.type&&(e.push(n.x2),i.push(n.y2))}var o={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,i),xMax:Math.max.apply(null,e),yMax:Math.max.apply(null,i),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o}
1,bt.prototype.draw=function(t,e,i,r,n){this.getPath(e,i,r,n).draw(t)},bt.prototype.drawPoints=function(t,e,i,r){function n(e,i,r,n){var o=2*Math.PI;t.beginPath();for(var s=0;s<e.length;s+=1)t.moveTo(i+e[s].x*n,r+e[s].y*n),t.arc(i+e[s].x*n,r+e[s].y*n,2,0,o,!1);t.closePath(),t.fill()}e=void 0!==e?e:0,i=void 0!==i?i:0;for(var o=1/this.path.unitsPerEm*(r=void 0!==r?r:24),s=[],a=[],h=this.path,l=0;l<h.commands.length;l+=1){var u=h.commands[l];void 0!==u.x&&s.push({x:u.x,y:-u.y}),void 0!==u.x1&&a.push({x:u.x1,y:-u.y1}),void 0!==u.x2&&a.push({x:u.x2,y:-u.y2})}t.fillStyle="blue",n(s,e,i,o),t.fillStyle="red",n(a,e,i,o)},bt.prototype.drawMetrics=function(t,e,i,r){var n;e=void 0!==e?e:0,i=void 0!==i?i:0,n=1/this.path.unitsPerEm*(r=void 0!==r?r:24),t.lineWidth=1,t.strokeStyle="black",_t(t,e,-1e4,e,1e4),_t(t,-1e4,i,1e4,i);var o=this.xMin||0,s=this.yMin||0,a=this.xMax||0,h=this.yMax||0,l=this.advanceWidth||0;t.strokeStyle="blue",_t(t,e+o*n,-1e4,e+o*n,1e4),_t(t,e+a*n,-1e4,e+a*n,1e4),_t(t,-1e4,i+-s*n,1e4,i+-s*n),_t(t,-1e4,i+-h*n,1e4,i+-h*n),t.strokeStyle="green",_t(t,e+l*n,-1e4,e+l*n,1e4)},wt.prototype.get=function(t){return"function"==typeof this.glyphs[t]&&(this.glyphs[t]=this.glyphs[t]()),this.glyphs[t]},wt.prototype.push=function(t,e){this.glyphs[t]=e,this.length++};var Tt={GlyphSet:wt,glyphLoader:function(t,e){return new bt({index:e,font:t})},ttfGlyphLoader:function(t,e,i,r,n,o){return function(){var s=new bt({index:e,font:t});return s.path=function(){i(s,r,n);var e=o(t.glyphs,s);return e.unitsPerEm=t.unitsPerEm,e},xt(s,"xMin","_xMin"),xt(s,"xMax","_xMax"),xt(s,"yMin","_yMin"),xt(s,"yMax","_yMax"),s}},cffGlyphLoader:function(t,e,i,r){return function(){var n=new bt({index:e,font:t});return n.path=function(){var e=i(t,n,r);return e.unitsPerEm=t.unitsPerEm,e},n}}};function St(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i+=1)if(!St(t[i],e[i]))return!1;return!0}return!1}function Mt(t){return t.length<1240?107:t.length<33900?1131:32768}function Et(t,e,i){var r,n,o=[],s=[],a=lt.getCard16(t,e);if(0!==a){var h=lt.getByte(t,e+2);r=e+(a+1)*h+2;for(var l=e+3,u=0;u<a+1;u+=1)o.push(lt.getOffset(t,l,h)),l+=h;n=r+o[a]}else n=e+2;for(var c=0;c<o.length-1;c+=1){var p=lt.getBytes(t,r+o[c],r+o[c+1]);i&&(p=i(p)),s.push(p)}return{objects:s,startOffset:e,endOffset:n}}function Ct(t,e){if(28===e)return t.parseByte()<<8|t.parseByte();if(29===e)return t.parseByte()<<24|t.parseByte()<<16|t.parseByte()<<8|t.parseByte();if(30===e)return function(t){for(var e="",i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var r=t.parseByte(),n=r>>4,o=15&r;if(15===n)break;if(e+=i[n],15===o)break;e+=i[o]}return parseFloat(e)}(t);if(32<=e&&e<=246)return e-139;if(247<=e&&e<=250)return 256*(e-247)+t.parseByte()+108;if(251<=e&&e<=254)return 256*-(e-251)-t.parseByte()-108;throw new Error("Invalid b0 "+e)}function At(t,e,i){var r=new lt.Parser(t,e=void 0!==e?e:0),n=[],o=[];for(i=void 0!==i?i:t.length;r.relativeOffset<i;){var s=r.parseByte();s<=21?(12===s&&(s=1200+r.parseByte()),n.push([s,o]),o=[]):o.push(Ct(r,s))}return function(t){for(var e={},i=0;i<t.length;i+=1){var r,n=t[i][0],o=t[i][1];if(r=1===o.length?o[0]:o,e.hasOwnProperty(n)&&!isNaN(e[n]))throw new Error("Object "+e+" already has key "+n);e[n]=r}return e}(n)}function Pt(t,e){return e<=390?ct[e]:t[e-391]}function kt(t,e,i){for(var r,n={},o=0;o<e.length;o+=1){var s=e[o];if(Array.isArray(s.type)){var a=[];a.length=s.type.length;for(var h=0;h<s.type.length;h++)void 0===(r=void 0!==t[s.op]?t[s.op][h]:void 0)&&(r=void 0!==s.value&&void 0!==s.value[h]?s.value[h]:null),"SID"===s.type[h]&&(r=Pt(i,r)),a[h]=r;n[s.name]=a}else void 0===(r=t[s.op])&&(r=void 0!==s.value?s.value:null),"SID"===s.type&&(r=Pt(i,r)),n[s.name]=r}return n}var Rt=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2}
1,{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Dt=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Ot(t,e,i,r){return kt(At(t,e,i),Dt,r)}function Lt(t,e,i,r){for(var n,o,s=[],a=0;a<i.length;a+=1){var h=(o=r,kt(At(n=new DataView(new Uint8Array(i[a]).buffer),0,n.byteLength),Rt,o));h._subrs=[],h._subrsBias=0;var l=h.private[0],u=h.private[1];if(0!==l&&0!==u){var c=Ot(t,u+e,l,r);if(h._defaultWidthX=c.defaultWidthX,h._nominalWidthX=c.nominalWidthX,0!==c.subrs){var p=Et(t,u+c.subrs+e);h._subrs=p.objects,h._subrsBias=Mt(h._subrs)}h._privateDict=c}s.push(h)}return s}function It(t,e,i){var r,n,o,s,a,h,l,u,c=new k,p=[],f=0,d=!1,m=!1,y=0,g=0;if(t.isCIDFont){var v=t.tables.cff.topDict._fdArray[t.tables.cff.topDict._fdSelect[e.index]];a=v._subrs,h=v._subrsBias,l=v._defaultWidthX,u=v._nominalWidthX}else a=t.tables.cff.topDict._subrs,h=t.tables.cff.topDict._subrsBias,l=t.tables.cff.topDict._defaultWidthX,u=t.tables.cff.topDict._nominalWidthX;var _=l;function b(t,e){m&&c.closePath(),c.moveTo(t,e),m=!0}function x(){p.length%2!=0&&!d&&(_=p.shift()+u),f+=p.length>>1,p.length=0,d=!0}return function i(l){for(var v,w,T,S,M,E,C,A,P,k,R,D,O=0;O<l.length;){var L=l[O];switch(O+=1,L){case 1:case 3:x();break;case 4:1<p.length&&!d&&(_=p.shift()+u,d=!0),g+=p.pop(),b(y,g);break;case 5:for(;0<p.length;)y+=p.shift(),g+=p.shift(),c.lineTo(y,g);break;case 6:for(;0<p.length&&(y+=p.shift(),c.lineTo(y,g),0!==p.length);)g+=p.shift(),c.lineTo(y,g);break;case 7:for(;0<p.length&&(g+=p.shift(),c.lineTo(y,g),0!==p.length);)y+=p.shift(),c.lineTo(y,g);break;case 8:for(;0<p.length;)r=y+p.shift(),n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),y=o+p.shift(),g=s+p.shift(),c.curveTo(r,n,o,s,y,g);break;case 10:M=p.pop()+h,(E=a[M])&&i(E);break;case 11:return;case 12:switch(L=l[O],O+=1,L){case 35:r=y+p.shift(),n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),C=o+p.shift(),A=s+p.shift(),P=C+p.shift(),k=A+p.shift(),R=P+p.shift(),D=k+p.shift(),y=R+p.shift(),g=D+p.shift(),p.shift(),c.curveTo(r,n,o,s,C,A),c.curveTo(P,k,R,D,y,g);break;case 34:r=y+p.shift(),n=g,o=r+p.shift(),s=n+p.shift(),C=o+p.shift(),A=s,P=C+p.shift(),k=s,R=P+p.shift(),D=g,y=R+p.shift(),c.curveTo(r,n,o,s,C,A),c.curveTo(P,k,R,D,y,g);break;case 36:r=y+p.shift(),n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),C=o+p.shift(),A=s,P=C+p.shift(),k=s,R=P+p.shift(),D=k+p.shift(),y=R+p.shift(),c.curveTo(r,n,o,s,C,A),c.curveTo(P,k,R,D,y,g);break;case 37:r=y+p.shift(),n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),C=o+p.shift(),A=s+p.shift(),P=C+p.shift(),k=A+p.shift(),R=P+p.shift(),D=k+p.shift(),Math.abs(R-y)>Math.abs(D-g)?y=R+p.shift():g=D+p.shift(),c.curveTo(r,n,o,s,C,A),c.curveTo(P,k,R,D,y,g);break;default:console.log("Glyph "+e.index+": unknown operator 1200"+L),p.length=0}break;case 14:0<p.length&&!d&&(_=p.shift()+u,d=!0),m&&(c.closePath(),m=!1);break;case 18:x();break;case 19:case 20:x(),O+=f+7>>3;break;case 21:2<p.length&&!d&&(_=p.shift()+u,d=!0),g+=p.pop(),b(y+=p.pop(),g);break;case 22:1<p.length&&!d&&(_=p.shift()+u,d=!0),b(y+=p.pop(),g);break;case 23:x();break;case 24:for(;2<p.length;)r=y+p.shift(),n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),y=o+p.shift(),g=s+p.shift(),c.curveTo(r,n,o,s,y,g);y+=p.shift(),g+=p.shift(),c.lineTo(y,g);break;case 25:for(;6<p.length;)y+=p.shift(),g+=p.shift(),c.lineTo(y,g);r=y+p.shift(),n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),y=o+p.shift(),g=s+p.shift(),c.curveTo(r,n,o,s,y,g);break;case 26:for(p.length%2&&(y+=p.shift());0<p.length;)r=y,n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),y=o,g=s+p.shift(),c.curveTo(r,n,o,s,y,g);break;case 27:for(p.length%2&&(g+=p.shift());0<p.length;)r=y+p.shift(),n=g,o=r+p.shift(),s=n+p.shift(),y=o+p.shift(),c.curveTo(r,n,o,s,y,g=s);break;case 28:p.push(((v=l[O])<<24|(w=l[O+1])<<16)>>16),O+=2;break;case 29:M=p.pop()+t.gsubrsBias,(E=t.gsubrs[M])&&i(E);break;case 30:for(;0<p.length&&(r=y,n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),y=o+p.shift(),g=s+(1===p.length?p.shift():0),c.curveTo(r,n,o,s,y,g),0!==p.length);)r=y+p.shift(),n=g,o=r+p.shift(),s=n+p.shift(),g=s+p.shift(),y=o+(1===p.length?p.shift():0),c.curveTo(r,n,o,s,y,g);break;case 31:for(;0<p.length&&(r=y+p.shift(),n=g,o=r+p.shift(),s=n+p.shift(),g=s+p.shift(),y=o+(1===p.length?p.shift():0),c.curveTo(r,n,o,s,y,g),0!==p.length);)r=y,n=g+p.shift(),o=r+p.shift(),s=n+p.shift(),y=o+p.shift(),g=s+(1===p.length?p.shift():0),c.curveTo(r,n,o,s,y,g);break;default:L<32?console.log("Glyph "+e.index+": unknown operator "+L):L<247?p.push(L-139):L<251?(v=l[O],O+=1,p.push(256*(L-247)+v+108)):L<255?(v=l[O],O+=1,p.push(256*-(L-251)-v-108)):(v=l[O],w=l[O+1],T=l[O+2],S=l[O+3],O+=4,p.push((v<<24|w<<16|T<<8|S)/65536))}}}(i),e.advanceWidth=_,c}function Nt(t,e){var i,r=ct.indexOf(t);
1return 0<=r&&(i=r),0<=(r=e.indexOf(t))?i=r+ct.length:(i=ct.length+e.length,e.push(t)),i}function Ft(t,e,i){for(var r={},n=0;n<t.length;n+=1){var o=t[n],s=e[o.name];void 0===s||St(s,o.value)||("SID"===o.type&&(s=Nt(s,i)),r[o.op]={name:o.name,type:o.type,value:s})}return r}function Ut(t,e){var i=new et.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return i.dict=Ft(Rt,t,e),i}function Bt(t){var e=new et.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return e.topDicts=[{name:"topDict_0",type:"TABLE",value:t}],e}function Gt(t){var e=[],i=t.path;e.push({name:"width",type:"NUMBER",value:t.advanceWidth});for(var r=0,n=0,o=0;o<i.commands.length;o+=1){var s=void 0,a=void 0,h=i.commands[o];if("Q"===h.type&&(h={type:"C",x:h.x,y:h.y,x1:1/3*r+2/3*h.x1,y1:1/3*n+2/3*h.y1,x2:1/3*h.x+2/3*h.x1,y2:1/3*h.y+2/3*h.y1}),"M"===h.type)s=Math.round(h.x-r),a=Math.round(h.y-n),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rmoveto",type:"OP",value:21}),r=Math.round(h.x),n=Math.round(h.y);else if("L"===h.type)s=Math.round(h.x-r),a=Math.round(h.y-n),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rlineto",type:"OP",value:5}),r=Math.round(h.x),n=Math.round(h.y);else if("C"===h.type){var l=Math.round(h.x1-r),u=Math.round(h.y1-n),c=Math.round(h.x2-h.x1),p=Math.round(h.y2-h.y1);s=Math.round(h.x-h.x2),a=Math.round(h.y-h.y2),e.push({name:"dx1",type:"NUMBER",value:l}),e.push({name:"dy1",type:"NUMBER",value:u}),e.push({name:"dx2",type:"NUMBER",value:c}),e.push({name:"dy2",type:"NUMBER",value:p}),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rrcurveto",type:"OP",value:8}),r=Math.round(h.x),n=Math.round(h.y)}}return e.push({name:"endchar",type:"OP",value:14}),e}var Vt={parse:function(t,e,i){i.tables.cff={};var r,n,o,s=Et(t,Et(t,(r=t,n=e,(o={}).formatMajor=lt.getCard8(r,n),o.formatMinor=lt.getCard8(r,n+1),o.size=lt.getCard8(r,n+2),o.offsetSize=lt.getCard8(r,n+3),o.startOffset=n,o.endOffset=n+4,o).endOffset,lt.bytesToString).endOffset),a=Et(t,s.endOffset,lt.bytesToString),h=Et(t,a.endOffset);i.gsubrs=h.objects,i.gsubrsBias=Mt(i.gsubrs);var l=Lt(t,e,s.objects,a.objects);if(1!==l.length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);var u=l[0];if((i.tables.cff.topDict=u)._privateDict&&(i.defaultWidthX=u._privateDict.defaultWidthX,i.nominalWidthX=u._privateDict.nominalWidthX),void 0!==u.ros[0]&&void 0!==u.ros[1]&&(i.isCIDFont=!0),i.isCIDFont){var c=u.fdArray,p=u.fdSelect;if(0===c||0===p)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");var f=Lt(t,e,Et(t,c+=e).objects,a.objects);u._fdArray=f,u._fdSelect=function(t,e,i,r){var n,o=[],s=new lt.Parser(t,e),a=s.parseCard8();if(0===a)for(var h=0;h<i;h++){if(r<=(n=s.parseCard8()))throw new Error("CFF table CID Font FDSelect has bad FD index value "+n+" (FD count "+r+")");o.push(n)}else{if(3!==a)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+a);var l,u=s.parseCard16(),c=s.parseCard16();if(0!==c)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+c);for(var p=0;p<u;p++){if(n=s.parseCard8(),l=s.parseCard16(),r<=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+n+" (FD count "+r+")");if(i<l)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+l);for(;c<l;c++)o.push(n);c=l}if(l!==i)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+l)}return o}(t,p+=e,i.numGlyphs,f.length)}var d=e+u.private[1],m=Ot(t,d,u.private[0],a.objects);if(i.defaultWidthX=m.defaultWidthX,i.nominalWidthX=m.nominalWidthX,0!==m.subrs){var y=Et(t,d+m.subrs);i.subrs=y.objects,i.subrsBias=Mt(i.subrs)}else i.subrs=[],i.subrsBias=0;var g=Et(t,e+u.charStrings);i.nGlyphs=g.objects.length;var v=function(t,e,i,r){var n,o,s=new lt.Parser(t,e);i-=1;var a=[".notdef"],h=s.parseCard8();if(0===h)for(var l=0;l<i;l+=1)n=s.parseSID(),a.push(Pt(r,n));else if(1===h)for(;a.length<=i;){n=s.parseSID(),o=s.parseCard8();for(var u=0;u<=o;u+=1)a.push(Pt(r,n)),n+=1}else{if(2!==h)throw new Error("Unknown charset format "+h);for(;a.length<=i;){n=s.parseSID(),o=s.parseCard16();for(var c=0;c<=o;c+=1)a.push(Pt(r,n)),n+=1}}return a}(t,e+u.charset,i.nGlyphs,a.objects);i.cffEncoding=0===u.encoding?new gt(pt,v):1===u.encoding?new gt(ft,v):function(t,e,
1i){var r,n={},o=new lt.Parser(t,e),s=o.parseCard8();if(0===s)for(var a=o.parseCard8(),h=0;h<a;h+=1)n[r=o.parseCard8()]=h;else{if(1!==s)throw new Error("Unknown encoding format "+s);var l=o.parseCard8();r=1;for(var u=0;u<l;u+=1)for(var c=o.parseCard8(),p=o.parseCard8(),f=c;f<=c+p;f+=1)n[f]=r,r+=1}return new gt(n,i)}(t,e+u.encoding,v),i.encoding=i.encoding||i.cffEncoding,i.glyphs=new Tt.GlyphSet(i);for(var _=0;_<i.nGlyphs;_+=1)i.glyphs.push(_,Tt.cffGlyphLoader(i,_,It,g.objects[_]))},make:function(t,e){for(var i,r=new et.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/e.unitsPerEm,o={version:e.version,fullName:e.fullName,familyName:e.familyName,weight:e.weightName,fontBBox:e.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},s=[],a=1;a<t.length;a+=1)i=t.get(a),s.push(i.name);var h=[];r.header=new et.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),r.nameIndex=function(t){var e=new et.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);e.names=[];for(var i=0;i<t.length;i+=1)e.names.push({name:"name_"+i,type:"NAME",value:t[i]});return e}([e.postScriptName]);var l,u,c,p=Ut(o,h);r.topDictIndex=Bt(p),r.globalSubrIndex=new et.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),r.charsets=function(t,e){for(var i=new et.Record("Charsets",[{name:"format",type:"Card8",value:0}]),r=0;r<t.length;r+=1){var n=Nt(t[r],e);i.fields.push({name:"glyph_"+r,type:"SID",value:n})}return i}(s,h),r.charStringsIndex=function(t){for(var e=new et.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),i=0;i<t.length;i+=1){var r=t.get(i),n=Gt(r);e.charStrings.push({name:r.name,type:"CHARSTRING",value:n})}return e}(t),r.privateDict=(l={},u=h,(c=new et.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}])).dict=Ft(Dt,l,u),c),r.stringIndex=function(t){var e=new et.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);e.strings=[];for(var i=0;i<t.length;i+=1)e.strings.push({name:"string_"+i,type:"STRING",value:t[i]});return e}(h);var f=r.header.sizeOf()+r.nameIndex.sizeOf()+r.topDictIndex.sizeOf()+r.stringIndex.sizeOf()+r.globalSubrIndex.sizeOf();return o.charset=f,o.encoding=0,o.charStrings=o.charset+r.charsets.sizeOf(),o.private[1]=o.charStrings+r.charStringsIndex.sizeOf(),p=Ut(o,h),r.topDictIndex=Bt(p),r}},qt={parse:function(t,e){var i={},r=new lt.Parser(t,e);return i.version=r.parseVersion(),i.fontRevision=Math.round(1e3*r.parseFixed())/1e3,i.checkSumAdjustment=r.parseULong(),i.magicNumber=r.parseULong(),O.argument(1594834165===i.magicNumber,"Font header has wrong magic number."),i.flags=r.parseUShort(),i.unitsPerEm=r.parseUShort(),i.created=r.parseLongDateTime(),i.modified=r.parseLongDateTime(),i.xMin=r.parseShort(),i.yMin=r.parseShort(),i.xMax=r.parseShort(),i.yMax=r.parseShort(),i.macStyle=r.parseUShort(),i.lowestRecPPEM=r.parseUShort(),i.fontDirectionHint=r.parseShort(),i.indexToLocFormat=r.parseShort(),i.glyphDataFormat=r.parseShort(),i},make:function(t){var e=Math.round((new Date).getTime()/1e3)+2082844800,i=e;return t.createdTimestamp&&(i=t.createdTimestamp+2082844800),new et.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:i},{name:"modified",type:"LONGDATETIME",value:e},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],t)}},zt={parse:function(t,e){var i={},r=new lt.Parser(t,e);return i.version=r.parseVersion(),i.ascender=r.parseShort(),i.descender=r.parseShort(),i.lineGap=r.parseShort(),i.advanceWidthMax=r.parseUShort(),i.minLeftSideBearing=r.parseShort(),i.minRightSideBearing=r.parseShort(),i.xMaxExtent=r.parseShort(),i.caretSlopeRise=r.parseShort(),i.caretSlopeRun=r.parseShort(),i.caretOffset=r.parseShort(),r.relativeOffset+=8,i.metricDataFormat=r.parseShort(),i.numberOfHMetrics=r.parseUShort(),i},make:function(t){return new et.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],t)}}
1,jt={parse:function(t,e,i,r,n){for(var o,s,a=new lt.Parser(t,e),h=0;h<r;h+=1){h<i&&(o=a.parseUShort(),s=a.parseShort());var l=n.get(h);l.advanceWidth=o,l.leftSideBearing=s}},make:function(t){for(var e=new et.Table("hmtx",[]),i=0;i<t.length;i+=1){var r=t.get(i),n=r.leftSideBearing||0;e.fields.push({name:"advanceWidth_"+i,type:"USHORT",value:r.advanceWidth||0}),e.fields.push({name:"leftSideBearing_"+i,type:"SHORT",value:n})}return e}},Ht={make:function(t){for(var e=new et.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:t.length}]),i="",r=12+4*t.length,n=0;n<t.length;++n){var o=i.indexOf(t[n]);o<0&&(o=i.length,i+=t[n]),e.fields.push({name:"offset "+n,type:"USHORT",value:r+o}),e.fields.push({name:"length "+n,type:"USHORT",value:t[n].length})}return e.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),e},parse:function(t,e){var i=new lt.Parser(t,e),r=i.parseULong();O.argument(1===r,"Unsupported ltag table version."),i.skip("uLong",1);for(var n=i.parseULong(),o=[],s=0;s<n;s++){for(var a="",h=e+i.parseUShort(),l=i.parseUShort(),u=h;u<h+l;++u)a+=String.fromCharCode(t.getInt8(u));o.push(a)}return o}},Xt={parse:function(t,e){var i={},r=new lt.Parser(t,e);return i.version=r.parseVersion(),i.numGlyphs=r.parseUShort(),1===i.version&&(i.maxPoints=r.parseUShort(),i.maxContours=r.parseUShort(),i.maxCompositePoints=r.parseUShort(),i.maxCompositeContours=r.parseUShort(),i.maxZones=r.parseUShort(),i.maxTwilightPoints=r.parseUShort(),i.maxStorage=r.parseUShort(),i.maxFunctionDefs=r.parseUShort(),i.maxInstructionDefs=r.parseUShort(),i.maxStackElements=r.parseUShort(),i.maxSizeOfInstructions=r.parseUShort(),i.maxComponentElements=r.parseUShort(),i.maxComponentDepth=r.parseUShort()),i},make:function(t){return new et.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:t}])}},Wt=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],Yt={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69
1:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},Zt={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},Qt={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",104
10:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function $t(t,e,i){switch(t){case 0:if(65535===e)return"und";if(i)return i[e];break;case 1:return Yt[e];case 3:return Qt[e]}}var Kt="utf-16",Jt={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},te={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function ee(t,e,i){switch(t){case 0:return Kt;case 1:return te[i]||Jt[e];case 3:if(1===e||10===e)return Kt}}function ie(t){var e={};for(var i in t)e[t[i]]=parseInt(i);return e}function re(t,e,i,r,n,o){return new et.Record("NameRecord",[{name:"platformID",type:"USHORT",value:t},{name:"encodingID",type:"USHORT",value:e},{name:"languageID",type:"USHORT",value:i},{name:"nameID",type:"USHORT",value:r},{name:"length",type:"USHORT",value:n},{name:"offset",type:"USHORT",value:o}])}function ne(t,e){var i=function(t,e){var i=t.length,r=e.length-i+1;t:for(var n=0;n<r;n++)for(;n<r;n++){for(var o=0;o<i;o++)if(e[n+o]!==t[o])continue t;return n}return-1}(t,e);if(i<0){i=e.length;for(var r=0,n=t.length;r<n;++r)e.push(t[r])}return i}var oe={parse:function(t,e,i){for(var r={},n=new lt.Parser(t,e),o=n.parseUShort(),s=n.parseUShort(),a=n.offset+n.parseUShort(),h=0;h<s;h++){var l,u=n.parseUShort(),c=n.parseUShort(),p=n.parseUShort(),f=n.parseUShort(),d=Wt[f]||f,m=n.parseUShort(),y=n.parseUShort(),g=$t(u,p,i),v=ee(u,c,p);if(void 0!==v&&void 0!==g&&(l=v===Kt?I.UTF16(t,a+y,m):I.MACSTRING(t,a+y,m,v))){var _=r[d];void 0===_&&(_=r[d]={}),_[g]=l}}return 1===o&&n.parseUShort(),r},make:function(t,e){var i,r=[],n={},o=ie(Wt);for(var s in t){var a=o[s];if(void 0===a&&(a=s),i=parseInt(a),isNaN(i))throw new Error('Name table entry "'+s+'" does not exist, see nameTableNames for complete list.');n[i]=t[s],r.push(i)}for(var h=ie(Yt),l=ie(Qt),u=[],c=[],p=0;p<r.length;p++){var f=n[i=r[p]];for(var d in f){var m=f[d],y=1,g=h[d],v=Zt[g],_=ee(y,v,g),b=N.MACSTRING(m,_);void 0===b&&(y=0,(g=e.indexOf(d))<0&&(g=e.length,e.push(d)),v=4,b=N.UTF16(m));var x=ne(b,c);u.push(re(y,v,g,i,b.length,x));var w=l[d];if(void 0!==w){var T=N.UTF16(m),S=ne(T,c);u.push(re(3,1,w,i,T.length,S))}}}u.sort(function(t,e){return t.platformID-e.platformID||t.encodingID-e.encodingID||t.languageID-e.languageID||t.nameID-e.nameID});for(var M=new et.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:u.length},{name:"stringOffset",type:"USHORT",value:6+12*u.length}]),E=0;E<u.length;E++)M.fields.push({name:"record_"+E,type:"RECORD",value:u[E]});return M.fields.push({name:"strings",type:"LITERAL",value:c}),M}},se=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}],ae={parse:function(t,e){var i={},r=new lt.Parser(t,e);i.version=r.parseUShort(),i.xAvgCharWidth=r.parseShort(),i.usWeightClass=r.parseUShort(),i.usWidthClass=r.parseUShort(),i.fsType=r.parseUShort(),i.ySubscriptXSize=r.parseShort(),i.ySubscriptYSize=r.parseShort(),i.ySubscriptXOffset=r.parseShort(),i.ySubscriptYOffset=r.parseShort(),i.ySuperscriptXSize=r.parseShort(),i.ySuperscriptYSize=r.parseShort(),i.ySuperscriptXOffset=r.parseShort(),i.ySuperscriptYOffset=r.parseShort(),i.yStrikeoutSize=r.parseShort(),i.yStrikeoutPosition=r.parseShort(),i.sFamilyClass=r.parseShort(),i.panose=[];for(var n=0;n<10;n++)i.panose[n]=r.parseByte();return i.ulUnicodeRange1=r.parseULong(),i.ulUnicodeRange2=r.parseULong(),i.ulUnicodeRange3=r.parseULong(),i.ulUnicodeRange4=r.parseULong(),i.achVendID=String.fromCharCode(r.parseByte(),r.parseByte(),r.parseByte(),r.parseByte()),i.fsSelection=r.parseUShort(),i.usFirstCharIndex=r.parseUShort(),i.usLastCharIndex=r.parseUShort(),i.sTypoAscender=r.parseShort(),i.sTypoDescender=r.parseShort(),i.sTypoLineGap=r.parseShort(),i.usWinAscent=r.parseUShort(),i.usWinDescent=r.parseUShort(),1<=i.version&&(i.ulCodePageRange1=r.parseULong(),i.ulCodePageRange2=r.parseULong()),2<=i.version&&(i.sxHeight=r.parseShort(),i.sCapHeight=r.parseShort(),i.usDefaultChar=r.parseUShort(),i.usBreakChar=r.parseUShort(),i.usMaxContent=r.parseUShort()),i},make:function(t){return new et.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],t)},unicodeRanges:se,getUnicodeRange:function(t){for(var e=0;e<se.length;e+=1){var i=se[e];
1if(t>=i.begin&&t<i.end)return e}return-1}},he={parse:function(t,e){var i={},r=new lt.Parser(t,e);switch(i.version=r.parseVersion(),i.italicAngle=r.parseFixed(),i.underlinePosition=r.parseShort(),i.underlineThickness=r.parseShort(),i.isFixedPitch=r.parseULong(),i.minMemType42=r.parseULong(),i.maxMemType42=r.parseULong(),i.minMemType1=r.parseULong(),i.maxMemType1=r.parseULong(),i.version){case 1:i.names=dt.slice();break;case 2:i.numberOfGlyphs=r.parseUShort(),i.glyphNameIndex=new Array(i.numberOfGlyphs);for(var n=0;n<i.numberOfGlyphs;n++)i.glyphNameIndex[n]=r.parseUShort();i.names=[];for(var o=0;o<i.numberOfGlyphs;o++)if(i.glyphNameIndex[o]>=dt.length){var s=r.parseChar();i.names.push(r.parseString(s))}break;case 2.5:i.numberOfGlyphs=r.parseUShort(),i.offset=new Array(i.numberOfGlyphs);for(var a=0;a<i.numberOfGlyphs;a++)i.offset[a]=r.parseChar()}return i},make:function(){return new et.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}},le=new Array(9);le[1]=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();return 1===e?{substFormat:1,coverage:this.parsePointer(at.coverage),deltaGlyphId:this.parseUShort()}:2===e?{substFormat:2,coverage:this.parsePointer(at.coverage),substitute:this.parseOffset16List()}:void O.assert(!1,"0x"+t.toString(16)+": lookup type 1 format must be 1 or 2.")},le[2]=function(){var t=this.parseUShort();return O.argument(1===t,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(at.coverage),sequences:this.parseListOfLists()}},le[3]=function(){var t=this.parseUShort();return O.argument(1===t,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(at.coverage),alternateSets:this.parseListOfLists()}},le[4]=function(){var t=this.parseUShort();return O.argument(1===t,"GSUB ligature table identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(at.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var ue={sequenceIndex:at.uShort,lookupListIndex:at.uShort};le[5]=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();if(1===e)return{substFormat:e,coverage:this.parsePointer(at.coverage),ruleSets:this.parseListOfLists(function(){var t=this.parseUShort(),e=this.parseUShort();return{input:this.parseUShortList(t-1),lookupRecords:this.parseRecordList(e,ue)}})};if(2===e)return{substFormat:e,coverage:this.parsePointer(at.coverage),classDef:this.parsePointer(at.classDef),classSets:this.parseListOfLists(function(){var t=this.parseUShort(),e=this.parseUShort();return{classes:this.parseUShortList(t-1),lookupRecords:this.parseRecordList(e,ue)}})};if(3===e){var i=this.parseUShort(),r=this.parseUShort();return{substFormat:e,coverages:this.parseList(i,at.pointer(at.coverage)),lookupRecords:this.parseRecordList(r,ue)}}O.assert(!1,"0x"+t.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},le[6]=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();return 1===e?{substFormat:1,coverage:this.parsePointer(at.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(ue)}})}:2===e?{substFormat:2,coverage:this.parsePointer(at.coverage),backtrackClassDef:this.parsePointer(at.classDef),inputClassDef:this.parsePointer(at.classDef),lookaheadClassDef:this.parsePointer(at.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(ue)}})}:3===e?{substFormat:3,backtrackCoverage:this.parseList(at.pointer(at.coverage)),inputCoverage:this.parseList(at.pointer(at.coverage)),lookaheadCoverage:this.parseList(at.pointer(at.coverage)),lookupRecords:this.parseRecordList(ue)}:void O.assert(!1,"0x"+t.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},le[7]=function(){var t=this.parseUShort();O.argument(1===t,"GSUB Extension Substitution subtable identifier-format must be 1");var e=this.parseUShort(),i=new at(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:e,extension:le[e].call(i)}},le[8]=function(){var t=this.parseUShort();return O.argument(1===t,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(at.coverage),backtrackCoverage:this.parseList(at.pointer(at.coverage)),lookaheadCoverage:this.parseList(at.pointer(at.coverage)),substitutes:this.parseUShortList()}};var ce=new Array(9);ce[1]=function(t){return new et.Table("substitutionTable",1===t.substFormat?[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new et.Coverage(t.coverage)},{name:"deltaGlyphID",type:"USHORT",value:t.deltaGlyphId}]:[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new et.Coverage(t.coverage)}].concat(et.ushortList("substitute",t.substitute)))},ce[3]=function(t){return O.assert(1===t.substFormat,"Lookup type 3 substFormat must be 1."),new et.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new et.Coverage(t.coverage)}].concat(et.tableList("altSet",t.alternateSets,function(t){return new et.Table("alternateSetTable",et.ushortList("alternate",t))})))},ce[4]=function(t){return O.assert(1===t.substFormat,"Lookup type 4 substFormat must be 1."),new et.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new et.Coverage(t.coverage)}].concat(et.tableList("ligSet",t.ligatureSets,function(t){return new et.Table("ligatureSetTable",et.tableList("ligature",t,function(t){return new et.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:t.ligGlyph}].concat(et.ushortList("component",t.components,t.components.length+1)))}))})))};var pe={parse:function(t,e){var i=new at(t,e=e||0),r=i.parseVersion(1);return O.argument(1===r||1.1===r,"Unsupported GSUB table version."),1===r?{version:r,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(le)}:{version:r,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(le),variations:i.parseFeatureVariationsList()}},make:function(t){return new et.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new et.ScriptList(t.scripts)},{name:"features",type:"TABLE",value:new et.FeatureList(t.features)},{name:"lookups",type:"TABLE",value:new et.LookupList(t.lookups,ce)}])}},fe={parse:function(t,e){var i=new lt.Parser(t,e),r=i.parseULong();O.argument(1===r,"Unsupported META table version."),i.parseULong(),i.parseULong();for(var n=i.parseULong(),o={},s=0;s<n;s++){var a=i.parseTag(),h=i.parseULong(),l=i.parseULong(),u=I.UTF8(t,e+h,l);o[a]=u}return o},make:function(t){var e=Object.keys(t).length,i="",r=16+12*e,n=new et.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:r},{name:"numTags",type:"ULONG",value:e}]);for(var o in t){var s=i.length;i+=t[o],n.fields.push({name:"tag "+o,type:"TAG",value:o}),n.fields.push({name:"offset "+o,type:"ULONG",value:r+s}),n.fields.push({name:"length "+o,type:"ULONG",value:t[o].length})}return n.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),n}};function de(t){return Math.log(t)/Math.log(2)|0}function me(t){for(;t.length%4!=0;)t.push(0);for(var e=0,i=0;i<t.length;i+=4)e+=(t[i]<<24)+(t[i+1]<<16)+(t[i+2]<<8)+t[i+3];return e%Math.pow(2,32)}function ye(t,e,i,r){return new et.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==t?t:""},{name:"checkSum",type:"ULONG",value:void 0!==e?e:0},{name:"offset",type:"ULONG",value:void 0!==i?i:0},{name:"length",type:"ULONG",value:void 0!==r?r:0}])}function ge(t){var e=new et.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);e.tables=t,e.numTables=t.length;var i=Math.pow(2,de(e.numTables));
1e.searchRange=16*i,e.entrySelector=de(i),e.rangeShift=16*e.numTables-e.searchRange;for(var r=[],n=[],o=e.sizeOf()+ye().sizeOf()*e.numTables;o%4!=0;)o+=1,n.push({name:"padding",type:"BYTE",value:0});for(var s=0;s<t.length;s+=1){var a=t[s];O.argument(4===a.tableName.length,"Table name"+a.tableName+" is invalid.");var h=a.sizeOf(),l=ye(a.tableName,me(a.encode()),o,h);for(r.push({name:l.tag+" Table Record",type:"RECORD",value:l}),n.push({name:a.tableName+" table",type:"RECORD",value:a}),o+=h,O.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!=0;)o+=1,n.push({name:"padding",type:"BYTE",value:0})}return r.sort(function(t,e){return t.value.tag>e.value.tag?1:-1}),e.fields=e.fields.concat(r),e.fields=e.fields.concat(n),e}function ve(t,e,i){for(var r=0;r<e.length;r+=1){var n=t.charToGlyphIndex(e[r]);if(0<n)return t.glyphs.get(n).getMetrics()}return i}function _e(t,e){for(var i=0,r=t.length-1;i<=r;){var n=i+r>>>1,o=t[n].tag;if(o===e)return n;o<e?i=n+1:r=n-1}return-i-1}function be(t,e){for(var i=0,r=t.length-1;i<=r;){var n=i+r>>>1,o=t[n];if(o===e)return n;o<e?i=n+1:r=n-1}return-i-1}function xe(t,e){for(var i,r=0,n=t.length-1;r<=n;){var o=r+n>>>1,s=(i=t[o]).start;if(s===e)return i;s<e?r=o+1:n=o-1}if(0<r)return e>(i=t[r-1]).end?0:i}function we(t,e){this.font=t,this.tableName=e}function Te(t){we.call(this,t,"gpos")}function Se(t){we.call(this,t,"gsub")}function Me(t,e){var i=t.length;if(i!==e.length)return!1;for(var r=0;r<i;r++)if(t[r]!==e[r])return!1;return!0}function Ee(t,e,i){for(var r=t.subtables,n=0;n<r.length;n++){var o=r[n];if(o.substFormat===e)return o}if(i)return r.push(i),i}function Ce(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),r=0;r<t.length;++r)i[r]=t[r];return e}function Ae(t,e){if(!t)throw e}function Pe(t,e,i,r,n){var o;return 0<(e&r)?(o=t.parseByte(),0==(e&n)&&(o=-o),i+o):0<(e&n)?i:i+t.parseShort()}function ke(t,e,i){var r,n,o=new lt.Parser(e,i);if(t.numberOfContours=o.parseShort(),t._xMin=o.parseShort(),t._yMin=o.parseShort(),t._xMax=o.parseShort(),t._yMax=o.parseShort(),0<t.numberOfContours){for(var s=t.endPointIndices=[],a=0;a<t.numberOfContours;a+=1)s.push(o.parseUShort());t.instructionLength=o.parseUShort(),t.instructions=[];for(var h=0;h<t.instructionLength;h+=1)t.instructions.push(o.parseByte());var l=s[s.length-1]+1;r=[];for(var u=0;u<l;u+=1)if(n=o.parseByte(),r.push(n),0<(8&n))for(var c=o.parseByte(),p=0;p<c;p+=1)r.push(n),u+=1;if(O.argument(r.length===l,"Bad flags."),0<s.length){var f,d=[];if(0<l){for(var m=0;m<l;m+=1)(f={}).onCurve=!!(1&(n=r[m])),f.lastPointOfContour=0<=s.indexOf(m),d.push(f);for(var y=0,g=0;g<l;g+=1)(f=d[g]).x=Pe(o,n=r[g],y,2,16),y=f.x;for(var v=0,_=0;_<l;_+=1)(f=d[_]).y=Pe(o,n=r[_],v,4,32),v=f.y}t.points=d}else t.points=[]}else if(0===t.numberOfContours)t.points=[];else{t.isComposite=!0,t.points=[],t.components=[];for(var b=!0;b;){r=o.parseUShort();var x={glyphIndex:o.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};0<(1&r)?0<(2&r)?(x.dx=o.parseShort(),x.dy=o.parseShort()):x.matchedPoints=[o.parseUShort(),o.parseUShort()]:0<(2&r)?(x.dx=o.parseChar(),x.dy=o.parseChar()):x.matchedPoints=[o.parseByte(),o.parseByte()],0<(8&r)?x.xScale=x.yScale=o.parseF2Dot14():0<(64&r)?(x.xScale=o.parseF2Dot14(),x.yScale=o.parseF2Dot14()):0<(128&r)&&(x.xScale=o.parseF2Dot14(),x.scale01=o.parseF2Dot14(),x.scale10=o.parseF2Dot14(),x.yScale=o.parseF2Dot14()),t.components.push(x),b=!!(32&r)}if(256&r){t.instructionLength=o.parseUShort(),t.instructions=[];for(var w=0;w<t.instructionLength;w+=1)t.instructions.push(o.parseByte())}}}function Re(t,e){for(var i=[],r=0;r<t.length;r+=1){var n=t[r];i.push({x:e.xScale*n.x+e.scale01*n.y+e.dx,y:e.scale10*n.x+e.yScale*n.y+e.dy,onCurve:n.onCurve,lastPointOfContour:n.lastPointOfContour})}return i}function De(t){var e=new k;if(!t)return e;for(var i=function(t){for(var e=[],i=[],r=0;r<t.length;r+=1){var n=t[r];i.push(n),n.lastPointOfContour&&(e.push(i),i=[])}return O.argument(0===i.length,"There are still points left in the current contour."),e}(t),r=0;r<i.length;++r){var n=i[r],o=n[n.length-1],s=n[0];if(o.onCurve)e.moveTo(o.x,o.y);else if(s.onCurve)e.moveTo(s.x,s.y);else{var a={x:.5*(o.x+s.x),y:.5*(o.y+s.y)};e.moveTo(a.x,a.y)}for(var h=0;h<n.length;++h)if(o=s,s=n[(h+1)%n.length],o.onCurve)e.lineTo(o.x,o.y);else{var l=s;s.onCurve||(l={x:.5*(o.x+s.x),y:.5*(o.y+s.y)}),e.quadraticCurveTo(o.x,o.y,l.x,l.y)}e.closePath()}return e}function Oe(t,e){if(e.isComposite)for(var i=0;i<e.components.length;i+=1){var r=e.components[i],n=t.get(r.glyphIndex);if(n.getPath(),n.points){var o=void 0;if(void 0===r.matchedPoints)o=Re(n.points,r);else{if(r.matchedPoints[0]>e.points.length-1||r.matchedPoints[1]>n.points.length-1)throw Error("Matched points out of range in "+e.name);var s=e.points[r.matchedPoints[0]],a=n.points[r.matchedPoints[1]],h={xScale:r.xScale,scale01:r.scale01,scale10:r.scale10,yScale:r.yScale,dx:0,dy:0};a=Re([a],h)[0],h.dx=s.x-a.x,h.dy=s.y-a.y,o=Re(n.points,h)}e.points=e.points.concat(o)}}return De(e.points)}(Te.prototype=we.prototype={searchTag:_e,binSearch:be,getTable:function(t){var e=this.font.tables[this.tableName];return!e&&t&&(e=this.font.tables[this.tableName]=this.createDefaultTable()),e},getScriptNames:function(){var t=this.getTable();return t?t.scripts.map(function(t){return t.tag}):[]},getDefaultScriptName:function(){var t=this.getTable();if(t){for(var e=!1,i=0;i<t.scripts.length;i++){var r=t.scripts[i].tag;if("DFLT"===r)return r;"latn"===r&&(e=!0)}return e?"latn":void 0}},getScriptTable:function(t,e){var i=this.getTable(e);if(i){var r=i.scripts,n=_e(i.scripts,t=t||"DFLT");if(0<=n)return r[n].script;if(e){var o={tag:t,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return r.splice(-1-n,0,o),o.script}}}
1,getLangSysTable:function(t,e,i){var r=this.getScriptTable(t,i);if(r){if(!e||"dflt"===e||"DFLT"===e)return r.defaultLangSys;var n=_e(r.langSysRecords,e);if(0<=n)return r.langSysRecords[n].langSys;if(i){var o={tag:e,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return r.langSysRecords.splice(-1-n,0,o),o.langSys}}},getFeatureTable:function(t,e,i,r){var n=this.getLangSysTable(t,e,r);if(n){for(var o,s=n.featureIndexes,a=this.font.tables[this.tableName].features,h=0;h<s.length;h++)if((o=a[s[h]]).tag===i)return o.feature;if(r){var l=a.length;return O.assert(0===l||i>=a[l-1].tag,"Features must be added in alphabetical order."),a.push(o={tag:i,feature:{params:0,lookupListIndexes:[]}}),s.push(l),o.feature}}},getLookupTables:function(t,e,i,r,n){var o=this.getFeatureTable(t,e,i,n),s=[];if(o){for(var a,h=o.lookupListIndexes,l=this.font.tables[this.tableName].lookups,u=0;u<h.length;u++)(a=l[h[u]]).lookupType===r&&s.push(a);if(0===s.length&&n){var c=l.length;return l.push(a={lookupType:r,lookupFlag:0,subtables:[],markFilteringSet:void 0}),h.push(c),[a]}}return s},getGlyphClass:function(t,e){switch(t.format){case 1:return t.startGlyph<=e&&e<t.startGlyph+t.classes.length?t.classes[e-t.startGlyph]:0;case 2:var i=xe(t.ranges,e);return i?i.classId:0}},getCoverageIndex:function(t,e){switch(t.format){case 1:var i=be(t.glyphs,e);return 0<=i?i:-1;case 2:var r=xe(t.ranges,e);return r?r.index+e-r.start:-1}},expandCoverage:function(t){if(1===t.format)return t.glyphs;for(var e=[],i=t.ranges,r=0;r<i.length;r++)for(var n=i[r],o=n.end,s=n.start;s<=o;s++)e.push(s);return e}}).init=function(){var t=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(t)},Te.prototype.getKerningValue=function(t,e,i){for(var r=0;r<t.length;r++)for(var n=t[r].subtables,o=0;o<n.length;o++){var s=n[o],a=this.getCoverageIndex(s.coverage,e);if(!(a<0))switch(s.posFormat){case 1:for(var h=s.pairSets[a],l=0;l<h.length;l++){var u=h[l];if(u.secondGlyph===i)return u.value1&&u.value1.xAdvance||0}break;case 2:var c=this.getGlyphClass(s.classDef1,e),p=this.getGlyphClass(s.classDef2,i),f=s.classRecords[c][p];return f.value1&&f.value1.xAdvance||0}}return 0},Te.prototype.getKerningTables=function(t,e){if(this.font.tables.gpos)return this.getLookupTables(t,e,"kern",2)},(Se.prototype=we.prototype).createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Se.prototype.getSingle=function(t,e,i){for(var r=[],n=this.getLookupTables(e,i,t,1),o=0;o<n.length;o++)for(var s=n[o].subtables,a=0;a<s.length;a++){var h=s[a],l=this.expandCoverage(h.coverage),u=void 0;if(1===h.substFormat){var c=h.deltaGlyphId;for(u=0;u<l.length;u++){var p=l[u];r.push({sub:p,by:p+c})}}else{var f=h.substitute;for(u=0;u<l.length;u++)r.push({sub:l[u],by:f[u]})}}return r},Se.prototype.getAlternates=function(t,e,i){for(var r=[],n=this.getLookupTables(e,i,t,3),o=0;o<n.length;o++)for(var s=n[o].subtables,a=0;a<s.length;a++)for(var h=s[a],l=this.expandCoverage(h.coverage),u=h.alternateSets,c=0;c<l.length;c++)r.push({sub:l[c],by:u[c]});return r},Se.prototype.getLigatures=function(t,e,i){for(var r=[],n=this.getLookupTables(e,i,t,4),o=0;o<n.length;o++)for(var s=n[o].subtables,a=0;a<s.length;a++)for(var h=s[a],l=this.expandCoverage(h.coverage),u=h.ligatureSets,c=0;c<l.length;c++)for(var p=l[c],f=u[c],d=0;d<f.length;d++){var m=f[d];r.push({sub:[p].concat(m.components),by:m.ligGlyph})}return r},Se.prototype.addSingle=function(t,e,i,r){var n=Ee(this.getLookupTables(i,r,t,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});O.assert(1===n.coverage.format,"Ligature: unable to modify coverage table format "+n.coverage.format);var o=e.sub,s=this.binSearch(n.coverage.glyphs,o);s<0&&(n.coverage.glyphs.splice(s=-1-s,0,o),n.substitute.splice(s,0,0)),n.substitute[s]=e.by},Se.prototype.addAlternate=function(t,e,i,r){var n=Ee(this.getLookupTables(i,r,t,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});O.assert(1===n.coverage.format,"Ligature: unable to modify coverage table format "+n.coverage.format);var o=e.sub,s=this.binSearch(n.coverage.glyphs,o);s<0&&(n.coverage.glyphs.splice(s=-1-s,0,o),n.alternateSets.splice(s,0,0)),n.alternateSets[s]=e.by}
1,Se.prototype.addLigature=function(t,e,i,r){var n=this.getLookupTables(i,r,t,4,!0)[0],o=n.subtables[0];o||(n.subtables[0]=o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]}),O.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var s=e.sub[0],a=e.sub.slice(1),h={ligGlyph:e.by,components:a},l=this.binSearch(o.coverage.glyphs,s);if(0<=l){for(var u=o.ligatureSets[l],c=0;c<u.length;c++)if(Me(u[c].components,a))return;u.push(h)}else o.coverage.glyphs.splice(l=-1-l,0,s),o.ligatureSets.splice(l,0,[h])},Se.prototype.getFeature=function(t,e,i){if(/ss\d\d/.test(t))return this.getSingle(t,e,i);switch(t){case"aalt":case"salt":return this.getSingle(t,e,i).concat(this.getAlternates(t,e,i));case"dlig":case"liga":case"rlig":return this.getLigatures(t,e,i)}},Se.prototype.add=function(t,e,i,r){if(/ss\d\d/.test(t))return this.addSingle(t,e,i,r);switch(t){case"aalt":case"salt":return"number"==typeof e.by?this.addSingle(t,e,i,r):this.addAlternate(t,e,i,r);case"dlig":case"liga":case"rlig":return this.addLigature(t,e,i,r)}};var Le,Ie,Ne,Fe,Ue={getPath:De,parse:function(t,e,i,r){for(var n=new Tt.GlyphSet(r),o=0;o<i.length-1;o+=1){var s=i[o];n.push(o,s!==i[o+1]?Tt.ttfGlyphLoader(r,o,ke,t,e+s,Oe):Tt.glyphLoader(r,o))}return n}};function Be(t){this.font=t,this.getCommands=function(t){return Ue.getPath(t).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Ge(t){return t}function Ve(t){return Math.sign(t)*Math.round(Math.abs(t))}function qe(t){return Math.sign(t)*Math.round(Math.abs(2*t))/2}function ze(t){return Math.sign(t)*(Math.round(Math.abs(t)+.5)-.5)}function je(t){return Math.sign(t)*Math.ceil(Math.abs(t))}function He(t){return Math.sign(t)*Math.floor(Math.abs(t))}var Xe=function(t){var e=this.srPeriod,i=this.srPhase,r=1;return t<0&&(t=-t,r=-1),t+=this.srThreshold-i,t=Math.trunc(t/e)*e,(t+=i)<0?i*r:t*r},We={x:1,y:0,axis:"x",distance:function(t,e,i,r){return(i?t.xo:t.x)-(r?e.xo:e.x)},interpolate:function(t,e,i,r){var n,o,s,a,h,l,u;if(!r||r===this)return n=t.xo-e.xo,o=t.xo-i.xo,h=e.x-e.xo,l=i.x-i.xo,0===(u=(s=Math.abs(n))+(a=Math.abs(o)))?void(t.x=t.xo+(h+l)/2):void(t.x=t.xo+(h*a+l*s)/u);n=r.distance(t,e,!0,!0),o=r.distance(t,i,!0,!0),h=r.distance(e,e,!1,!0),l=r.distance(i,i,!1,!0),0!==(u=(s=Math.abs(n))+(a=Math.abs(o)))?We.setRelative(t,t,(h*a+l*s)/u,r,!0):We.setRelative(t,t,(h+l)/2,r,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(t,e,i,r,n){t.x=r&&r!==this?(n?e.xo:e.x)+i*r.x+(t.y-((n?e.yo:e.y)+i*r.y))/r.normalSlope:(n?e.xo:e.x)+i},slope:0,touch:function(t){t.xTouched=!0},touched:function(t){return t.xTouched},untouch:function(t){t.xTouched=!1}},Ye={x:0,y:1,axis:"y",distance:function(t,e,i,r){return(i?t.yo:t.y)-(r?e.yo:e.y)},interpolate:function(t,e,i,r){var n,o,s,a,h,l,u;if(!r||r===this)return n=t.yo-e.yo,o=t.yo-i.yo,h=e.y-e.yo,l=i.y-i.yo,0===(u=(s=Math.abs(n))+(a=Math.abs(o)))?void(t.y=t.yo+(h+l)/2):void(t.y=t.yo+(h*a+l*s)/u);n=r.distance(t,e,!0,!0),o=r.distance(t,i,!0,!0),h=r.distance(e,e,!1,!0),l=r.distance(i,i,!1,!0),0!==(u=(s=Math.abs(n))+(a=Math.abs(o)))?Ye.setRelative(t,t,(h*a+l*s)/u,r,!0):Ye.setRelative(t,t,(h+l)/2,r,!0)},normalSlope:0,setRelative:function(t,e,i,r,n){t.y=r&&r!==this?(n?e.yo:e.y)+i*r.y+r.normalSlope*(t.x-((n?e.xo:e.x)+i*r.x)):(n?e.yo:e.y)+i},slope:Number.POSITIVE_INFINITY,touch:function(t){t.yTouched=!0},touched:function(t){return t.yTouched},untouch:function(t){t.yTouched=!1}};function Ze(t,e){this.x=t,this.y=e,this.axis=void 0,this.slope=e/t,this.normalSlope=-t/e,Object.freeze(this)}function Qe(t,e){var i=Math.sqrt(t*t+e*e);return e/=i,1==(t/=i)&&0===e?We:0===t&&1===e?Ye:new Ze(t,e)}function $e(t,e,i,r){this.x=this.xo=Math.round(64*t)/64,this.y=this.yo=Math.round(64*e)/64,this.lastPointOfContour=i,this.onCurve=r,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(We),Object.freeze(Ye),Ze.prototype.distance=function(t,e,i,r){return this.x*We.distance(t,e,i,r)+this.y*Ye.distance(t,e,i,r)},Ze.prototype.interpolate=function(t,e,i,r){var n,o,s,a,h,l,u;s=r.distance(t,e,!0,!0),a=r.distance(t,i,!0,!0),n=r.distance(e,e,!1,!0),o=r.distance(i,i,!1,!0),0!==(u=(h=Math.abs(s))+(l=Math.abs(a)
1))?this.setRelative(t,t,(n*l+o*h)/u,r,!0):this.setRelative(t,t,(n+o)/2,r,!0)},Ze.prototype.setRelative=function(t,e,i,r,n){var o=(r=r||this).normalSlope,s=this.slope,a=t.x,h=t.y;t.x=(s*a-o*((n?e.xo:e.x)+i*r.x)+((n?e.yo:e.y)+i*r.y)-h)/(s-o),t.y=s*(t.x-a)+h},Ze.prototype.touch=function(t){t.xTouched=!0,t.yTouched=!0},$e.prototype.nextTouched=function(t){for(var e=this.nextPointOnContour;!t.touched(e)&&e!==this;)e=e.nextPointOnContour;return e},$e.prototype.prevTouched=function(t){for(var e=this.prevPointOnContour;!t.touched(e)&&e!==this;)e=e.prevPointOnContour;return e};var Ke=Object.freeze(new $e(0,0)),Je={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function ti(t,e){switch(this.env=t,this.stack=[],this.prog=e,t){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=We,this.round=Ve}}function ei(t){for(var e=t.tZone=new Array(t.gZone.length),i=0;i<e.length;i++)e[i]=new $e(0,0)}function ii(t,e){var i,r=t.prog,n=t.ip,o=1;do{if(88===(i=r[++n]))o++;else if(89===i)o--;else if(64===i)n+=r[n+1]+1;else if(65===i)n+=2*r[n+1]+1;else if(176<=i&&i<=183)n+=i-176+1;else if(184<=i&&i<=191)n+=2*(i-184+1);else if(e&&1===o&&27===i)break}while(0<o);t.ip=n}function ri(t,i){e.DEBUG&&console.log(i.step,"SVTCA["+t.axis+"]"),i.fv=i.pv=i.dpv=t}function ni(t,i){e.DEBUG&&console.log(i.step,"SPVTCA["+t.axis+"]"),i.pv=i.dpv=t}function oi(t,i){e.DEBUG&&console.log(i.step,"SFVTCA["+t.axis+"]"),i.fv=t}function si(t,i){var r,n,o=i.stack,s=o.pop(),a=o.pop(),h=i.z2[s],l=i.z1[a];e.DEBUG&&console.log("SPVTL["+t+"]",s,a),n=t?(r=h.y-l.y,l.x-h.x):(r=l.x-h.x,l.y-h.y),i.pv=i.dpv=Qe(r,n)}function ai(t,i){var r,n,o=i.stack,s=o.pop(),a=o.pop(),h=i.z2[s],l=i.z1[a];e.DEBUG&&console.log("SFVTL["+t+"]",s,a),n=t?(r=h.y-l.y,l.x-h.x):(r=l.x-h.x,l.y-h.y),i.fv=Qe(r,n)}function hi(t){e.DEBUG&&console.log(t.step,"POP[]"),t.stack.pop()}function li(t,i){var r=i.stack.pop(),n=i.z0[r],o=i.fv,s=i.pv;e.DEBUG&&console.log(i.step,"MDAP["+t+"]",r);var a=s.distance(n,Ke);t&&(a=i.round(a)),o.setRelative(n,Ke,a,s),o.touch(n),i.rp0=i.rp1=r}function ui(t,i){var r,n,o,s=i.z2,a=s.length-2;e.DEBUG&&console.log(i.step,"IUP["+t.axis+"]");for(var h=0;h<a;h++)t.touched(r=s[h])||(n=r.prevTouched(t))!==r&&(n===(o=r.nextTouched(t))&&t.setRelative(r,r,t.distance(n,n,!1,!0),t,!0),t.interpolate(r,n,o,t))}function ci(t,i){for(var r=i.stack,n=(t?i.z0:i.z1)[t?i.rp1:i.rp2],o=i.fv,s=i.pv,a=i.loop,h=i.z2;a--;){var l=r.pop(),u=h[l],c=s.distance(n,n,!1,!0);o.setRelative(u,u,c,s),o.touch(u),e.DEBUG&&console.log(i.step,(1<i.loop?"loop "+(i.loop-a)+": ":"")+"SHP["+(t?"rp1":"rp2")+"]",l)}i.loop=1}function pi(t,i){var r=(t?i.z0:i.z1)[t?i.rp1:i.rp2],n=i.fv,o=i.pv,s=i.stack.pop(),a=i.z2[i.contours[s]],h=a;e.DEBUG&&console.log(i.step,"SHC["+t+"]",s);for(var l=o.distance(r,r,!1,!0);h!==r&&n.setRelative(h,h,l,o),(h=h.nextPointOnContour)!==a;);}function fi(t,i){var r,n,o=(t?i.z0:i.z1)[t?i.rp1:i.rp2],s=i.fv,a=i.pv,h=i.stack.pop();switch(e.DEBUG&&console.log(i.step,"SHZ["+t+"]",h),h){case 0:r=i.tZone;break;case 1:r=i.gZone;break;default:throw new Error("Invalid zone")}for(var l=a.distance(o,o,!1,!0),u=r.length-2,c=0;c<u;c++)s.setRelative(n=r[c],n,l,a)}function di(t,i){var r=i.stack,n=r.pop()/64,o=r.pop(),s=i.z1[o],a=i.fv;a.setRelative(s,i.z0[i.rp0],n,i.pv),a.touch(s),e.DEBUG&&console.log(i.step,"MSIRP["+t+"]",n,o),i.rp1=i.rp0,i.rp2=o,t&&(i.rp0=o)}function mi(t,i){var r=i.stack,n=r.pop(),o=r.pop(),s=i.z0[o],a=i.fv,h=i.pv,l=i.cvt[n];e.DEBUG&&console.log(i.step,"MIAP["+t+"]",n,"(",l,")",o);var u=h.distance(s,Ke);t&&(Math.abs(u-l)<i.cvCutIn&&(u=l),u=i.round(u)),a.setRelative(s,Ke,u,h),0===i.zp0&&(s.xo=s.x,s.yo=s.y),a.touch(s),i.rp0=i.rp1=o}function yi(t,i){var r=i.stack,n=r.pop(),o=i.z2[n];e.DEBUG&&console.log(i.step,"GC["+t+"]",n),r.push(64*i.dpv.distance(o,Ke,t,!1))}function gi(t,i){var r=i.stack,n=r.pop(),o=r.pop(),s=i.dpv.distance(i.z0[o],i.z1[n],t,t);e.DEBUG&&console.log(i.step,"MD["+t+"]",n,o,"->",s),i.stack.push(Math.round(64*s))}function vi(t,i){var r=i.stack,n=r.pop(),o=i.fv,s=i.pv,a=i.ppem,h=i.deltaBase+16*(t-1),l=i.deltaShift,u=i.z0;e.DEBUG&&console.log(i.step,"DELTAP["+t+"]",n,r);for(var c=0;c<n;c++){var p=r.pop(),f=r.pop();if(h+((240&f)>>4)===a){var d=(15&f)-8;0<=d&&d++,e.DEBUG&&console.log(i.step,"DELTAPFIX",p,"by",d*l);var m=u[p];o.setRelative(m,m,d*l,s)}}}function _i(t,i){var r=i.stack,n=r.pop();e.DEBUG&&console.log(i.step,"ROUND[]"),r.push(64*i.round(n/64))}function bi(t,i){var r=i.stack,n=r.pop(),o=i.ppem,s=i.deltaBase+16*(t-1),a=i.deltaShift;e.DEBUG&&console.log(i.step,"DELTAC["+t+"]",n,r);for(var h=0;h<n;h++){var l=r.pop(),u=r.pop();if(s+((240&u)>>4)===o){var c=(15&u)-8;0<=c&&c++;var p=c*a;e.DEBUG&&console.log(i.step,"DELTACFIX",l,"by",p),i.cvt[l]+=p}}}function xi(t,i){var r,n,o=i.stack,s=o.pop(),a=o.pop(),h=i.z2[s],l=i.z1[a];e.DEBUG&&console.log(i.step,"SDPVTL["+t+"]",s,a),n=t?(r=h.y-l.y,l.x-h.x):(r=l.x-h.x,l.y-h.y),i.dpv=Qe(r,n)}function wi(t,i){var r=i.stack,n=i.prog,o=i.ip;e.DEBUG&&console.log(i.step,"PUSHB["+t+"]");for(var s=0;s<t;s++)r.push(n[++o]);i.ip=o}function Ti(t,i){var r=i.ip,n=i.prog,o=i.stack;e.DEBUG&&console.log(i.ip,"PUSHW["+t+"]");for(var s=0;s<t;s++){var a=n[++r]<<8|n[++r];32768&a&&(a=-(1+(65535^a))),o.push(a)}i.ip=r}function Si(t,i,r,n,o,s){var a,h,l,u,c=s.stack,p=t&&c.pop(),f=c.pop(),d=s.z0[s.rp0],m=s.z1[f],y=s.minDis,g=s.fv,v=s.dpv;l=0<=(h=a=v.distance(m,d,!0,!0))?1:-1,h=Math.abs(h),t&&(u=s.cvt[p],n&&Math.abs(h-u)<s.cvCutIn&&(h=u)),r&&h<y&&(h=y),n&&(h=s.round(h)),g.setRelative(m,d,l*h,v),g.touch(m),e.DEBUG&&console.log(s.step,(t?"MIRP[":"MDRP[")+(i?"M":"m")+(r?">":"_")+(n?"R":"_")+(0===o?"Gr":1===o?"Bl":2===o?"Wh":"")+"]",t?p+"("+s.cvt[p]+","+u+")":"",f,"(d =",a,"->",l*h,")"),s.rp1=s.rp0,s.rp2=f,i&&(s.rp0=f)}Be.prototype.exec=function(t,i){if("number"!=typeof i)throw new Error("Point size is not a number!");if(!(2<this._errorState)){var r=this.font,n=this._prepState;if(!n||n.ppem!==i){var o=this._fpgmState;if(!o){ti.prototype=Je,(o=this._fpgmState=new ti("fpgm",r.tables.fpgm)).funcs=[],o.font=r,e.DEBUG&&(console.log("---EXEC FPGM---"),o.step=-1);try{Ie(o)}catch(t){return console.log("Hinting error in FPGM:"+t),void(this._errorState=3)}}ti.prototype=o,(n=this._prepState=new ti("prep",r.tables.prep)).ppem=i;var s=r.tables.cvt;if(s)for(var a=n.cvt=new Array(s.length),h=i/r.unitsPerEm,l=0;l<s.length;l++)a[l]=s[l]*h;else n.cvt=[];e.DEBUG&&(console.log("---EXEC PREP---"),n.step=-1);try{Ie(n)}catch(t){this._errorState<2&&console.log("Hinting error in PREP:"+t),this._errorState=2}}if(!(1<this._errorState))try{return Ne(t,n)}catch(t){return this._errorState<1&&(console.log("Hinting error:"+t),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},Ne=function(t,i){var r,n,o,s=i.ppem/i.font.unitsPerEm,a=s,h=t.components;if(ti.prototype=i,h){var l=i.font;n=[],r=[];for(var u=0;u<h.length;u++){var c=h[u],p=l.glyphs.get(c.glyphIndex);o=new ti("glyf",p.instructions),e.DEBUG&&(console.log("---EXEC COMP "+u+"---"),o.step=-1),Fe(p,o,s,a);for(var f=Math.round(c.dx*s),d=Math.round(c.dy*a),m=o.gZone,y=o.c
1ontours,g=0;g<m.length;g++){var v=m[g];v.xTouched=v.yTouched=!1,v.xo=v.x=v.x+f,v.yo=v.y=v.y+d}var _=n.length;n.push.apply(n,m);for(var b=0;b<y.length;b++)r.push(y[b]+_)}t.instructions&&!o.inhibitGridFit&&((o=new ti("glyf",t.instructions)).gZone=o.z0=o.z1=o.z2=n,o.contours=r,n.push(new $e(0,0),new $e(Math.round(t.advanceWidth*s),0)),e.DEBUG&&(console.log("---EXEC COMPOSITE---"),o.step=-1),Ie(o),n.length-=2)}else o=new ti("glyf",t.instructions),e.DEBUG&&(console.log("---EXEC GLYPH---"),o.step=-1),Fe(t,o,s,a),n=o.gZone;return n},Fe=function(t,i,r,n){for(var o,s,a=t.points||[],h=a.length,l=i.gZone=i.z0=i.z1=i.z2=[],u=i.contours=[],c=0;c<h;c++)l[c]=new $e((o=a[c]).x*r,o.y*n,o.lastPointOfContour,o.onCurve);for(var p=0;p<h;p++)o=l[p],s||(s=o,u.push(p)),o.lastPointOfContour?((o.nextPointOnContour=s).prevPointOnContour=o,s=void 0):(o.nextPointOnContour=l[p+1]).prevPointOnContour=o;if(!i.inhibitGridFit){if(e.DEBUG){console.log("PROCESSING GLYPH",i.stack);for(var f=0;f<h;f++)console.log(f,l[f].x,l[f].y)}if(l.push(new $e(0,0),new $e(Math.round(t.advanceWidth*r),0)),Ie(i),l.length-=2,e.DEBUG){console.log("FINISHED GLYPH",i.stack);for(var d=0;d<h;d++)console.log(d,l[d].x,l[d].y)}}},Ie=function(t){var i=t.prog;if(i){var r,n=i.length;for(t.ip=0;t.ip<n;t.ip++){if(e.DEBUG&&t.step++,!(r=Le[i[t.ip]]))throw new Error("unknown instruction: 0x"+Number(i[t.ip]).toString(16));r(t)}}},Le=[ri.bind(void 0,Ye),ri.bind(void 0,We),ni.bind(void 0,Ye),ni.bind(void 0,We),oi.bind(void 0,Ye),oi.bind(void 0,We),si.bind(void 0,0),si.bind(void 0,1),ai.bind(void 0,0),ai.bind(void 0,1),function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"SPVFS[]",r,n),t.pv=t.dpv=Qe(n,r)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"SPVFS[]",r,n),t.fv=Qe(n,r)},function(t){var i=t.stack,r=t.pv;e.DEBUG&&console.log(t.step,"GPV[]"),i.push(16384*r.x),i.push(16384*r.y)},function(t){var i=t.stack,r=t.fv;e.DEBUG&&console.log(t.step,"GFV[]"),i.push(16384*r.x),i.push(16384*r.y)},function(t){t.fv=t.pv,e.DEBUG&&console.log(t.step,"SFVTPV[]")},function(t){var i=t.stack,r=i.pop(),n=i.pop(),o=i.pop(),s=i.pop(),a=i.pop(),h=t.z0,l=t.z1,u=h[r],c=h[n],p=l[o],f=l[s],d=t.z2[a];e.DEBUG&&console.log("ISECT[], ",r,n,o,s,a);var m=u.x,y=u.y,g=c.x,v=c.y,_=p.x,b=p.y,x=f.x,w=f.y,T=(m-g)*(b-w)-(y-v)*(_-x),S=m*v-y*g,M=_*w-b*x;d.x=(S*(_-x)-M*(m-g))/T,d.y=(S*(b-w)-M*(y-v))/T},function(t){t.rp0=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP0[]",t.rp0)},function(t){t.rp1=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP1[]",t.rp1)},function(t){t.rp2=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP2[]",t.rp2)},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP0[]",i),t.zp0=i){case 0:t.tZone||ei(t),t.z0=t.tZone;break;case 1:t.z0=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP1[]",i),t.zp1=i){case 0:t.tZone||ei(t),t.z1=t.tZone;break;case 1:t.z1=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP2[]",i),t.zp2=i){case 0:t.tZone||ei(t),t.z2=t.tZone;break;case 1:t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZPS[]",i),t.zp0=t.zp1=t.zp2=i,i){case 0:t.tZone||ei(t),t.z0=t.z1=t.z2=t.tZone;break;case 1:t.z0=t.z1=t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){t.loop=t.stack.pop(),e.DEBUG&&console.log(t.step,"SLOOP[]",t.loop)},function(t){e.DEBUG&&console.log(t.step,"RTG[]"),t.round=Ve},function(t){e.DEBUG&&console.log(t.step,"RTHG[]"),t.round=ze},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SMD[]",i),t.minDis=i/64},function(t){e.DEBUG&&console.log(t.step,"ELSE[]"),ii(t,!1)},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"JMPR[]",i),t.ip+=i-1},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCVTCI[]",i),t.cvCutIn=i/64},void 0,void 0,function(t){var i=t.stack;e.DEBUG&&console.log(t.step,"DUP[]"),i.push(i[i.length-1])},hi,function(t){e.DEBUG&&console.log(t.step,"CLEAR[]"),t.stack.length=0},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"SWAP[]"),i.push(r),i.push(n)},function(t){var i=t.stack;e.DEBUG&&console.log(t.step,"DEPTH[]"),i.push(i.length)},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"CINDEX[]",r),i.push(i[i.length-r])},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"MINDEX[]",r),i.push(i.splice(i.length-r,1)[0])},void 0,void 0,void 0,function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"LOOPCALL[]",r,n);var o=t.ip,s=t.prog;t.prog=t.funcs[r];for(var a=0;a<n;a++)Ie(t),e.DEBUG&&console.log(++t.step,a+1<n?"next loopcall":"done loopcall",a);t.ip=o,t.prog=s},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"CALL[]",i);var r=t.ip,n=t.prog;t.prog=t.funcs[i],Ie(t),t.ip=r,t.prog=n,e.DEBUG&&console.log(++t.step,"returning from",i)},function(t){if("fpgm"!==t.env)throw new Error("FDEF not allowed here");var i=t.prog,r=t.ip,n=t.stack.pop(),o=r;for(e.DEBUG&&console.log(t.step,"FDEF[]",n);45!==i[++r];);t.ip=r,t.funcs[n]=i.slice(o+1,r)}
1,void 0,li.bind(void 0,0),li.bind(void 0,1),ui.bind(void 0,Ye),ui.bind(void 0,We),ci.bind(void 0,0),ci.bind(void 0,1),pi.bind(void 0,0),pi.bind(void 0,1),fi.bind(void 0,0),fi.bind(void 0,1),function(t){for(var i=t.stack,r=t.loop,n=t.fv,o=i.pop()/64,s=t.z2;r--;){var a=i.pop(),h=s[a];e.DEBUG&&console.log(t.step,(1<t.loop?"loop "+(t.loop-r)+": ":"")+"SHPIX[]",a,o),n.setRelative(h,h,o),n.touch(h)}t.loop=1},function(t){for(var i=t.stack,r=t.rp1,n=t.rp2,o=t.loop,s=t.z0[r],a=t.z1[n],h=t.fv,l=t.dpv,u=t.z2;o--;){var c=i.pop(),p=u[c];e.DEBUG&&console.log(t.step,(1<t.loop?"loop "+(t.loop-o)+": ":"")+"IP[]",c,r,"<->",n),h.interpolate(p,s,a,l),h.touch(p)}t.loop=1},di.bind(void 0,0),di.bind(void 0,1),function(t){for(var i=t.stack,r=t.z0[t.rp0],n=t.loop,o=t.fv,s=t.pv,a=t.z1;n--;){var h=i.pop(),l=a[h];e.DEBUG&&console.log(t.step,(1<t.loop?"loop "+(t.loop-n)+": ":"")+"ALIGNRP[]",h),o.setRelative(l,r,0,s),o.touch(l)}t.loop=1},function(t){e.DEBUG&&console.log(t.step,"RTDG[]"),t.round=qe},mi.bind(void 0,0),mi.bind(void 0,1),function(t){var i=t.prog,r=t.ip,n=t.stack,o=i[++r];e.DEBUG&&console.log(t.step,"NPUSHB[]",o);for(var s=0;s<o;s++)n.push(i[++r]);t.ip=r},function(t){var i=t.ip,r=t.prog,n=t.stack,o=r[++i];e.DEBUG&&console.log(t.step,"NPUSHW[]",o);for(var s=0;s<o;s++){var a=r[++i]<<8|r[++i];32768&a&&(a=-(1+(65535^a))),n.push(a)}t.ip=i},function(t){var i=t.stack,r=t.store;r||(r=t.store=[]);var n=i.pop(),o=i.pop();e.DEBUG&&console.log(t.step,"WS",n,o),r[o]=n},function(t){var i=t.stack,r=t.store,n=i.pop();e.DEBUG&&console.log(t.step,"RS",n),i.push(r&&r[n]||0)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"WCVTP",r,n),t.cvt[n]=r/64},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"RCVT",r),i.push(64*t.cvt[r])},yi.bind(void 0,0),yi.bind(void 0,1),void 0,gi.bind(void 0,0),gi.bind(void 0,1),function(t){e.DEBUG&&console.log(t.step,"MPPEM[]"),t.stack.push(t.ppem)},void 0,function(t){e.DEBUG&&console.log(t.step,"FLIPON[]"),t.autoFlip=!0},void 0,void 0,function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"LT[]",r,n),i.push(n<r?1:0)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"LTEQ[]",r,n),i.push(n<=r?1:0)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"GT[]",r,n),i.push(r<n?1:0)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"GTEQ[]",r,n),i.push(r<=n?1:0)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"EQ[]",r,n),i.push(r===n?1:0)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"NEQ[]",r,n),i.push(r!==n?1:0)},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"ODD[]",r),i.push(Math.trunc(r)%2?1:0)},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"EVEN[]",r),i.push(Math.trunc(r)%2?0:1)},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"IF[]",i),i||(ii(t,!0),e.DEBUG&&console.log(t.step,"EIF[]"))},function(t){e.DEBUG&&console.log(t.step,"EIF[]")},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"AND[]",r,n),i.push(r&&n?1:0)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"OR[]",r,n),i.push(r||n?1:0)},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"NOT[]",r),i.push(r?0:1)},vi.bind(void 0,1),function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SDB[]",i),t.deltaBase=i},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SDS[]",i),t.deltaShift=Math.pow(.5,i)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"ADD[]",r,n),i.push(n+r)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"SUB[]",r,n),i.push(n-r)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"DIV[]",r,n),i.push(64*n/r)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"MUL[]",r,n),i.push(n*r/64)},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"ABS[]",r),i.push(Math.abs(r))},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"NEG[]",r),i.push(-r)},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"FLOOR[]",r),i.push(64*Math.floor(r/64))},function(t){var i=t.stack,r=i.pop();e.DEBUG&&console.log(t.step,"CEILING[]",r),i.push(64*Math.ceil(r/64))}
1,_i.bind(void 0,0),_i.bind(void 0,1),_i.bind(void 0,2),_i.bind(void 0,3),void 0,void 0,void 0,void 0,function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"WCVTF[]",r,n),t.cvt[n]=r*t.ppem/t.font.unitsPerEm},vi.bind(void 0,2),vi.bind(void 0,3),bi.bind(void 0,1),bi.bind(void 0,2),bi.bind(void 0,3),function(t){var i,r=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SROUND[]",r),t.round=Xe,192&r){case 0:i=.5;break;case 64:i=1;break;case 128:i=2;break;default:throw new Error("invalid SROUND value")}switch(t.srPeriod=i,48&r){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*i;break;case 32:t.srPhase=.5*i;break;case 48:t.srPhase=.75*i;break;default:throw new Error("invalid SROUND value")}t.srThreshold=0==(r&=15)?0:(r/8-.5)*i},function(t){var i,r=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"S45ROUND[]",r),t.round=Xe,192&r){case 0:i=Math.sqrt(2)/2;break;case 64:i=Math.sqrt(2);break;case 128:i=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(t.srPeriod=i,48&r){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*i;break;case 32:t.srPhase=.5*i;break;case 48:t.srPhase=.75*i;break;default:throw new Error("invalid S45ROUND value")}t.srThreshold=0==(r&=15)?0:(r/8-.5)*i},void 0,void 0,function(t){e.DEBUG&&console.log(t.step,"ROFF[]"),t.round=Ge},void 0,function(t){e.DEBUG&&console.log(t.step,"RUTG[]"),t.round=je},function(t){e.DEBUG&&console.log(t.step,"RDTG[]"),t.round=He},hi,hi,void 0,void 0,void 0,void 0,void 0,function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCANCTRL[]",i)},xi.bind(void 0,0),xi.bind(void 0,1),function(t){var i=t.stack,r=i.pop(),n=0;e.DEBUG&&console.log(t.step,"GETINFO[]",r),1&r&&(n=35),32&r&&(n|=4096),i.push(n)},void 0,function(t){var i=t.stack,r=i.pop(),n=i.pop(),o=i.pop();e.DEBUG&&console.log(t.step,"ROLL[]"),i.push(n),i.push(r),i.push(o)},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"MAX[]",r,n),i.push(Math.max(n,r))},function(t){var i=t.stack,r=i.pop(),n=i.pop();e.DEBUG&&console.log(t.step,"MIN[]",r,n),i.push(Math.min(n,r))},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCANTYPE[]",i)},function(t){var i=t.stack.pop(),r=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"INSTCTRL[]",i,r),i){case 1:return void(t.inhibitGridFit=!!r);case 2:return void(t.ignoreCvt=!!r);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,wi.bind(void 0,1),wi.bind(void 0,2),wi.bind(void 0,3),wi.bind(void 0,4),wi.bind(void 0,5),wi.bind(void 0,6),wi.bind(void 0,7),wi.bind(void 0,8),Ti.bind(void 0,1),Ti.bind(void 0,2),Ti.bind(void 0,3),Ti.bind(void 0,4),Ti.bind(void 0,5),Ti.bind(void 0,6),Ti.bind(void 0,7),Ti.bind(void 0,8),Si.bind(void 0,0,0,0,0,0),Si.bind(void 0,0,0,0,0,1),Si.bind(void 0,0,0,0,0,2),Si.bind(void 0,0,0,0,0,3),Si.bind(void 0,0,0,0,1,0),Si.bind(void 0,0,0,0,1,1),Si.bind(void 0,0,0,0,1,2),Si.bind(void 0,0,0,0,1,3),Si.bind(void 0,0,0,1,0,0),Si.bind(void 0,0,0,1,0,1),Si.bind(void 0,0,0,1,0,2),Si.bind(void 0,0,0,1,0,3),Si.bind(void 0,0,0,1,1,0),Si.bind(void 0,0,0,1,1,1),Si.bind(void 0,0,0,1,1,2),Si.bind(void 0,0,0,1,1,3),Si.bind(void 0,0,1,0,0,0),Si.bind(void 0,0,1,0,0,1),Si.bind(void 0,0,1,0,0,2),Si.bind(void 0,0,1,0,0,3),Si.bind(void 0,0,1,0,1,0),Si.bind(void 0,0,1,0,1,1),Si.bind(void 0,0,1,0,1,2),Si.bind(void 0,0,1,0,1,3),Si.bind(void 0,0,1,1,0,0),Si.bind(void 0,0,1,1,0,1),Si.bind(void 0,0,1,1,0,2),Si.bind(void 0,0,1,1,0,3),Si.bind(void 0,0,1,1,1,0),Si.bind(void 0,0,1,1,1,1),Si.bind(void 0,0,1,1,1,2),Si.bind(void 0,0,1,1,1,3),Si.bind(void 0,1,0,0,0,0),Si.bind(void 0,1,0,0,0,1),Si.bind(void 0,1,0,0,0,2),Si.bind(void 0,1,0,0,0,3),Si.bind(void 0,1,0,0,1,0),Si.bind(void 0,1,0,0,1,1),Si.bind(void 0,1,0,0,1,2),Si.bind(void 0,1,0,0,1,3),Si.bind(void 0,1,0,1,0,0),Si.bind(void 0,1,0,1,0,1),Si.bind(void 0,1,0,1,0,2),Si.bind(void 0,1,0,1,0,3),Si.bind(void 0,1,0,1,1,0),Si.bind(void 0,1,0,1,1,1),Si.bind(void 0,1,0,1,1,2),Si.bind(void 0,1,0,1,1,3),Si.bind(void 0,1,1,0,0,0),Si.bind(void 0,1,1,0,0,1),Si.bind(void 0,1,1,0,0,2),Si.bind(void 0,1,1,0,0,3),Si.bind(void 0,1,1,0,1,0),Si.bind(void 0,1,1,0,1,1),Si.bind(void 0,1,1,0,1,2),Si.bind(void 0,1,1,0,1,3),Si.bind(void 0,1,1,1,0,0),Si.bind(void 0,1,1,1,0,1),Si.bind(void 0,1,1,1,0,2),Si.bind(void 0,1,1,1,0,3),Si.bind(void 0,1,1,1,1,0),Si.bind(void 0,1,1,1,1,1),Si.bind(void 0,1,1,1,1,2),Si.bind(void 0,1,1,1,1,3)];var Mi=Array.from||function(t){return t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[^\uD800-\uDFFF]|./g)||[]};function Ei(t){(t=t||{}).empty||(Ae(t.familyName,"When creating a new Font object, familyName is required."),Ae(t.styleName,"When creating a new Font object, styleName is required."),Ae(t.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Ae(t.ascender,"When creating a new Font object, ascender is required."),Ae(t.descender,"When creating a new Font object, descender is required."),Ae(t.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:t.familyName||" "}
1,fontSubfamily:{en:t.styleName||" "},fullName:{en:t.fullName||t.familyName+" "+t.styleName},postScriptName:{en:t.postScriptName||(t.familyName+t.styleName).replace(/\s/g,"")},designer:{en:t.designer||" "},designerURL:{en:t.designerURL||" "},manufacturer:{en:t.manufacturer||" "},manufacturerURL:{en:t.manufacturerURL||" "},license:{en:t.license||" "},licenseURL:{en:t.licenseURL||" "},version:{en:t.version||"Version 0.1"},description:{en:t.description||" "},copyright:{en:t.copyright||" "},trademark:{en:t.trademark||" "}},this.unitsPerEm=t.unitsPerEm||1e3,this.ascender=t.ascender,this.descender=t.descender,this.createdTimestamp=t.createdTimestamp,this.tables={os2:{usWeightClass:t.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:t.widthClass||this.usWidthClasses.MEDIUM,fsSelection:t.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Tt.GlyphSet(this,t.glyphs||[]),this.encoding=new mt(this),this.position=new Te(this),this.substitution=new Se(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Be(this):void 0}})}function Ci(t,e){var i=JSON.stringify(t),r=256;for(var n in e){var o=parseInt(n);if(o&&!(o<256)){if(JSON.stringify(e[n])===i)return o;r<=o&&(r=o+1)}}return e[r]=t,r}function Ai(t,e,i,r){for(var n=[{name:"nameID_"+t,type:"USHORT",value:Ci(e.name,r)},{name:"flags_"+t,type:"USHORT",value:0}],o=0;o<i.length;++o){var s=i[o].tag;n.push({name:"axis_"+t+" "+s,type:"FIXED",value:e.coordinates[s]<<16})}return n}function Pi(t,e,i,r){var n={},o=new lt.Parser(t,e);n.name=r[o.parseUShort()]||{},o.skip("uShort",1),n.coordinates={};for(var s=0;s<i.length;++s)n.coordinates[i[s].tag]=o.parseFixed();return n}Ei.prototype.hasChar=function(t){return null!==this.encoding.charToGlyphIndex(t)},Ei.prototype.charToGlyphIndex=function(t){return this.encoding.charToGlyphIndex(t)},Ei.prototype.charToGlyph=function(t){var e=this.charToGlyphIndex(t),i=this.glyphs.get(e);return i||(i=this.glyphs.get(0)),i},Ei.prototype.stringToGlyphs=function(t,e){e=e||this.defaultRenderOptions;for(var i=Mi(t),r=[],n=0;n<i.length;n+=1)r.push(this.charToGlyphIndex(i[n]));var o=r.length;if(e.features){var s=e.script||this.substitution.getDefaultScriptName(),a=[];e.features.liga&&(a=a.concat(this.substitution.getFeature("liga",s,e.language))),e.features.rlig&&(a=a.concat(this.substitution.getFeature("rlig",s,e.language)));for(var h=0;h<o;h+=1)for(var l=0;l<a.length;l++){for(var u=a[l],c=u.sub,p=c.length,f=0;f<p&&c[f]===r[h+f];)f++;f===p&&(r.splice(h,p,u.by),o=o-p+1)}}for(var d=new Array(o),m=this.glyphs.get(0),y=0;y<o;y+=1)d[y]=this.glyphs.get(r[y])||m;return d},Ei.prototype.nameToGlyphIndex=function(t){return this.glyphNames.nameToGlyphIndex(t)},Ei.prototype.nameToGlyph=function(t){var e=this.nameToGlyphIndex(t),i=this.glyphs.get(e);return i||(i=this.glyphs.get(0)),i},Ei.prototype.glyphIndexToName=function(t){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(t):""},Ei.prototype.getKerningValue=function(t,e){t=t.index||t,e=e.index||e;var i=this.position.defaultKerningTables;return i?this.position.getKerningValue(i,t,e):this.kerningPairs[t+","+e]||0},Ei.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},Ei.prototype.forEachGlyph=function(t,e,i,r,n,o){e=void 0!==e?e:0,i=void 0!==i?i:0;var s,a=1/this.unitsPerEm*(r=void 0!==r?r:72),h=this.stringToGlyphs(t,n=n||this.defaultRenderOptions);if(n.kerning){var l=n.script||this.position.getDefaultScriptName();s=this.position.getKerningTables(l,n.language)}for(var u=0;u<h.length;u+=1){var c=h[u];o.call(this,c,e,i,r,n),c.advanceWidth&&(e+=c.advanceWidth*a),n.kerning&&u<h.length-1&&(e+=(s?this.position.getKerningValue(s,c.index,h[u+1].index):this.getKerningValue(c,h[u+1]))*a),n.letterSpacing?e+=n.letterSpacing*r:n.tracking&&(e+=n.tracking/1e3*r)}return e},Ei.prototype.getPath=function(t,e,i,r,n){var o=new k;return this.forEachGlyph(t,e,i,r,n,function(t,e,i,r){var s=t.getPath(e,i,r,n,this);o.extend(s)}),o}
1,Ei.prototype.getPaths=function(t,e,i,r,n){var o=[];return this.forEachGlyph(t,e,i,r,n,function(t,e,i,r){var s=t.getPath(e,i,r,n,this);o.push(s)}),o},Ei.prototype.getAdvanceWidth=function(t,e,i){return this.forEachGlyph(t,0,0,e,i,function(){})},Ei.prototype.draw=function(t,e,i,r,n,o){this.getPath(e,i,r,n,o).draw(t)},Ei.prototype.drawPoints=function(t,e,i,r,n,o){this.forEachGlyph(e,i,r,n,o,function(e,i,r,n){e.drawPoints(t,i,r,n)})},Ei.prototype.drawMetrics=function(t,e,i,r,n,o){this.forEachGlyph(e,i,r,n,o,function(e,i,r,n){e.drawMetrics(t,i,r,n)})},Ei.prototype.getEnglishName=function(t){var e=this.names[t];if(e)return e.en},Ei.prototype.validate=function(){var t=this;function e(e){var i=t.getEnglishName(e);i&&i.trim()}e("fontFamily"),e("weightName"),e("manufacturer"),e("copyright"),e("version")},Ei.prototype.toTables=function(){return function(t){for(var e,i=[],r=[],n=[],o=[],s=[],a=[],h=[],l=0,u=0,c=0,p=0,f=0,d=0;d<t.glyphs.length;d+=1){var m=t.glyphs.get(d),y=0|m.unicode;if(isNaN(m.advanceWidth))throw new Error("Glyph "+m.name+" ("+d+"): advanceWidth is not a number.");(y<e||void 0===e)&&0<y&&(e=y),l<y&&(l=y);var g=ae.getUnicodeRange(y);if(g<32)u|=1<<g;else if(g<64)c|=1<<g-32;else if(g<96)p|=1<<g-64;else{if(!(g<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");f|=1<<g-96}if(".notdef"!==m.name){var v=m.getMetrics();i.push(v.xMin),r.push(v.yMin),n.push(v.xMax),o.push(v.yMax),a.push(v.leftSideBearing),h.push(v.rightSideBearing),s.push(m.advanceWidth)}}var _={xMin:Math.min.apply(null,i),yMin:Math.min.apply(null,r),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,o),advanceWidthMax:Math.max.apply(null,s),advanceWidthAvg:function(t){for(var e=0,i=0;i<t.length;i+=1)e+=t[i];return e/t.length}(s),minLeftSideBearing:Math.min.apply(null,a),maxLeftSideBearing:Math.max.apply(null,a),minRightSideBearing:Math.min.apply(null,h)};_.ascender=t.ascender,_.descender=t.descender;var b=qt.make({flags:3,unitsPerEm:t.unitsPerEm,xMin:_.xMin,yMin:_.yMin,xMax:_.xMax,yMax:_.yMax,lowestRecPPEM:3,createdTimestamp:t.createdTimestamp}),x=zt.make({ascender:_.ascender,descender:_.descender,advanceWidthMax:_.advanceWidthMax,minLeftSideBearing:_.minLeftSideBearing,minRightSideBearing:_.minRightSideBearing,xMaxExtent:_.maxLeftSideBearing+(_.xMax-_.xMin),numberOfHMetrics:t.glyphs.length}),w=Xt.make(t.glyphs.length),T=ae.make({xAvgCharWidth:Math.round(_.advanceWidthAvg),usWeightClass:t.tables.os2.usWeightClass,usWidthClass:t.tables.os2.usWidthClass,usFirstCharIndex:e,usLastCharIndex:l,ulUnicodeRange1:u,ulUnicodeRange2:c,ulUnicodeRange3:p,ulUnicodeRange4:f,fsSelection:t.tables.os2.fsSelection,sTypoAscender:_.ascender,sTypoDescender:_.descender,sTypoLineGap:0,usWinAscent:_.yMax,usWinDescent:Math.abs(_.yMin),ulCodePageRange1:1,sxHeight:ve(t,"xyvw",{yMax:Math.round(_.ascender/2)}).yMax,sCapHeight:ve(t,"HIKLEFJMNTZBDPRAGOQSUVWXY",_).yMax,usDefaultChar:t.hasChar(" ")?32:0,usBreakChar:t.hasChar(" ")?32:0}),S=jt.make(t.glyphs),M=ut.make(t.glyphs),E=t.getEnglishName("fontFamily"),C=t.getEnglishName("fontSubfamily"),A=E+" "+C,P=t.getEnglishName("postScriptName");P||(P=E.replace(/\s/g,"")+"-"+C);var k={};for(var R in t.names)k[R]=t.names[R];k.uniqueID||(k.uniqueID={en:t.getEnglishName("manufacturer")+":"+A}),k.postScriptName||(k.postScriptName={en:P}),k.preferredFamily||(k.preferredFamily=t.names.fontFamily),k.preferredSubfamily||(k.preferredSubfamily=t.names.fontSubfamily);var D=[],O=oe.make(k,D),L=0<D.length?Ht.make(D):void 0,I=he.make(),N=Vt.make(t.glyphs,{version:t.getEnglishName("version"),fullName:A,familyName:E,weightName:C,postScriptName:P,unitsPerEm:t.unitsPerEm,fontBBox:[0,_.yMin,_.ascender,_.advanceWidthMax]}),F=t.metas&&0<Object.keys(t.metas).length?fe.make(t.metas):void 0,U=[b,x,w,T,O,M,I,N,S];L&&U.push(L),t.tables.gsub&&U.push(pe.make(t.tables.gsub)),F&&U.push(F);for(var B=ge(U),G=me(B.encode()),V=B.fields,q=!1,z=0;z<V.length;z+=1)if("head table"===V[z].name){V[z].value.checkSumAdjustment=2981146554-G,q=!0;break}if(!q)throw new Error("Could not find head table with checkSum to adjust.");return B}(this)},Ei.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},Ei.prototype.toArrayBuffer=function(){for(var t=this.toTables().encode(),e=new ArrayBuffer(t.length),i=new Uint8Array(e),r=0;r<t.length;r++)i[r]=t[r];return e},Ei.prototype.download=function(e){var i=this.getEnglishName("fontFamily"),n=this.getEnglishName("fontSubfam
1ily");e=e||i.replace(/\s/g,"")+"-"+n+".otf";var o=this.toArrayBuffer();if("undefined"!=typeof window)window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,o.byteLength,function(t){t.root.getFile(e,{create:!0},function(t){t.createWriter(function(e){var i=new DataView(o),r=new Blob([i],{type:"font/opentype"});e.write(r),e.addEventListener("writeend",function(){location.href=t.toURL()},!1)})})},function(t){throw new Error(t.name+": "+t.message)});else{var s=t("fs"),a=function(t){for(var e=new r(t.byteLength),i=new Uint8Array(t),n=0;n<e.length;++n)e[n]=i[n];return e}(o);s.writeFileSync(e,a)}},Ei.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},Ei.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},Ei.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var ki={make:function(t,e){var i,r,n,o=new et.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:t.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:t.instances.length},{name:"instanceSize",type:"USHORT",value:4+4*t.axes.length}]);o.offsetToData=o.sizeOf();for(var s=0;s<t.axes.length;s++)o.fields=o.fields.concat((i=s,n=Ci((r=t.axes[s]).name,e),[{name:"tag_"+i,type:"TAG",value:r.tag},{name:"minValue_"+i,type:"FIXED",value:r.minValue<<16},{name:"defaultValue_"+i,type:"FIXED",value:r.defaultValue<<16},{name:"maxValue_"+i,type:"FIXED",value:r.maxValue<<16},{name:"flags_"+i,type:"USHORT",value:0},{name:"nameID_"+i,type:"USHORT",value:n}]));for(var a=0;a<t.instances.length;a++)o.fields=o.fields.concat(Ai(a,t.instances[a],t.axes,e));return o},parse:function(t,e,i){var r=new lt.Parser(t,e),n=r.parseULong();O.argument(65536===n,"Unsupported fvar table version.");var o=r.parseOffset16();r.skip("uShort",1);for(var s,a,h,l=r.parseUShort(),u=r.parseUShort(),c=r.parseUShort(),p=r.parseUShort(),f=[],d=0;d<l;d++)f.push((s=i,h=a=void 0,a={},h=new lt.Parser(t,e+o+d*u),a.tag=h.parseTag(),a.minValue=h.parseFixed(),a.defaultValue=h.parseFixed(),a.maxValue=h.parseFixed(),h.skip("uShort",1),a.name=s[h.parseUShort()]||{},a));for(var m=[],y=e+o+l*u,g=0;g<c;g++)m.push(Pi(t,y+g*p,f,i));return{axes:f,instances:m}}},Ri=new Array(10);Ri[1]=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();return 1===e?{posFormat:1,coverage:this.parsePointer(at.coverage),value:this.parseValueRecord()}:2===e?{posFormat:2,coverage:this.parsePointer(at.coverage),values:this.parseValueRecordList()}:void O.assert(!1,"0x"+t.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Ri[2]=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();O.assert(1===e||2===e,"0x"+t.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var i=this.parsePointer(at.coverage),r=this.parseUShort(),n=this.parseUShort();if(1===e)return{posFormat:e,coverage:i,valueFormat1:r,valueFormat2:n,pairSets:this.parseList(at.pointer(at.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(n)}})))};if(2===e){var o=this.parsePointer(at.classDef),s=this.parsePointer(at.classDef),a=this.parseUShort(),h=this.parseUShort();return{posFormat:e,coverage:i,valueFormat1:r,valueFormat2:n,classDef1:o,classDef2:s,class1Count:a,class2Count:h,classRecords:this.parseList(a,at.list(h,function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(n)}}))}}},Ri[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Ri[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Ri[5]=function(){return{error:"GPOS Lookup 5 not supported"}}
1,Ri[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Ri[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Ri[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Ri[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var Di=new Array(10),Oi={parse:function(t,e){var i=new at(t,e=e||0),r=i.parseVersion(1);return O.argument(1===r||1.1===r,"Unsupported GPOS table version "+r),1===r?{version:r,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(Ri)}:{version:r,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(Ri),variations:i.parseFeatureVariationsList()}},make:function(t){return new et.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new et.ScriptList(t.scripts)},{name:"features",type:"TABLE",value:new et.FeatureList(t.features)},{name:"lookups",type:"TABLE",value:new et.LookupList(t.lookups,Di)}])}},Li={parse:function(t,e){var i=new lt.Parser(t,e),r=i.parseUShort();if(0===r)return function(t){var e={};t.skip("uShort");var i=t.parseUShort();O.argument(0===i,"Unsupported kern sub-table version."),t.skip("uShort",2);var r=t.parseUShort();t.skip("uShort",3);for(var n=0;n<r;n+=1){var o=t.parseUShort(),s=t.parseUShort(),a=t.parseShort();e[o+","+s]=a}return e}(i);if(1===r)return function(t){var e={};t.skip("uShort"),1<t.parseULong()&&console.warn("Only the first kern subtable is supported."),t.skip("uLong");var i=255&t.parseUShort();if(t.skip("uShort"),0===i){var r=t.parseUShort();t.skip("uShort",3);for(var n=0;n<r;n+=1){var o=t.parseUShort(),s=t.parseUShort(),a=t.parseShort();e[o+","+s]=a}}return e}(i);throw new Error("Unsupported kern table version ("+r+").")}},Ii={parse:function(t,e,i,r){for(var n=new lt.Parser(t,e),o=r?n.parseUShort:n.parseULong,s=[],a=0;a<i+1;a+=1){var h=o.call(n);r&&(h*=2),s.push(h)}return s}};function Ni(t,e){for(var i=[],r=12,n=0;n<e;n+=1){var o=lt.getTag(t,r),s=lt.getULong(t,r+4),a=lt.getULong(t,r+8),h=lt.getULong(t,r+12);i.push({tag:o,checksum:s,offset:a,length:h,compression:!1}),r+=16}return i}function Fi(t,e){if("WOFF"!==e.compression)return{data:t,offset:e.offset};var i=new Uint8Array(t.buffer,e.offset+2,e.compressedLength-2),r=new Uint8Array(e.length);if(C(i,r),r.byteLength!==e.length)throw new Error("Decompression error: "+e.tag+" decompressed length doesn't match recorded length");return{data:new DataView(r.buffer,0),offset:0}}function Ui(t){var e,i,r,n,o,s,a,h,l,u,c,p,f,d,m=new Ei({empty:!0}),y=new DataView(t,0),g=[],v=lt.getTag(y,0);if(v===String.fromCharCode(0,1,0,0)||"true"===v||"typ1"===v)m.outlinesFormat="truetype",g=Ni(y,r=lt.getUShort(y,4));else if("OTTO"===v)m.outlinesFormat="cff",g=Ni(y,r=lt.getUShort(y,4));else{if("wOFF"!==v)throw new Error("Unsupported OpenType signature "+v);var _=lt.getTag(y,4);if(_===String.fromCharCode(0,1,0,0))m.outlinesFormat="truetype";else{if("OTTO"!==_)throw new Error("Unsupported OpenType flavor "+v);m.outlinesFormat="cff"}g=function(t,e){for(var i=[],r=44,n=0;n<e;n+=1){var o=lt.getTag(t,r),s=lt.getULong(t,r+4),a=lt.getULong(t,r+8),h=lt.getULong(t,r+12);i.push({tag:o,offset:s,compression:a<h&&"WOFF",compressedLength:a,length:h}),r+=20}return i}(y,r=lt.getUShort(y,12))}for(var b=0;b<r;b+=1){var x=g[b],w=void 0;switch(x.tag){case"cmap":w=Fi(y,x),m.tables.cmap=ut.parse(w.data,w.offset),m.encoding=new yt(m.tables.cmap);break;case"cvt ":w=Fi(y,x),d=new lt.Parser(w.data,w.offset),m.tables.cvt=d.parseShortList(x.length/2);break;case"fvar":o=x;break;case"fpgm":w=Fi(y,x),d=new lt.Parser(w.data,w.offset),m.tables.fpgm=d.parseByteList(x.length);break;case"head":w=Fi(y,x),m.tables.head=qt.parse(w.data,w.offset),m.unitsPerEm=m.tables.head.unitsPerEm,e=m.tables.head.indexToLocFormat;break;case"hhea":w=Fi(y,x),m.tables.hhea=zt.parse(w.data,w.offset),m.ascender=m.tables.hhea.ascender,m.descender=m.tables.hhea.descender,m.numberOfHMetrics=m.tables.hhea.numberOfHMetrics;break;case"hmtx":l=x;break;case"ltag":w=Fi(y,x),i=Ht.parse(w.data,w.offset);break;case"maxp":w=Fi(y,x),m.tables.maxp=Xt.parse(w.data,w.offset),m.numGlyphs=m.tables.maxp.numGlyphs;break;case"name":p=x;break;case"OS/2":w=Fi(y,x),m.tables.os2=ae.parse(w.data,w.offset);break;case"post":w=Fi(y,x),m.tables.post=he.parse(w.data,w.offset),m.glyphNames=new vt(m.tables.post);break;case"prep":w=Fi(y,x),d=new lt.Parser(w.data,w.offset),m.tables.prep=d.parseByteList(x.length);break;case"glyf":s=x;break;case"loca":c=x;break;case"CFF ":n=x;break;case"kern":u=x;break;case"GPOS":a=x;break;case"GSUB":h=x;break;case"meta":f=x}}var T=Fi(y,p);if(m.tables.name=oe.parse(T.data,T.offset,i),m.names=m.tables.name,s&&c){var S=0===e,M=Fi(y,c),E=Ii.parse(M.data,M.offset,m.numGlyphs,S),C=Fi(y,s);m.glyphs=Ue.parse(C.data,C.offset,E,m)}else{if(!n)throw new Error("Font doesn't contain TrueType or CFF outlines.");var A=Fi(y,n);Vt.parse(A.data,A.offset,m)}var P=Fi(y,l);if(jt.parse(P.data,P.offset,m.numberOfHMetrics,m.numGlyphs,m.glyphs),function(t){for(var e,i=t.tables.cmap.glyphIndexMap,r=Object.keys(i),n=0;n<r.length;n+=1){var o=r[n];(e=t.glyphs.get(i[o])).addUnicode(parseInt(o))}for(var s=0;s<t.glyphs.length;s+=1)e=t.glyphs.get(s),t.cffEncoding?e.name=t.isCIDFont?"gid"+s:t.cffEncoding.charset[s]:t.glyphNames.names&&(e.name=t.glyphNames.glyphIndexToName(s))}(m),u){var k=Fi(y,u);m.kerningPairs=Li.parse(k.data,k.offset)}else m.kerningPairs={};if(a){var R=Fi(y,a);m.tables.gpos=Oi.parse(R.data,R.offset),m.position.init()}if(h){var D=Fi(y,h);m.tables.gsub=pe.parse(D.data,D.offset)}if(o){var O=Fi(y,o);m.tables.fvar=ki.parse(O.data,O.offset,m.names)}if(f){var L=Fi(y,f);m.tables.meta=fe.parse(L.data,L.offset),m.metas=m.tables.meta}return m}e.Font=Ei,e.Glyph=bt,e.Path=k,e.BoundingBox=P,e._parse=lt,e.parse=Ui,e.load=function(e,i){("undefined"==typeof window?function(e,i){t("fs").readFile(e,function(t,e){if(t)return i(t.message);i(null,Ce(e))})}:function(t,e){var i=new XMLHttpRequest;i.open("get",t,!0),i.responseType="arraybuffer",i.onload=function(){return i.response?e(null,i.response):e("Font could not be loaded: "+i.statusText)},i.onerror=function(){e("Font could not be loaded")},i.send()})(e,function(t,e){if(t)return i(t);var r;try{r=Ui(e)}catch(t){return i(t,null)}return i(null,r)}
vendor: 9,004 bytes, line 1
1)},e.loadSync=function(e){return Ui(Ce(t("fs").readFileSync(e)))},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof i&&void 0!==e?i:this.opentype={})}).call(this,t("buffer").Buffer)},{buffer:3,fs:2}],10:[function(t,e,i){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function h(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(t){r=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var l,u=[],c=!1,p=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):p=-1,u.length&&d())}function d(){if(!c){var t=h(f);c=!0;for(var e=u.length;e;){for(l=u,u=[];++p<e;)l&&l[p].run();p=-1,e=u.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new m(t,e)),1!==u.length||c||h(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],11:[function(t,e,i){!function(t){"use strict";if(!t.fetch){var e="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),n="FormData"in t,o="ArrayBuffer"in t;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=function(t){return t&&DataView.prototype.isPrototypeOf(t)},h=ArrayBuffer.isView||function(t){return t&&-1<s.indexOf(Object.prototype.toString.call(t))};d.prototype.append=function(t,e){t=c(t),e=p(e);var i=this.map[t];this.map[t]=i?i+","+e:e},d.prototype.delete=function(t){delete this.map[c(t)]},d.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},d.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},d.prototype.set=function(t,e){this.map[c(t)]=p(e)},d.prototype.forEach=function(t,e){for(var i in this.map)this.map.hasOwnProperty(i)&&t.call(e,this.map[i],i,this)},d.prototype.keys=function(){var t=[];return this.forEach(function(e,i){t.push(i)}),f(t)},d.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},d.prototype.entries=function(){var t=[];return this.forEach(function(e,i){t.push([i,e])}),f(t)},i&&(d.prototype[Symbol.iterator]=d.prototype.entries);var l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},_.call(b.prototype),_.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var u=[301,302,303,307,308];w.redirect=function(t,e){if(-1===u.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},t.Headers=d,t.Request=b,t.Response=w,t.fetch=function(t,e){return new Promise(function(i,n){var o=new b(t,e),s=new XMLHttpRequest;s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new d,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var i=t.split(":"),r=i.shift().trim();if(r){var n=i.join(":").trim();e.append(r,n)}}),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL"),i(new w("response"in s?s.response:s.responseText,r))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&r&&(s.responseType="blob"),o.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function p(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i&&(e[Symbol.iterator]=function(){return e}),e}function d(t){this.map={},t instanceof d?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function m(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function y(t){return new Promise(function(e,i){t.onload=function(){e(t.result)},t.onerror=function(){i(t.error)}})}function g(t){var e=new FileReader,i=y(e);return e.readAsArrayBuffer(t),i}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function _(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t)if("string"==typeof t)this._bodyText=t;else if(r&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(n&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(o&&r&&a(t))this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!o||!ArrayBuffer.prototype.isPrototypeOf(t)&&!h(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=v(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var t=m(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var t,e,i,r=m(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,i=y(e=new FileReader),e.readAsText(t),i;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),i=new Array(e.length),r=0;r<e.length;r++)i[r]=String.fromCharCode(e[r]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(t,e){var i,r,n=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new d(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new d(e.headers)),this.method=(r=(i=e.method||this.method||"GET").toUpperCase(),-1<l.indexOf(r)?r:i),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function x(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var i=t.split("="),r=i.shift().replace(/\+/g," "),n=i.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(n))}}),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new d(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},{}
1],12:[function(t,e,i){"use strict";var r=t("./core/main");t("./core/constants"),t("./core/environment"),t("./core/error_helpers"),t("./core/helpers"),t("./core/legacy"),t("./core/p5.Element"),t("./core/p5.Graphics"),t("./core/p5.Renderer"),t("./core/p5.Renderer2D"),t("./core/rendering"),t("./core/shim"),t("./core/structure"),t("./core/transform"),t("./core/shape/2d_primitives"),t("./core/shape/attributes"),t("./core/shape/curves"),t("./core/shape/vertex"),t("./color/color_conversion"),t("./color/creating_reading"),t("./color/p5.Color"),t("./color/setting"),t("./data/p5.TypedDict"),t("./data/local_storage.js"),t("./events/acceleration"),t("./events/keyboard"),t("./events/mouse"),t("./events/touch"),t("./image/filters"),t("./image/image"),t("./image/loading_displaying"),t("./image/p5.Image"),t("./image/pixels"),t("./io/files"),t("./io/p5.Table"),t("./io/p5.TableRow"),t("./io/p5.XML"),t("./math/calculation"),t("./math/math"),t("./math/noise"),t("./math/p5.Vector"),t("./math/random"),t("./math/trigonometry"),t("./typography/attributes"),t("./typography/loading_displaying"),t("./typography/p5.Font"),t("./utilities/array_functions"),t("./utilities/conversion"),t("./utilities/string_functions"),t("./utilities/time_date"),t("./webgl/3d_primitives"),t("./webgl/interaction"),t("./webgl/light"),t("./webgl/loading"),t("./webgl/material"),t("./webgl/p5.Camera"),t("./webgl/p5.Geometry"),t("./webgl/p5.Matrix"),t("./webgl/p5.RendererGL.Immediate"),t("./webgl/p5.RendererGL"),t("./webgl/p5.RendererGL.Retained"),t("./webgl/p5.Shader"),t("./webgl/p5.Texture"),t("./webgl/text"),t("./core/init"),e.exports=r},{"./color/color_conversion":13,"./color/creating_reading":14,"./color/p5.Color":15,"./color/setting":16,"./core/constants":17,"./core/environment":18,"./core/error_helpers":19,"./core/helpers":20,"./core/init":21,"./core/legacy":22,"./core/main":23,"./core/p5.Element":24,"./core/p5.Graphics":25,"./core/p5.Renderer":26,"./core/p5.Renderer2D":27,"./core/rendering":28,"./core/shape/2d_primitives":29,"./core/shape/attributes":30,"./core/shape/curves":31,"./core/shape/vertex":32,"./core/shim":33,"./core/structure":34,"./core/transform":35,"./data/local_storage.js":36,"./data/p5.TypedDict":37,"./events/acceleration":38,"./events/keyboard":39,"./events/mouse":40,"./events/touch":41,"./image/filters":42,"./image/image":43,"./image/loading_displaying":44,"./image/p5.Image":45,"./image/pixels":46,"./io/files":47,"./io/p5.Table":48,"./io/p5.TableRow":49,"./io/p5.XML":50,"./math/calculation":51,"./math/math":52,"./math/noise":53,"./math/p5.Vector":54,"./math/random":55,"./math/trigonometry":56,"./typography/attributes":57,"./typography/loading_displaying":58,"./typography/p5.Font":59,"./utilities/array_functions":60,"./utilities/conversion":61,"./utilities/string_functions":62,"./utilities/time_date":63,"./webgl/3d_primitives":64,"./webgl/interaction":65,"./webgl/light":66,"./webgl/loading":67,"./webgl/material":68,"./webgl/p5.Camera":69,"./webgl/p5.Geometry":70,"./webgl/p5.Matrix":71,"./webgl/p5.RendererGL":74,"./webgl/p5.RendererGL.Immediate":72,"./webgl/p5.RendererGL.Retained":73,"./webgl/p5.Shader":75,"./webgl/p5.Texture":76,"./webgl/text":77}],13:[function(t,e,i){"use strict";var r=t("../core/main");r.ColorConversion={},r.ColorConversion._hsbaToHSLA=function(t){var e=t[1],i=t[2],r=(2-e)*i/2;return 0!==r&&(1===r?e=0:r<.5?e/=2-e:e=e*i/(2-2*r)),[t[0],e,r,t[3]]},r.ColorConversion._hsbaToRGBA=function(t){var e=6*t[0],i=t[1],r=t[2],n=[];if(0===i)n=[r,r,r,t[3]];else{var o,s,a,h=Math.floor(e),l=r*(1-i),u=r*(1-i*(e-h)),c=r*(1-i*(1+h-e));a=1===h?(o=u,s=r,l):2===h?(o=l,s=r,c):3===h?(o=l,s=u,r):4===h?(o=c,s=l,r):5===h?(o=r,s=l,u):(o=r,s=c,l),n=[o,s,a,t[3]]}return n},r.ColorConversion._hslaToHSBA=function(t){var e,i=t[1],r=t[2];return[t[0],i=2*((e=r<.5?(1+i)*r:r+i-r*i)-r)/e,e,t[3]]},r.ColorConversion._hslaToRGBA=function(t){var e=6*t[0],i=t[1],r=t[2],n=[];if(0===i)n=[r,r,r,t[3]];else{var o,s=2*r-(o=r<.5?(1+i)*r:r+i-r*i),a=function(t,e,i){return t<0?t+=6:6<=t&&(t-=6),t<1?e+(i-e)*t:t<3?i:t<4?e+(i-e)*(4-t):e};n=[a(e+2,s,o),a(e,s,o),a(e-2,s,o),t[3]]}return n},r.ColorConversion._rgbaToHSBA=function(t){var e,i,r=t[0],n=t[1],o=t[2],s=Math.max(r,n,o),a=s-Math.min(r,n,o);return 0===a?i=e=0:(i=a/s,r===s?e=(n-o)/a:n===s?e=2+(o-r)/a:o===s&&(e=4+(r-n)/a),e<0?e+=6:6<=e&&(e-=6)),[e/6,i,s,t[3]]},r.ColorConversion._rgbaToHSLA=function(t){var e,i,r=t[0],n=t[1],o=t[2],s=Math.max(r,n,o),a=Math.min(r,n,o),h=s+a,l=s-a;return 0===l?i=e=0:(i=h<1?l/h:l/(2-h),r===s?e=(n-o)/l:n===s?e=2+(o-r)/l:o===s&&(e=4+(r-n)/l),e<0?e+=6:6<=e&&(e-=6)),[e/6,i,h/2,t[3]]},e.exports=r.ColorConversion},{"../core/main":23}
vendor: 9,687 bytes, line 1
1],14:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");t("./p5.Color"),t("../core/error_helpers"),r.prototype.alpha=function(t){return r._validateParameters("alpha",arguments),this.color(t)._getAlpha()},r.prototype.blue=function(t){return r._validateParameters("blue",arguments),this.color(t)._getBlue()},r.prototype.brightness=function(t){return r._validateParameters("brightness",arguments),this.color(t)._getBrightness()},r.prototype.color=function(){if(r._validateParameters("color",arguments),arguments[0]instanceof r.Color)return arguments[0];var t=arguments[0]instanceof Array?arguments[0]:arguments;return new r.Color(this,t)},r.prototype.green=function(t){return r._validateParameters("green",arguments),this.color(t)._getGreen()},r.prototype.hue=function(t){return r._validateParameters("hue",arguments),this.color(t)._getHue()},r.prototype.lerpColor=function(t,e,i){r._validateParameters("lerpColor",arguments);var o,s,a,h,l,u,c=this._colorMode,p=this._colorMaxes;if(c===n.RGB)l=t.levels.map(function(t){return t/255}),u=e.levels.map(function(t){return t/255});else if(c===n.HSB)t._getBrightness(),e._getBrightness(),l=t.hsba,u=e.hsba;else{if(c!==n.HSL)throw new Error(c+"cannot be used for interpolation.");t._getLightness(),e._getLightness(),l=t.hsla,u=e.hsla}return i=Math.max(Math.min(i,1),0),void 0===this.lerp&&(this.lerp=function(t,e,i){return i*(e-t)+t}),o=this.lerp(l[0],u[0],i),s=this.lerp(l[1],u[1],i),a=this.lerp(l[2],u[2],i),h=this.lerp(l[3],u[3],i),this.color(o*=p[c][0],s*=p[c][1],a*=p[c][2],h*=p[c][3])},r.prototype.lightness=function(t){return r._validateParameters("lightness",arguments),this.color(t)._getLightness()},r.prototype.red=function(t){return r._validateParameters("red",arguments),this.color(t)._getRed()},r.prototype.saturation=function(t){return r._validateParameters("saturation",arguments),this.color(t)._getSaturation()},e.exports=r},{"../core/constants":17,"../core/error_helpers":19,"../core/main":23,"./p5.Color":15}],15:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants"),o=t("./color_conversion");r.Color=function(t,e){if(this._storeModeAndMaxes(t._colorMode,t._colorMaxes),this.mode!==n.RGB&&this.mode!==n.HSL&&this.mode!==n.HSB)throw new Error(this.mode+" is an invalid colorMode.");return this._array=r.Color._parseInputs.apply(this,e),this._calculateLevels(),this},r.Color.prototype.toString=function(t){var e=this.levels,i=this._array,r=i[3];switch(t){case"#rrggbb":return"#".concat(e[0]<16?"0".concat(e[0].toString(16)):e[0].toString(16),e[1]<16?"0".concat(e[1].toString(16)):e[1].toString(16),e[2]<16?"0".concat(e[2].toString(16)):e[2].toString(16));case"#rrggbbaa":return"#".concat(e[0]<16?"0".concat(e[0].toString(16)):e[0].toString(16),e[1]<16?"0".concat(e[1].toString(16)):e[1].toString(16),e[2]<16?"0".concat(e[2].toString(16)):e[2].toString(16),e[3]<16?"0".concat(e[2].toString(16)):e[3].toString(16));case"#rgb":return"#".concat(Math.round(15*i[0]).toString(16),Math.round(15*i[1]).toString(16),Math.round(15*i[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*i[0]).toString(16),Math.round(15*i[1]).toString(16),Math.round(15*i[2]).toString(16),Math.round(15*i[3]).toString(16));case"rgb":return"rgb(".concat(e[0],", ",e[1],", ",e[2],")");case"rgb%":return"rgb(".concat((100*i[0]).toPrecision(3),"%, ",(100*i[1]).toPrecision(3),"%, ",(100*i[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*i[0]).toPrecision(3),"%, ",(100*i[1]).toPrecision(3),"%, ",(100*i[2]).toPrecision(3),"%, ",(100*i[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=o._rgbaToHSBA(this._array)),"hsb(".concat(this.hsba[0]*this.maxes[n.HSB][0],", ",this.hsba[1]*this.maxes[n.HSB][1],", ",this.hsba[2]*this.maxes[n.HSB][2],")");case"hsb%":case"hsv%":return this.hsba||(this.hsba=o._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=o._rgbaToHSBA(this._array)),"hsba(".concat(this.hsba[0]*this.maxes[n.HSB][0],", ",this.hsba[1]*this.maxes[n.HSB][1],", ",this.hsba[2]*this.maxes[n.HSB][2],", ",r,")");case"hsba%":case"hsva%":return this.hsba||(this.hsba=o._rgbaToHSBA(this._array)),"hsba(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%, ",(100*r).toPrecision(3),"%)");case"hsl":return this.hsla||(this.hsla=o._rgbaToHSLA(this._array)),"hsl(".concat(this.hsla[0]*this.maxes[n.HSL][0],", ",this.hsla[1]*this.maxes[n.HSL][1],", ",this.hsla[2]*this.maxes[n.HSL][2],")");case"hsl%":return this.hsla||(this.hsla=o._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=o._rgbaToHSLA(this._array)),"hsla(".concat(this.hsla[0]*this.maxes[n.HSL][0],", ",this.hsla[1]*this.maxes[n.HSL][1],", ",this.hsla[2]*this.maxes[n.HSL][2],", ",r,")");case"hsla%":return this.hsla||(this.hsla=o._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%, ",(100*r).toPrecision(3),"%)");case"rgba":default:return"rgba(".concat(e[0],",",e[1],",",e[2],",",r,")")}},r.Color.prototype.setRed=function(t){this._array[0]=t/this.maxes[n.RGB][0],this._calculateLevels()},r.Color.prototype.setGreen=function(t){this._array[1]=t/this.maxes[n.RGB][1],this._calculateLevels()},r.Color.prototype.setBlue=function(t){this._array[2]=t/this.maxes[n.RGB][2],this._calculateLevels()},r.Color.prototype.setAlpha=function(t){this._array[3]=t/this.maxes[this.mode][3],this._calculateLevels()},r.Color.prototype._calculateLevels=function(){for(var t=this._array,e=this.levels=new Array(t.length),i=t.length-1;0<=i;--i)e[i]=Math.round(255*t[i])},r.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},r.Color.prototype._storeModeAndMaxes=function(t,e){this.mode=t,this.maxes=e},r.Color.prototype._getMode=function(){return this.mode},r.Color.prototype._getMaxes=function(){return this.maxes},r.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[n.RGB][2]},r.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=o._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[n.HSB][2]},r.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[n.RGB][1]},r.Color.prototype._getHue=function(){return this.mode===n.HSB?(this.hsba||(this.hsba=o._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[n.HSB][0]):(this.hsla||(this.hsla=o._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[n.HSL][0])},r.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=o._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[n.HSL][2]},r.Color.prototype._getRed=function(){return this._array[0]*this.maxes[n.RGB][0]},r.Color.prototype._getSaturation=function(){return this.mode===n.HSB?(this.hsba||(this.hsba=o._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[n.HSB][1]):(this.hsla||(this.hsla=o._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[n.HSL][1])};var s={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",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
1almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},a=/\s*/,h=/(\d{1,3})/,l=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,u=new RegExp(l.source+"%"),c={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\\(",h.source,",",h.source,",",h.source,"\\)$"].join(a.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",u.source,",",u.source,",",u.source,"\\)$"].join(a.source),"i"),RGBA:new RegExp(["^rgba\\(",h.source,",",h.source,",",h.source,",",l.source,"\\)$"].join(a.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",u.source,",",u.source,",",u.source,",",l.source,"\\)$"].join(a.source),"i"),HSL:new RegExp(["^hsl\\(",h.source,",",u.source,",",u.source,"\\)$"].join(a.source),"i"),HSLA:new RegExp(["^hsla\\(",h.source,",",u.source,",",u.source,",",l.source,"\\)$"].join(a.source),"i"),HSB:new RegExp(["^hsb\\(",h.source,",",u.source,",",u.source,"\\)$"].join(a.source),"i"),HSBA:new RegExp(["^hsba\\(",h.source,",",u.source,",",u.source,",",l.source,"\\)$"].join(a.source),"i")};r.Color._parseInputs=function(t,e,i,a){var h,l=arguments.length,u=this.mode,p=this.maxes[u],f=[];if(3<=l){for(f[0]=t/p[0],f[1]=e/p[1],f[2]=i/p[2],f[3]="number"==typeof a?a/p[3]:1,h=f.length-1;0<=h;--h){var d=f[h];d<0?f[h]=0:1<d&&(f[h]=1)}return u===n.HSL?o._hslaToRGBA(f):u===n.HSB?o._hsbaToRGBA(f):f}if(1===l&&"string"==typeof t){var m=t.trim().toLowerCase();if(s[m])return r.Color._parseInputs.call(this,s[m]);if(c.HEX3.test(m))return(f=c.HEX3.exec(m).slice(1).map(function(t){return parseInt(t+t,16)/255}))[3]=1,f;if(c.HEX6.test(m))return(f=c.HEX6.exec(m).slice(1).map(function(t){return parseInt(t,16)/255}))[3]=1,f;if(c.HEX4.test(m))return c.HEX4.exec(m).slice(1).map(function(t){return parseInt(t+t,16)/255});if(c.HEX8.test(m))return c.HEX8.exec(m).slice(1).map(function(t){return parseInt(t,16)/255});if(c.RGB.test(m))return(f=c.RGB.exec(m).slice(1).map(function(t){return t/255}))[3]=1,f;if(c.RGB_PERCENT.test(m))return(f=c.RGB_PERCENT.exec(m).slice(1).map(function(t){return parseFloat(t)/100}))[3]=1,f;if(c.RGBA.test(m))return c.RGBA.exec(m).slice(1).map(function(t,e){return 3===e?parseFloat(t):t/255});if(c.RGBA_PERCENT.test(m))return c.RGBA_PERCENT.exec(m).slice(1).map(function(t,e){return 3===e?parseFloat(t):parseFloat(t)/100});if(c.HSL.test(m)?(f=c.HSL.exec(m).slice(1).map(function(t,e){return 0===e?parseInt(t,10)/360:parseInt(t,10)/100}))[3]=1:c.HSLA.test(m)&&(f=c.HSLA.exec(m).slice(1).map(function(t,e){return 0===e?parseInt(t,10)/360:3===e?parseFloat(t):parseInt(t,10)/100})),(f=f.map(function(t){return Math.max(Math.min(t,1),0)})).length)return o._hslaToRGBA(f);if(c.HSB.test(m)?(f=c.HSB.exec(m).slice(1).map(function(t,e){return 0===e?parseInt(t,10)/360:parseInt(t,10)/100}))[3]=1:c.HSBA.test(m)&&(f=c.HSBA.exec(m).slice(1).map(function(t,e){return 0===e?parseInt(t,10)/360:3===e?parseFloat(t):parseInt(t,10)/100})),f.length){for(h=f.length-1;0<=h;--h)f[h]=Math.max(Math.min(f[h],1),0);return o._hsbaToRGBA(f)}f=[1,1,1,1]}else{if(1!==l&&2!==l||"number"!=typeof t)throw new Error(arguments+"is not a valid color representation.");f[0]=t/p[2],f[1]=t/p[2],f[2]=t/p[2],f[3]="number"==typeof e?e/p[3]:1,f=f.map(function(t){return Math.max(Math.min(t,1),0)})}return f},e.exports=r.Color},{"../core/constants":17,"../core/main":23,"./color_conversion":13}],16:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");t("./p5.Color"),r.prototype.background=function(){return this._renderer.background.apply(this._renderer,arguments),this},r.prototype.clear=function(){return this._renderer.clear(),this}
1,r.prototype.colorMode=function(t,e,i,o,s){if(r._validateParameters("colorMode",arguments),t===n.RGB||t===n.HSB||t===n.HSL){this._colorMode=t;var a=this._colorMaxes[t];2===arguments.length?(a[0]=e,a[1]=e,a[2]=e,a[3]=e):4===arguments.length?(a[0]=e,a[1]=i,a[2]=o):5===arguments.length&&(a[0]=e,a[1]=i,a[2]=o,a[3]=s)}return this},r.prototype.fill=function(){return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),this._renderer.fill.apply(this._renderer,arguments),this},r.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},r.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},r.prototype.stroke=function(){return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),this._renderer.stroke.apply(this._renderer,arguments),this},e.exports=r},{"../core/constants":17,"../core/main":23,"./p5.Color":15}],17:[function(t,e,i){"use strict";var r=Math.PI;e.exports={P2D:"p2d",WEBGL:"webgl",ARROW:"default",CROSS:"crosshair",HAND:"pointer",MOVE:"move",TEXT:"text",WAIT:"wait",HALF_PI:r/2,PI:r,QUARTER_PI:r/4,TAU:2*r,TWO_PI:2*r,DEGREES:"degrees",RADIANS:"radians",DEG_TO_RAD:r/180,RAD_TO_DEG:180/r,CORNER:"corner",CORNERS:"corners",RADIUS:"radius",RIGHT:"right",LEFT:"left",CENTER:"center",TOP:"top",BOTTOM:"bottom",BASELINE:"alphabetic",POINTS:0,LINES:1,LINE_STRIP:3,LINE_LOOP:2,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,QUADS:"quads",QUAD_STRIP:"quad_strip",CLOSE:"close",OPEN:"open",CHORD:"chord",PIE:"pie",PROJECT:"square",SQUARE:"butt",ROUND:"round",BEVEL:"bevel",MITER:"miter",RGB:"rgb",HSB:"hsb",HSL:"hsl",AUTO:"auto",ALT:18,BACKSPACE:8,CONTROL:17,DELETE:46,DOWN_ARROW:40,ENTER:13,ESCAPE:27,LEFT_ARROW:37,OPTION:18,RETURN:13,RIGHT_ARROW:39,SHIFT:16,TAB:9,UP_ARROW:38,BLEND:"source-over",ADD:"lighter",DARKEST:"darken",LIGHTEST:"lighten",DIFFERENCE:"difference",SUBTRACT:"subtract",EXCLUSION:"exclusion",MULTIPLY:"multiply",SCREEN:"screen",REPLACE:"copy",OVERLAY:"overlay",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DODGE:"color-dodge",BURN:"color-burn",THRESHOLD:"threshold",GRAY:"gray",OPAQUE:"opaque",INVERT:"invert",POSTERIZE:"posterize",DILATE:"dilate",ERODE:"erode",BLUR:"blur",NORMAL:"normal",ITALIC:"italic",BOLD:"bold",BOLDITALIC:"bold italic",_DEFAULT_TEXT_FILL:"#000000",_DEFAULT_LEADMULT:1.25,_CTX_MIDDLE:"middle",LINEAR:"linear",QUADRATIC:"quadratic",BEZIER:"bezier",CURVE:"curve",STROKE:"stroke",FILL:"fill",TEXTURE:"texture",IMMEDIATE:"immediate",IMAGE:"image",NEAREST:"nearest",REPEAT:"repeat",CLAMP:"clamp",MIRROR:"mirror",LANDSCAPE:"landscape",PORTRAIT:"portrait",_DEFAULT_STROKE:"#000000",_DEFAULT_FILL:"#FFFFFF",GRID:"grid",AXES:"axes"}},{}],18:[function(t,e,i){"use strict";var r=t("./main"),n=t("./constants"),o=[n.ARROW,n.CROSS,n.HAND,n.MOVE,n.TEXT,n.WAIT];r.prototype._frameRate=0,r.prototype._lastFrameTime=window.performance.now(),r.prototype._targetFrameRate=60;var s=window.print;function a(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function h(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}r.prototype.print=function(){arguments.length?console.log.apply(console,arguments):s()},r.prototype.frameCount=0,r.prototype.deltaTime=0,r.prototype.focused=document.hasFocus(),r.prototype.cursor=function(t,e,i){var r="auto",n=this._curElement.elt;if(-1<o.indexOf(t))r=t;else if("string"==typeof t){var s="";e&&i&&"number"==typeof e&&"number"==typeof i&&(s=e+" "+i),r="http://"===t.substring(0,7)||"https://"===t.substring(0,8)?"url("+t+") "+s+", auto":/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(t)?"url("+t+") "+s+", auto":t}n.style.cursor=r},r.prototype.frameRate=function(t){return r._validateParameters("frameRate",arguments),"number"!=typeof t||t<0?this._frameRate:(this._setProperty("_targetFrameRate",t),this)},r.prototype.getFrameRate=function(){return this.frameRate()},r.prototype.setFrameRate=function(t){return this.frameRate(t)},r.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},r.prototype.displayWidth=screen.width,r.prototype.displayHeight=screen.height,r.prototype.windowWidth=a(),r.prototype.windowHeight=h(),r.prototype._onresize=function(t){this._setProperty("windowWidth",a()),this._setProperty("windowHeight",h());var e,i=this._isGlobal?window:this;"function"==typeof i.windowResized&&(void 0===(e=i.windowResized(t))||e||t.preventDefault())},r.prototype.width=0,r.prototype.height=0,r.prototype.fullscreen=function(t){if(r._validateParameters("fullscreen",arguments),void 0===t)return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;t?function(t){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw new Error("Fullscreen not enabled in this browser.");t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}(document.documentElement):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},r.prototype.pixelDensity=function(t){var e;return r._validateParameters("pixelDensity",arguments),"number"==typeof t?(t!==this._pixelDensity&&(this._pixelDensity=t,this._pixelsDirty=!0),(e=this).resizeCanvas(this.width,this.height,!0)):e=this._pixelDensity,e},r.prototype.displayDensity=function(){return window.devicePixelRatio},r.prototype.getURL=function(){return location.href},r.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(t){return""!==t})},r.prototype.getURLParams=function(){for(var t,e=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,i={};null!=(t=e.exec(location.search));)t.index===e.lastIndex&&e.lastIndex++,i[t[1]]=t[2];return i},e.exports=r},{"./constants":17,"./main":23}
1],19:[function(t,e,i){"use strict";var r=t("./main");t("./constants"),r._validateParameters=r._friendlyFileLoadError=r._friendlyError=function(){};var n=null,o=function(e,i){var o,s;i||(i=console.log.bind(console)),n||(o={},(n=[].concat((s=function(t){return Object.getOwnPropertyNames(t).filter(function(t){return"_"!==t[0]&&!(t in o)&&(o[t]=!0)}).map(function(e){var i;return i="function"==typeof t[e]?"function":e===e.toUpperCase()?"constant":"variable",{name:e,type:i}})})(r.prototype),s(t("./constants")))).sort(function(t,e){return e.name.length-t.name.length})),n.some(function(t){if(e.message&&null!==e.message.match("\\W?"+t.name+"\\W"))return i("Did you just try to use p5.js's "+t.name+("function"===t.type?"() ":" ")+t.type+"? If so, you may want to move it into your sketch's setup() function.\n\nFor more details, see: https://github.com/processing/p5.js/wiki/p5.js-overview#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup"),!0})};r.prototype._helpForMisusedAtTopLevelCode=o,"complete"!==document.readyState&&(window.addEventListener("error",o,!1),window.addEventListener("load",function(){window.removeEventListener("error",o,!1)})),e.exports=r},{"../../docs/reference/data.json":void 0,"./constants":17,"./main":23}],20:[function(t,e,i){"use strict";var r=t("./constants");e.exports={modeAdjust:function(t,e,i,n,o){return o===r.CORNER?{x:t,y:e,w:i,h:n}:o===r.CORNERS?{x:t,y:e,w:i-t,h:n-e}:o===r.RADIUS?{x:t-i,y:e-n,w:2*i,h:2*n}:o===r.CENTER?{x:t-.5*i,y:e-.5*n,w:i,h:n}:void 0}}},{"./constants":17}],21:[function(t,e,i){"use strict";var r=t("../core/main"),n=function(){window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!r.instance&&new r};"complete"===document.readyState?n():window.addEventListener("load",n,!1)},{"../core/main":23}],22:[function(t,e,i){"use strict";var r=t("./main");r.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},r.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},r.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},r.prototype.printMatrix=function(){throw new Error("printMatrix() is not implemented in p5.js, refer to [https://simonsarris.com/a-transformation-class-for-canvas-to-keep-track-of-the-transformation-matrix/] to add your own implementation.")},r.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")},e.exports=r},{"./main":23}],23:[function(t,e,i){"use strict";t("./shim");var r=t("./constants"),n=function t(e,i,r){this._setupDone=!1,this._pixelDensity=Math.ceil(window.devicePixelRatio)||1,this._userNode=i,this._curElement=null,this._elements=[],this._glAttributes=null,this._requestAnimId=0,this._preloadCount=0,this._isGlobal=!1,this._loop=!0,this._initializeInstanceVariables(),this._defaultCanvasSize={width:100,height:100},this._events={mousemove:null,mousedown:null,mouseup:null,dragend:null,dragover:null,click:null,dblclick:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,touchstart:null,touchmove:null,touchend:null,resize:null,blur:null},this._events.wheel=null,this._loadingScreenId="p5_loading",this._registeredMethods={};for(var n=Object.getOwnPropertyNames(t.prototype._registeredMethods),o=0;o<n.length;o++){var s=n[o];this._registeredMethods[s]=t.prototype._registeredMethods[s].slice()}window.DeviceOrientationEvent&&(this._events.deviceorientation=null),window.DeviceMotionEvent&&!window._isNodeWebkit&&(this._events.devicemotion=null),this._start=(function(){this._userNode&&"string"==typeof this._userNode&&(this._userNode=document.getElementById(this._userNode));var e=(this._isGlobal?window:this).preload;if(e){var i=document.getElementById(this._loadingScreenId);i||((i=document.createElement("div")).innerHTML="Loading...",i.style.position="absolute",i.id=this._loadingScreenId,(this._userNode||document.body).appendChild(i));var r=this._preloadMethods;for(var n in r){r[n]=r[n]||t;var o=r[n];o!==t.prototype&&o!==t||(this._isGlobal&&(window[n]=this._wrapPreload(this,n)),o=this),this._registeredPreloadMethods[n]=o[n],o[n]=this._wrapPreload(o,n)}e(),this._runIfPreloadsAreDone()}else this._setup(),this._draw()}).bind(this),this._runIfPreloadsAreDone=function(){var t=this._isGlobal?window:this;if(0===t._preloadCount){var e=document.getElementById(t._loadingScreenId);e&&e.parentNode.removeChild(e),t._setup(),t._draw()}},this._decrementPreload=function(){var t=this._isGlobal?window:this;"function"==typeof t.preload&&(t._setProperty("_preloadCount",t._preloadCount-1),t._runIfPreloadsAreDone())},this._wrapPreload=function(t,e){return(function(){return this._incrementPreload(),this._registeredPreloadMethods[e].apply(t,arguments)}).bind(this)},this._incrementPreload=function(){var t=this._isGlobal?window:this;t._setProperty("_preloadCount",t._preloadCount+1)},this._setup=(function(){this.createCanvas(this._defaultCanvasSize.width,this._defaultCanvasSize.height,"p2d");var t=this._isGlobal?window:this;if("function"==typeof t.preload)for(var e in this._preloadMethods)t[e]=this._preloadMethods[e][e],t[e]&&this&&(t[e]=t[e].bind(this));"function"==typeof t.setup&&t.setup();for(var i=document.getElementsByTagName("canvas"),r=0;r<i.length;r++){var n=i[r];"true"===n.dataset.hidden&&(n.style.visibility="",delete n.dataset.hidden)}this._setupDone=!0}).bind(this),this._draw=(function(){var t=window.performance.now();(!this._loop||1e3/this._targetFrameRate-5<=t-this._lastFrameTime)&&(this.redraw(),this._frameRate=1e3/(t-this._lastFrameTime),this.deltaTime=t-this._lastFrameTime,this._setProperty("deltaT
1ime",this.deltaTime),this._lastFrameTime=t,void 0!==this._updateMouseCoords&&this._updateMouseCoords()),this._loop&&(this._requestAnimId=window.requestAnimationFrame(this._draw))}).bind(this),this._setProperty=(function(t,e){this[t]=e,this._isGlobal&&(window[t]=e)}).bind(this),this.remove=(function(){var e=document.getElementById(this._loadingScreenId);if(e&&(e.parentNode.removeChild(e),this._incrementPreload()),this._curElement){for(var i in this._loop=!1,this._requestAnimId&&window.cancelAnimationFrame(this._requestAnimId),this._events)window.removeEventListener(i,this._events[i]);for(var r=0;r<this._elements.length;r++){var n=this._elements[r];for(var o in n.elt.parentNode&&n.elt.parentNode.removeChild(n.elt),n._events)n.elt.removeEventListener(o,n._events[o])}var s=this;this._registeredMethods.remove.forEach(function(t){void 0!==t&&t.call(s)})}if(this._isGlobal){for(var a in t.prototype)try{delete window[a]}catch(e){window[a]=void 0}for(var h in this)if(this.hasOwnProperty(h))try{delete window[h]}catch(e){window[h]=void 0}t.instance=null}}).bind(this),this._registeredMethods.init.forEach(function(t){void 0!==t&&t.call(this)},this);var a=this._createFriendlyGlobalFunctionBinder();if(e)e(this);else{for(var h in this._isGlobal=!0,t.instance=this,t.prototype)if("function"==typeof t.prototype[h]){var l=h.substring(2);this._events.hasOwnProperty(l)||(Math.hasOwnProperty(h)&&Math[h]===t.prototype[h]?a(h,t.prototype[h]):a(h,t.prototype[h].bind(this)))}else a(h,t.prototype[h]);for(var u in this)this.hasOwnProperty(u)&&a(u,this[u])}for(var c in this._events){var p=this["_on"+c];if(p){var f=p.bind(this);window.addEventListener(c,f,{passive:!1}),this._events[c]=f}}var d=(function(){this._setProperty("focused",!0)}).bind(this),m=(function(){this._setProperty("focused",!1)}).bind(this);window.addEventListener("focus",d),window.addEventListener("blur",m),this.registerMethod("remove",function(){window.removeEventListener("focus",d),window.removeEventListener("blur",m)}),"complete"===document.readyState?this._start():window.addEventListener("load",this._start.bind(this),!1)};for(var o in n.prototype._initializeInstanceVariables=function(){this._styles=[],this._bezierDetail=20,this._curveDetail=20,this._colorMode=r.RGB,this._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},this._pixelsDirty=!0,this._downKeys={}},n.instance=null,n.disableFriendlyErrors=!1,r)n.prototype[o]=r[o];n.prototype._preloadMethods={loadJSON:n.prototype,loadImage:n.prototype,loadStrings:n.prototype,loadXML:n.prototype,loadBytes:n.prototype,loadTable:n.prototype,loadFont:n.prototype,loadModel:n.prototype,loadShader:n.prototype},n.prototype._registeredMethods={init:[],pre:[],post:[],remove:[]},n.prototype._registeredPreloadMethods={},n.prototype.registerPreloadMethod=function(t,e){n.prototype._preloadMethods.hasOwnProperty(t)||(n.prototype._preloadMethods[t]=e)},n.prototype.registerMethod=function(t,e){var i=this||n.prototype;i._registeredMethods.hasOwnProperty(t)||(i._registeredMethods[t]=[]),i._registeredMethods[t].push(e)},n.prototype._createFriendlyGlobalFunctionBinder=function(t){var e=(t=t||{}).globalObject||window;return t.log||console.log.bind(console),function(t,i){e[t]=i}},e.exports=n},{"./constants":17,"./shim":33}],24:[function(t,e,i){"use strict";var r=t("./main");r.Element=function(t,e){this.elt=t,this._pInst=this._pixelsState=e,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight},r.Element.prototype.parent=function(t){return void 0===t?this.elt.parentNode:("string"==typeof t?("#"===t[0]&&(t=t.substring(1)),t=document.getElementById(t)):t instanceof r.Element&&(t=t.elt),t.appendChild(this.elt),this)},r.Element.prototype.id=function(t){return void 0===t?this.elt.id:(this.elt.id=t,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)},r.Element.prototype.class=function(t){return void 0===t?this.elt.className:(this.elt.className=t,this)},r.Element.prototype.mousePressed=function(t){return r.Element._adjustListener("mousedown",function(e){return this._pInst._setProperty("mouseIsPressed",!0),this._pInst._setMouseButton(e),t.call(this)},this),this},r.Element.prototype.doubleClicked=function(t){return r.Element._adjustListener("dblclick",t,this),this},r.Element.prototype.mouseWheel=function(t){return r.Element._adjustListener("wheel",t,this),this},r.Element.prototype.mouseReleased=function(t){return r.Element._adjustListener("mouseup",t,this),this},r.Element.prototype.mouseClicked=function(t){return r.Element._adjustListener("click",t,this),this},r.Element.prototype.mouseMoved=function(t){return r.Element._adjustListener("mousemove",t,this),this},r.Element.prototype.mouseOver=function(t){return r.Element._adjustListener("mouseover",t,this),this},r.Element.prototype.mouseOut=function(t){return r.Element._adjustListener("mouseout",t,this),this},r.Element.prototype.touchStarted=function(t){return r.Element._adjustListener("touchstart",t,this),this},r.Element.prototype.touchMoved=function(t){return r.Element._adjustListener("touchmove",t,this),this},r.Element.prototype.touchEnded=function(t){return r.Element._adjustListener("touchend",t,this),this},r.Element.prototype.dragOver=function(t){return r.Element._adjustListener("dragover",t,this),this},r.Element.prototype.dragLeave=function(t){return r.Element._adjustListener("dragleave",t,this),this}
1,r.Element._adjustListener=function(t,e,i){return!1===e?r.Element._detachListener(t,i):r.Element._attachListener(t,e,i),this},r.Element._attachListener=function(t,e,i){i._events[t]&&r.Element._detachListener(t,i);var n=e.bind(i);i.elt.addEventListener(t,n,!1),i._events[t]=n},r.Element._detachListener=function(t,e){e.elt.removeEventListener(t,e._events[t],!1),e._events[t]=null},r.Element.prototype._setProperty=function(t,e){this[t]=e},e.exports=r.Element},{"./main":23}],25:[function(t,e,i){"use strict";var r=t("./main"),n=t("./constants");r.Graphics=function(t,e,i,o){var s=i||n.P2D;this.canvas=document.createElement("canvas");var a=o._userNode||document.body;for(var h in a.appendChild(this.canvas),r.Element.call(this,this.canvas,o),r.prototype)this[h]||(this[h]="function"==typeof r.prototype[h]?r.prototype[h].bind(this):r.prototype[h]);return r.prototype._initializeInstanceVariables.apply(this),this.width=t,this.height=e,this._pixelDensity=o._pixelDensity,this._renderer=s===n.WEBGL?new r.RendererGL(this.canvas,this,!1):new r.Renderer2D(this.canvas,this,!1),o._elements.push(this),this._renderer.resize(t,e),this._renderer._applyDefaults(),this},r.Graphics.prototype=Object.create(r.Element.prototype),r.Graphics.prototype.reset=function(){this._renderer.resetMatrix(),this._renderer.isP3D&&this._renderer._update()},r.Graphics.prototype.remove=function(){this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt);var t=this._pInst._elements.indexOf(this);for(var e in-1!==t&&this._pInst._elements.splice(t,1),this._events)this.elt.removeEventListener(e,this._events[e])},e.exports=r.Graphics},{"./constants":17,"./main":23}],26:[function(t,e,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=t("./main"),o=t("../core/constants");function s(t){var e=0,i=0;if(t.offsetParent)for(;e+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;);else e+=t.offsetLeft,i+=t.offsetTop;return[e,i]}n.Renderer=function(t,e,i){n.Element.call(this,t,e),this.canvas=t,this._pixelsState=e,i?(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=o.NORMAL,this._textAscent=null,this._textDescent=null,this._textAlign=o.LEFT,this._textBaseline=o.BASELINE,this._rectMode=o.CORNER,this._ellipseMode=o.CENTER,this._curveTightness=0,this._imageMode=o.CORNER,this._tint=null,this._doStroke=!0,this._doFill=!0,this._strokeSet=!1,this._fillSet=!1},n.Renderer.prototype=Object.create(n.Element.prototype),n.Renderer.prototype.push=function(){return{properties:{_doStroke:this._doStroke,_strokeSet:this._strokeSet,_doFill:this._doFill,_fillSet:this._fillSet,_tint:this._tint,_imageMode:this._imageMode,_rectMode:this._rectMode,_ellipseMode:this._ellipseMode,_textFont:this._textFont,_textLeading:this._textLeading,_textSize:this._textSize,_textAlign:this._textAlign,_textBaseline:this._textBaseline,_textStyle:this._textStyle}}},n.Renderer.prototype.pop=function(t){t.properties&&Object.assign(this,t.properties)},n.Renderer.prototype.resize=function(t,e){this.width=t,this.height=e,this.elt.width=t*this._pInst._pixelDensity,this.elt.height=e*this._pInst._pixelDensity,this.elt.style.width=t+"px",this.elt.style.height=e+"px",this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))},n.Renderer.prototype.get=function(t,e,i,r){var o=this._pixelsState,s=o._pixelDensity,a=this.canvas;if(void 0===t&&void 0===e)t=e=0,i=o.width,r=o.height;else if(t*=s,e*=s,void 0===i&&void 0===r)return t<0||e<0||t>=a.width||e>=a.height?[0,0,0,0]:this._getPixel(t,e);var h=new n.Image(i,r);return h.canvas.getContext("2d").drawImage(a,t,e,i*s,r*s,0,0,i,r),h},n.Renderer.prototype.textLeading=function(t){return"number"==typeof t?(this._setProperty("_textLeading",t),this._pInst):this._textLeading},n.Renderer.prototype.textSize=function(t){return"number"==typeof t?(this._setProperty("_textSize",t),this._setProperty("_textLeading",t*o._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},n.Renderer.prototype.textStyle=function(t){return t?(t!==o.NORMAL&&t!==o.ITALIC&&t!==o.BOL
1D&&t!==o.BOLDITALIC||this._setProperty("_textStyle",t),this._applyTextProperties()):this._textStyle},n.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},n.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},n.Renderer.prototype.textAlign=function(t,e){return void 0!==t?(this._setProperty("_textAlign",t),void 0!==e&&this._setProperty("_textBaseline",e),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}},n.Renderer.prototype.text=function(t,e,i,r,n){var s,a,h,l,u,c,p,f,d=this._pInst,m=Number.MAX_VALUE;if((this._doFill||this._doStroke)&&void 0!==t){if("string"!=typeof t&&(t=t.toString()),s=(t=t.replace(/(\t)/g,"  ")).split("\n"),void 0!==r){for(h=f=0;h<s.length;h++)for(u="",p=s[h].split(" "),a=0;a<p.length;a++)r<this.textWidth(c=u+p[a]+" ")?(u=p[a]+" ",f+=d.textLeading()):u=c;switch(this._rectMode===o.CENTER&&(e-=r/2,i-=n/2),this._textAlign){case o.CENTER:e+=r/2;break;case o.RIGHT:e+=r}var y=!1;if(void 0!==n){switch(this._textBaseline){case o.BOTTOM:i+=n-f;break;case o.CENTER:i+=(n-f)/2;break;case o.BASELINE:y=!0,this._textBaseline=o.TOP}m=i+n-d.textAscent()}for(h=0;h<s.length;h++){for(u="",p=s[h].split(" "),a=0;a<p.length;a++)r<this.textWidth(c=u+p[a]+" ")&&0<u.length?(this._renderText(d,u,e,i,m),u=p[a]+" ",i+=d.textLeading()):u=c;this._renderText(d,u,e,i,m),i+=d.textLeading(),y&&(this._textBaseline=o.BASELINE)}}else{var g=0,v=d.textAlign().vertical;for(v===o.CENTER?g=(s.length-1)*d.textLeading()/2:v===o.BOTTOM&&(g=(s.length-1)*d.textLeading()),l=0;l<s.length;l++)this._renderText(d,s[l],e,i-g,m),i+=d.textLeading()}return d}},n.Renderer.prototype._applyDefaults=function(){return this},n.Renderer.prototype._isOpenType=function(t){return"object"===r(t=t||this._textFont)&&t.font&&t.font.supported},n.Renderer.prototype._updateTextMetrics=function(){if(this._isOpenType())return this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent()),this;var t=document.createElement("span");t.style.fontFamily=this._textFont,t.style.fontSize=this._textSize+"px",t.innerHTML="ABCjgq|";var e=document.createElement("div");e.style.display="inline-block",e.style.width="1px",e.style.height="0px";var i=document.createElement("div");i.appendChild(t),i.appendChild(e),i.style.height="0px",i.style.overflow="hidden",document.body.appendChild(i),e.style.verticalAlign="baseline";var r=s(e),n=s(t),o=r[1]-n[1];e.style.verticalAlign="bottom",r=s(e),n=s(t);var a=r[1]-n[1]-o;return document.body.removeChild(i),this._setProperty("_textAscent",o),this._setProperty("_textDescent",a),this},e.exports=n.Renderer},{"../core/constants":17,"./main":23}],27:[function(t,e,i){"use strict";var r=t("./main"),n=t("./constants"),o=t("../image/filters");t("./p5.Renderer");var s="rgba(0,0,0,0)";r.Renderer2D=function(t,e,i){return r.Renderer.call(this,t,e,i),this.drawingContext=this.canvas.getContext("2d"),this._pInst._setProperty("drawingContext",this.drawingContext),this},r.Renderer2D.prototype=Object.create(r.Renderer.prototype),r.Renderer2D.prototype._applyDefaults=function(){this._cachedFillStyle=this._cachedStrokeStyle=void 0,this._setFill(n._DEFAULT_FILL),this._setStroke(n._DEFAULT_STROKE),this.drawingContext.lineCap=n.ROUND,this.drawingContext.font="normal 12px sans-serif"},r.Renderer2D.prototype.resize=function(t,e){r.Renderer.prototype.resize.call(this,t,e),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)},r.Renderer2D.prototype.background=function(){if(this.drawingContext.save(),this.resetMatrix(),arguments[0]instanceof r.Image)this._pInst.image(arguments[0],0,0,this.width,this.height);else{var t=this._getFill(),e=this._pInst.color.apply(this._pInst,arguments).toString();this._setFill(e),this.drawingContext.fillRect(0,0,this.width,this.height),this._setFill(t)}this.drawingContext.restore(),this._pixelsState._pixelsDirty=!0},r.Renderer2D.prototype.clear=function(){this.drawingContext.save(),this.resetMatrix(),this.drawingContext.clearRect(0,0,this.width,this.height),this.drawingContext.restore(
1),this._pixelsState._pixelsDirty=!0},r.Renderer2D.prototype.fill=function(){var t=this._pInst.color.apply(this._pInst,arguments);this._setFill(t.toString())},r.Renderer2D.prototype.stroke=function(){var t=this._pInst.color.apply(this._pInst,arguments);this._setStroke(t.toString())},r.Renderer2D.prototype.image=function(t,e,i,n,o,s,a,h,l){var u;try{this._tint&&(r.MediaElement&&t instanceof r.MediaElement&&t.loadPixels(),t.canvas&&(u=this._getTintedImageCanvas(t))),u||(u=t.canvas||t.elt);var c=1;t.width&&0<t.width&&(c=u.width/t.width),this.drawingContext.drawImage(u,c*e,c*i,c*n,c*o,s,a,h,l)}catch(t){if("NS_ERROR_NOT_AVAILABLE"!==t.name)throw t}this._pixelsState._pixelsDirty=!0},r.Renderer2D.prototype._getTintedImageCanvas=function(t){if(!t.canvas)return t;var e=o._toPixels(t.canvas),i=document.createElement("canvas");i.width=t.canvas.width,i.height=t.canvas.height;for(var r=i.getContext("2d"),n=r.createImageData(t.canvas.width,t.canvas.height),s=n.data,a=0;a<e.length;a+=4){var h=e[a+1],l=e[a+2],u=e[a+3];s[a]=e[a]
1*this._tint[0]/255,s[a+1]=h*this._tint[1]/255,s[a+2]=l*this._tint[2]/255,s[a+3]=u*this._tint[3]/255}return r.putImageData(n,0,0),i},r.Renderer2D.prototype.blendMode=function(t){if(t===n.SUBTRACT)console.warn("blendMode(SUBTRACT) only works in WEBGL mode.");else{if(t!==n.BLEND&&t!==n.DARKEST&&t!==n.LIGHTEST&&t!==n.DIFFERENCE&&t!==n.MULTIPLY&&t!==n.EXCLUSION&&t!==n.SCREEN&&t!==n.REPLACE&&t!==n.OVERLAY&&t!==n.HARD_LIGHT&&t!==n.SOFT_LIGHT&&t!==n.DODGE&&t!==n.BURN&&t!==n.ADD)throw new Error("Mode "+t+" not recognized.");this.drawingContext.globalCompositeOperation=t}},r.Renderer2D.prototype.blend=function(){var t=this.drawingContext.globalCompositeOperation,e=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0,arguments.length-1);this.drawingContext.globalCompositeOperation=e,this._pInst?this._pInst.copy.apply(this._pInst,i):this.copy.apply(this,i),this.drawingContext.globalCompositeOperation=t},r.Renderer2D.prototype.copy=function(){var t,e,i,n,o,s,a,h,l;if(9===arguments.length)t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3],o=arguments[4],s=arguments[5],a=arguments[6],h=arguments[7],l=arguments[8];else{if(8!==arguments.length)throw new Error("Signature not supported");t=this._pInst,e=arguments[0],i=arguments[1],n=arguments[2],o=arguments[3],s=arguments[4],a=arguments[5],h=arguments[6],l=arguments[7]}r.Renderer2D._copyHelper(this,t,e,i,n,o,s,a,h,l),this._pixelsState._pixelsDirty=!0},r.Renderer2D._copyHelper=function(t,e,i,r,n,o,s,a,h,l){e.loadPixels();var u=e.canvas.width/e.width;t.drawingContext.drawImage(e.canvas,u*i,u*r,u*n,u*o,s,a,h,l)},r.Renderer2D.prototype._getPixel=function(t,e){var i,r,n=this._pixelsState;return r=n._pixelsDirty?(i=this.drawingContext.getImageData(t,e,1,1).data,0):(i=n.pixels,4*(Math.floor(t)+Math.floor(e)*this.canvas.width)),[i[r+0],i[r+1],i[r+2],i[r+3]]},r.Renderer2D.prototype.loadPixels=function(){var t=this._pixelsState;if(t._pixelsDirty){t._pixelsDirty=!1;var e=t._pixelDensity,i=this.drawingContext.getImageData(0,0,this.width*e,this.height*e);t._setProperty("imageData",i),t._setProperty("pixels",i.data)}},r.Renderer2D.prototype.set=function(t,e,i){t=Math.floor(t),e=Math.floor(e);var n=this._pixelsState;if(i instanceof r.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(n._pixelDensity,n._pixelDensity),this.drawingContext.drawImage(i.canvas,t,e),this.drawingContext.restore(),n._pixelsDirty=!0;else{var o=0,s=0,a=0,h=0,l=4*(e*n._pixelDensity*(this.width*n._pixelDensity)+t*n._pixelDensity);if(n.imageData&&!n._pixelsDirty||n.loadPixels.call(n),"number"==typeof i)l<n.pixels.length&&(a=s=o=i,h=255);else if(i instanceof Array){if(i.length<4)throw new Error("pixel array must be of the form [R, G, B, A]");l<n.pixels.length&&(o=i[0],s=i[1],a=i[2],h=i[3])}else i instanceof r.Color&&l<n.pixels.length&&(o=i.levels[0],s=i.levels[1],a=i.levels[2],h=i.levels[3]);for(var u=0;u<n._pixelDensity;u++)for(var c=0;c<n._pixelDensity;c++)n.pixels[l=4*((e*n._pixelDensity+c)*this.width*n._pixelDensity+(t*n._pixelDensity+u))]=o,n.pixels[l+1]=s,n.pixels[l+2]=a,n.pixels[l+3]=h}},r.Renderer2D.prototype.updatePixels=function(t,e,i,r){var n=this._pixelsState,o=n._pixelDensity;void 0===t&&void 0===e&&void 0===i&&void 0===r&&(e=t=0,i=this.width,r=this.height),this.drawingContext.putImageData(n.imageData,t*=o,e*=o,0,0,i*=o,r*=o),0===t&&0===e&&i===this.width&&r===this.height||(n._pixelsDirty=!0)},r.Renderer2D.prototype._acuteArcToBezier=function(t,e){var i=e/2,r=Math.cos(i),n=Math.sin(i),o=1/Math.tan(i),s=t+i,a=Math.cos(s),h=Math.sin(s),l=(4-r)/3,u=n+(r-l)*o;return{ax:Math.cos(t).toFixed(7),ay:Math.sin(t).toFixed(7),bx:(l*a+u*h).toFixed(7),by:(l*h-u*a).toFixed(7),cx:(l*a-u*h).toFixed(7),cy:(l*h+u*a).toFixed(7),dx:Math.cos(t+e).toFixed(7),dy:Math.sin(t+e).toFixed(7)}},r.Renderer2D.prototype.arc=function(t,e,i,r,o,s,a){var h=this.drawingContext,l=i/2,u=r/2,c=0,p=[];for(t+=l,e+=u;1e-5<=s-o;)c=Math.min(s-o,n.HALF_PI),p.push(this._acuteArcToBezier(o,c)),o+=c;return this._doFill&&(h.beginPath(),p.forEach(function(i,r){0===r&&h.moveTo(t+i.ax*l,e+i.ay*u),h.bezierCurveTo(t+i.bx*l,e+i.by*u,t+i.cx*l,e+i.cy*u,t+i.dx*l,e+i.dy*u)}),a!==n.PIE&&null!=a||h.lineTo(t,e),h.closePath(),h.fill(),this._pixelsState._pixelsDirty=!0),this._doStroke&&(h.beginPath(),p.forEach(function(i,r){0===r&&h.moveTo(t+i.ax*l,e+i.ay*u),h.bezierCurveTo(t+i.bx*l,e+i.by*u,t+i.cx*l,e+i.cy*u,t+i.dx*l,e+i.dy*u)}),a===n.PIE?(h.lineTo(t,e),h.closePath()):a===n.CHORD&&h.closePath(),h.stroke(),this._pixelsState._pixelsDirty=!0),this},r.Renderer2D.prototype.ellipse=function(t){var e=this.drawingContext,i=this._doFill,r=this._doStroke,n=t[0],o=t[1],a=t[2],h=t[3];if(i&&!r){if(this._getFill()===s)return this}else if(!i&&r&&this._getStroke()===s)return this;var l=a/2*.5522847498,u=h/2*.5522847498,c=n+a,p=o+h,f=n+a/2,d=o+h/2;e.beginPath(),e.moveTo(n,d),e.bezierCurveTo(n,d-u,f-l,o,f,o),e.bezierCurveTo(f+l,o,c,d-u,c,d),e.bezierCurveTo(c,d+u,f+l,p,f,p),e.bezierCurveTo(f-l,p,n,d+u,n,d),e.closePath(),i&&(e.fill(),this._pixelsState._pixelsDirty=!0),r&&(e.stroke(),this._pixelsState._pixelsDirty=!0)}
1,r.Renderer2D.prototype.line=function(t,e,i,r){var n=this.drawingContext;return this._doStroke&&(this._getStroke()===s||(n.beginPath(),n.moveTo(t,e),n.lineTo(i,r),n.stroke(),this._pixelsState._pixelsDirty=!0)),this},r.Renderer2D.prototype.point=function(t,e){var i=this.drawingContext;if(!this._doStroke)return this;if(this._getStroke()===s)return this;var r=this._getStroke(),o=this._getFill();t=Math.round(t),e=Math.round(e),this._setFill(r),1<i.lineWidth?(i.beginPath(),i.arc(t,e,i.lineWidth/2,0,n.TWO_PI,!1),i.fill()):i.fillRect(t,e,1,1),this._setFill(o),this._pixelsState._pixelsDirty=!0},r.Renderer2D.prototype.quad=function(t,e,i,r,n,o,a,h){var l=this.drawingContext,u=this._doFill,c=this._doStroke;if(u&&!c){if(this._getFill()===s)return this}else if(!u&&c&&this._getStroke()===s)return this;return l.beginPath(),l.moveTo(t,e),l.lineTo(i,r),l.lineTo(n,o),l.lineTo(a,h),l.closePath(),u&&l.fill(),c&&l.stroke(),this._pixelsState._pixelsDirty=!0,this},r.Renderer2D.prototype.rect=function(t){var e=t[0],i=t[1],r=t[2],n=t[3],o=t[4],a=t[5],h=t[6],l=t[7],u=this.drawingContext,c=this._doFill,p=this._doStroke;if(c&&!p){if(this._getFill()===s)return this}else if(!c&&p&&this._getStroke()===s)return this;if(u.beginPath(),void 0===o)u.rect(e,i,r,n);else{void 0===a&&(a=o),void 0===h&&(h=a),void 0===l&&(l=h);var f=r/2,d=n/2;r<2*o&&(o=f),n<2*o&&(o=d),r<2*a&&(a=f),n<2*a&&(a=d),r<2*h&&(h=f),n<2*h&&(h=d),r<2*l&&(l=f),n<2*l&&(l=d),u.beginPath(),u.moveTo(e+o,i),u.arcTo(e+r,i,e+r,i+n,a),u.arcTo(e+r,i+n,e,i+n,h),u.arcTo(e,i+n,e,i,l),u.arcTo(e,i,e+r,i,o),u.closePath()}return this._doFill&&u.fill(),this._doStroke&&u.stroke(),this._pixelsState._pixelsDirty=!0,this},r.Renderer2D.prototype.triangle=function(t){var e=this.drawingContext,i=this._doFill,r=this._doStroke,n=t[0],o=t[1],a=t[2],h=t[3],l=t[4],u=t[5];if(i&&!r){if(this._getFill()===s)return this}else if(!i&&r&&this._getStroke()===s)return this;e.beginPath(),e.moveTo(n,o),e.lineTo(a,h),e.lineTo(l,u),e.closePath(),i&&(e.fill(),this._pixelsState._pixelsDirty=!0),r&&(e.stroke(),this._pixelsState._pixelsDirty=!0)},r.Renderer2D.prototype.endShape=function(t,e,i,r,o,s,a){if(0===e.length)return this;if(!this._doStroke&&!this._doFill)return this;var h,l,u,c=t===n.CLOSE;c&&!s&&e.push(e[0]);var p=e.length;if(!i||a!==n.POLYGON&&null!==a)if(!r||a!==n.POLYGON&&null!==a)if(!o||a!==n.POLYGON&&null!==a)if(a===n.POINTS)for(l=0;l<p;l++)h=e[l],this._doStroke&&this._pInst.stroke(h[6]),this._pInst.point(h[0],h[1]);else if(a===n.LINES)for(l=0;l+1<p;l+=2)h=e[l],this._doStroke&&this._pInst.stroke(e[l+1][6]),this._pInst.line(h[0],h[1],e[l+1][0],e[l+1][1]);else if(a===n.TRIANGLES)for(l=0;l+2<p;l+=3)h=e[l],this.drawingContext.beginPath(),this.drawingContext.moveTo(h[0],h[1]),this.drawingContext.lineTo(e[l+1][0],e[l+1][1]),this.drawingContext.lineTo(e[l+2][0],e[l+2][1]),this.drawingContext.closePath(),this._doFill&&(this._pInst.fill(e[l+2][5]),this.drawingContext.fill()),this._doStroke&&(this._pInst.stroke(e[l+2][6]),this.drawingContext.stroke());else if(a===n.TRIANGLE_STRIP)for(l=0;l+1<p;l++)h=e[l],this.drawingContext.beginPath(),this.drawingContext.moveTo(e[l+1][0],e[l+1][1]),this.drawingContext.lineTo(h[0],h[1]),this._doStroke&&this._pInst.stroke(e[l+1][6]),this._doFill&&this._pInst.fill(e[l+1][5]),l+2<p&&(this.drawingContext.lineTo(e[l+2][0],e[l+2][1]),this._doStroke&&this._pInst.stroke(e[l+2][6]),this._doFill&&this._pInst.fill(e[l+2][5])),this._doFillStrokeClose(c);else if(a===n.TRIANGLE_FAN){if(2<p){for(this.drawingContext.beginPath(),l=2;l<p;l++)h=e[l],this.drawingContext.moveTo(e[0][0],e[0][1]),this.drawingContext.lineTo(e[l-1][0],e[l-1][1]),this.drawingContext.lineTo(h[0],h[1]),this.drawingContext.lineTo(e[0][0],e[0][1]),l<p-1&&(this._doFill&&h[5]!==e[l+1][5]||this._doStroke&&h[6]!==e[l+1][6])&&(this._doFill&&(this._pInst.fill(h[5]),this.drawingContext.fill(),this._pInst.fill(e[l+1][5])),this._doStroke&&(this._pInst.stroke(h[6]),this.drawingContext.stroke(),this._pInst.stroke(e[l+1][6])),this.drawingContext.closePath(),this.drawingContext.beginPath());this._doFillStrokeClose(c)}}else if(a===n.QUADS)for(l=0;l+3<p;l+=4){for(h=e[l],this.drawingContext.beginPath(),this.drawingContext.moveTo(h[0],h[1]),u=1;u<4;u++)this.drawingContext.lineTo(e[l+u][0],e[l+u][1]);this.drawingContext.lineTo(h[0],h[1]),this._doFill&&this._pInst.fill(e[l+3][5]),this._doStroke&&this._pInst.stroke(e[l+3][6]),this._doFillStrokeClose(c)}else if(a===n.QUAD_STRIP){if(3<p)for(l=0;l+1<p;l+=2)h=e[l],this.drawingContext.beginPath(),l+3<p?(this.drawingContext.moveTo(e[l+2][0],e[l+2][1]),this.drawingContext.lineTo(h[0],h[1]),this.drawingContext.lineTo(e[l+1][0],e[l+1][1]),this.drawingContext.lineTo(e[l+3][0],e[l+3][1]),this._doFill&&this._pInst.fill(e[l+3][5]),this._doStroke&&this._pInst.stroke(e[l+3][6])):(this.drawingContext.moveTo(h[0],h[1]),this.drawingContext.lineTo(e[l+1][0],e[l+1][1])),this._doFillStrokeClose(c)}else{for(this.drawingContext.beginPath(),this.drawingContext.moveTo(e[0][0],e[0][1]),l=1;l<p;l++)(h=e[l]).isVert&&(h.moveTo?this.drawingContext.moveTo(h[0],h[1]):this.drawingContext.lineTo(h[0],h[1]));this._doFillStrokeClose(c)}else{for(this.drawingContext.beginPath(),l=0;l<p;l++)e[l].isVert?e[l].moveTo?this.drawingContext.moveTo(e[l][0],e[l][1]):this.drawingContext.lineTo(e[l][0],e[l][1]):this.drawingContext.quadraticCurveTo(e[l][0],e[l][1],e[l][2],e[l][3]);this._doFillStrokeClose(c)}else{for(this.drawingContext.beginPath(),l=0;l<p;l++)e[l].isVert?e[l].moveTo?this.drawingContext.moveTo(e[l][0],e[l][1]):this.drawingContext.lineTo(e[l][0],e[l][1]):this.drawingContext.bezierCurveTo(e[l][0],e[l][1],e[l][2],e[l][3],e[l][4],e[l][5]);this._doFillStrokeClose(c)}else if(3<p){var f=[],d=1-this._curveTightness;for(this.drawingContext.beginPath(),this.drawingContext.moveTo(e[1][0],e[1][1]),l=1;l+2<p;
1l++)f[0]=[(h=e[l])[0],h[1]],f[1]=[h[0]+(d*e[l+1][0]-d*e[l-1][0])/6,h[1]+(d*e[l+1][1]-d*e[l-1][1])/6],f[2]=[e[l+1][0]+(d*e[l][0]-d*e[l+2][0])/6,e[l+1][1]+(d*e[l][1]-d*e[l+2][1])/6],f[3]=[e[l+1][0],e[l+1][1]],this.drawingContext.bezierCurveTo(f[1][0],f[1][1],f[2][0],f[2][1],f[3][0],f[3][1]);c&&this.drawingContext.lineTo(e[l+1][0],e[l+1][1]),this._doFillStrokeClose(c)}return s=o=r=i=!1,c&&e.pop(),this._pixelsState._pixelsDirty=!0,this},r.Renderer2D.prototype.strokeCap=function(t){return t!==n.ROUND&&t!==n.SQUARE&&t!==n.PROJECT||(this.drawingContext.lineCap=t),this},r.Renderer2D.prototype.strokeJoin=function(t){return t!==n.ROUND&&t!==n.BEVEL&&t!==n.MITER||(this.drawingContext.lineJoin=t),this},r.Renderer2D.prototype.strokeWeight=function(t){return this.drawingContext.lineWidth=void 0===t||0===t?1e-4:t,this},r.Renderer2D.prototype._getFill=function(){return this._cachedFillStyle||(this._cachedFillStyle=this.drawingContext.fillStyle),this._cachedFillStyle},r.Renderer2D.prototype._setFill=function(t){t!==this._cachedFillStyle&&(this.drawingContext.fillStyle=t,this._cachedFillStyle=t)},r.Renderer2D.prototype._getStroke=function(){return this._cachedStrokeStyle||(this._cachedStrokeStyle=this.drawingContext.strokeStyle),this._cachedStrokeStyle},r.Renderer2D.prototype._setStroke=function(t){t!==this._cachedStrokeStyle&&(this.drawingContext.strokeStyle=t,this._cachedStrokeStyle=t)},r.Renderer2D.prototype.bezier=function(t,e,i,r,n,o,s,a){return this._pInst.beginShape(),this._pInst.vertex(t,e),this._pInst.bezierVertex(i,r,n,o,s,a),this._pInst.endShape(),this},r.Renderer2D.prototype.curve=function(t,e,i,r,n,o,s,a){return this._pInst.beginShape(),this._pInst.curveVertex(t,e),this._pInst.curveVertex(i,r),this._pInst.curveVertex(n,o),this._pInst.curveVertex(s,a),this._pInst.endShape(),this},r.Renderer2D.prototype._doFillStrokeClose=function(t){t&&this.drawingContext.closePath(),this._doFill&&this.drawingContext.fill(),this._doStroke&&this.drawingContext.stroke(),this._pixelsState._pixelsDirty=!0},r.Renderer2D.prototype.applyMatrix=function(t,e,i,r,n,o){this.drawingContext.transform(t,e,i,r,n,o)},r.Renderer2D.prototype.resetMatrix=function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this},r.Renderer2D.prototype.rotate=function(t){this.drawingContext.rotate(t)},r.Renderer2D.prototype.scale=function(t,e){return this.drawingContext.scale(t,e),this},r.Renderer2D.prototype.translate=function(t,e){return t instanceof r.Vector&&(e=t.y,t=t.x),this.drawingContext.translate(t,e),this},r.Renderer2D.prototype.text=function(t,e,i,o,s){var a;void 0!==o&&this.drawingContext.textBaseline===n.BASELINE&&(a=!0,this.drawingContext.textBaseline=n.TOP);var h=r.Renderer.prototype.text.apply(this,arguments);return a&&(this.drawingContext.textBaseline=n.BASELINE),h},r.Renderer2D.prototype._renderText=function(t,e,i,r,o){if(!(o<=r))return t.push(),this._isOpenType()?this._textFont._renderPath(e,i,r,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(e,i,r),this._doFill&&(this._fillSet||this._setFill(n._DEFAULT_TEXT_FILL),this.drawingContext.fillText(e,i,r))),t.pop(),this._pixelsState._pixelsDirty=!0,t},r.Renderer2D.prototype.textWidth=function(t){return this._isOpenType()?this._textFont._textWidth(t,this._textSize):this.drawingContext.measureText(t).width},r.Renderer2D.prototype._applyTextProperties=function(){var t,e=this._pInst;return this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),t=this._textFont,this._isOpenType()&&(t=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),this.drawingContext.font=(this._textStyle||"normal")+" "+(this._textSize||12)+"px "+(t||"sans-serif"),this.drawingContext.textAlign=this._textAlign,this.drawingContext.textBaseline=this._textBaseline===n.CENTER?n._CTX_MIDDLE:this._textBaseline,e},r.Renderer2D.prototype.push=function(){return this.drawingContext.save(),r.Renderer.prototype.push.apply(this)},r.Renderer2D.prototype.pop=function(t){this.drawingContext.restore(
1),this._cachedFillStyle=this.drawingContext.fillStyle,this._cachedStrokeStyle=this.drawingContext.strokeStyle,r.Renderer.prototype.pop.call(this,t)},e.exports=r.Renderer2D},{"../image/filters":42,"./constants":17,"./main":23,"./p5.Renderer":26}],28:[function(t,e,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=t("./main"),o=t("./constants");t("./p5.Graphics"),t("./p5.Renderer2D"),t("../webgl/p5.RendererGL");var s="defaultCanvas0";n.prototype.createCanvas=function(t,e,i){n._validateParameters("createCanvas",arguments);var r,a=i||o.P2D;if(a===o.WEBGL){if(r=document.getElementById(s)){r.parentNode.removeChild(r);var h=this._renderer;this._elements=this._elements.filter(function(t){return t!==h})}(r=document.createElement("canvas")).id=s,r.classList.add("p5Canvas")}else if(this._defaultGraphicsCreated)r=this.canvas;else{r=document.createElement("canvas");for(var l=0;document.getElementById("defaultCanvas"+l);)l++;r.id=s="defaultCanvas"+l,r.classList.add("p5Canvas")}return this._setupDone||(r.dataset.hidden=!0,r.style.visibility="hidden"),this._userNode?this._userNode.appendChild(r):document.body.appendChild(r),a===o.WEBGL?(this._setProperty("_renderer",new n.RendererGL(r,this,!0)),this._elements.push(this._renderer)):this._defaultGraphicsCreated||(this._setProperty("_renderer",new n.Renderer2D(r,this,!0)),this._defaultGraphicsCreated=!0,this._elements.push(this._renderer)),this._renderer.resize(t,e),this._renderer._applyDefaults(),this._renderer},n.prototype.resizeCanvas=function(t,e,i){if(n._validateParameters("resizeCanvas",arguments),this._renderer){var o={};for(var s in this.drawingContext){var a=this.drawingContext[s];"object"!==r(a)&&"function"!=typeof a&&(o[s]=a)}for(var h in this._renderer.resize(t,e),this.width=t,this.height=e,o)try{this.drawingContext[h]=o[h]}catch(t){}i||this.redraw()}},n.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},n.prototype.createGraphics=function(t,e,i){return n._validateParameters("createGraphics",arguments),new n.Graphics(t,e,i,this)},n.prototype.blendMode=function(t){n._validateParameters("blendMode",arguments),t===o.NORMAL&&(console.warn("NORMAL has been deprecated for use in blendMode. defaulting to BLEND instead."),t=o.BLEND),this._renderer.blendMode(t)},e.exports=n},{"../webgl/p5.RendererGL":74,"./constants":17,"./main":23,"./p5.Graphics":25,"./p5.Renderer2D":27}],29:[function(t,e,i){"use strict";var r=t("../main"),n=t("../constants"),o=t("../helpers");t("../error_helpers"),r.prototype._normalizeArcAngles=function(t,e,i,r,o){var s;return t-=n.TWO_PI*Math.floor(t/n.TWO_PI),e-=n.TWO_PI*Math.floor(e/n.TWO_PI),s=Math.min(Math.abs(t-e),n.TWO_PI-Math.abs(t-e)),o&&(t=t<=n.HALF_PI?Math.atan(i/r*Math.tan(t)):t>n.HALF_PI&&t<=3*n.HALF_PI?Math.atan(i/r*Math.tan(t))+n.PI:Math.atan(i/r*Math.tan(t))+n.TWO_PI,e=e<=n.HALF_PI?Math.atan(i/r*Math.tan(e)):e>n.HALF_PI&&e<=3*n.HALF_PI?Math.atan(i/r*Math.tan(e))+n.PI:Math.atan(i/r*Math.tan(e))+n.TWO_PI),e<t&&(e+=n.TWO_PI),{start:t,stop:e,correspondToSamePoint:s<1e-5}},r.prototype.arc=function(t,e,i,n,s,a,h,l){if(r._validateParameters("arc",arguments),!this._renderer._doStroke&&!this._renderer._doFill)return this;s=this._toRadians(s),a=this._toRadians(a),i=Math.abs(i),n=Math.abs(n);var u=o.modeAdjust(t,e,i,n,this._renderer._ellipseMode),c=this._normalizeArcAngles(s,a,u.w,u.h,!0);return c.correspondToSamePoint?this._renderer.ellipse([u.x,u.y,u.w,u.h,l]):this._renderer.arc(u.x,u.y,u.w,u.h,c.start,c.stop,h,l),this},r.prototype.ellipse=function(t,e,i,n,s){if(r._validateParameters("ellipse",arguments),!this._renderer._doStroke&&!this._renderer._doFill)return this;i<0&&(i=Math.abs(i)),void 0===n?n=i:n<0&&(n=Math.abs(n));var a=o.modeAdjust(t,e,i,n,this._renderer._ellipseMode);return this._renderer.ellipse([a.x,a.y,a.w,a.h,s]),this},r.prototype.circle=function(){var t=Array.prototype.slice.call(arguments,0,2);return t.push(arguments[2]),t.push(arguments[2]),this.ellipse.apply(this,t)},r.prototype.line=function(){return r._validateParameters("line",arguments),this._renderer._doStroke&&this._renderer.line.apply(this._renderer,arguments),this},r.prototype.point=function(){return r._validateParameters("point",arguments),this._renderer._doStroke&&this._renderer.point.a
1pply(this._renderer,arguments),this},r.prototype.quad=function(){return r._validateParameters("quad",arguments),(this._renderer._doStroke||this._renderer._doFill)&&(this._renderer.isP3D&&12!==arguments.length?this._renderer.quad.call(this._renderer,arguments[0],arguments[1],0,arguments[2],arguments[3],0,arguments[4],arguments[5],0,arguments[6],arguments[7],0):this._renderer.quad.apply(this._renderer,arguments)),this},r.prototype.rect=function(){if(r._validateParameters("rect",arguments),this._renderer._doStroke||this._renderer._doFill){for(var t=o.modeAdjust(arguments[0],arguments[1],arguments[2],arguments[3],this._renderer._rectMode),e=[t.x,t.y,t.w,t.h],i=4;i<arguments.length;i++)e[i]=arguments[i];this._renderer.rect(e)}return this},r.prototype.square=function(t,e,i,r,n,o,s){return this.rect(t,e,i,i,r,n,o,s)},r.prototype.triangle=function(){return r._validateParameters("triangle",arguments),(this._renderer._doStroke||this._renderer._doFill)&&this._renderer.triangle(arguments),this},e.exports=r},{"../constants":17,"../error_helpers":19,"../helpers":20,"../main":23}],30:[function(t,e,i){"use strict";var r=t("../main"),n=t("../constants");r.prototype.ellipseMode=function(t){return r._validateParameters("ellipseMode",arguments),t!==n.CORNER&&t!==n.CORNERS&&t!==n.RADIUS&&t!==n.CENTER||(this._renderer._ellipseMode=t),this},r.prototype.noSmooth=function(){return this.setAttributes("antialias",!1),"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!1),this},r.prototype.rectMode=function(t){return r._validateParameters("rectMode",arguments),t!==n.CORNER&&t!==n.CORNERS&&t!==n.RADIUS&&t!==n.CENTER||(this._renderer._rectMode=t),this},r.prototype.smooth=function(){return this.setAttributes("antialias",!0),"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!0),this},r.prototype.strokeCap=function(t){return r._validateParameters("strokeCap",arguments),t!==n.ROUND&&t!==n.SQUARE&&t!==n.PROJECT||this._renderer.strokeCap(t),this},r.prototype.strokeJoin=function(t){return r._validateParameters("strokeJoin",arguments),t!==n.ROUND&&t!==n.BEVEL&&t!==n.MITER||this._renderer.strokeJoin(t),this},r.prototype.strokeWeight=function(t){return r._validateParameters("strokeWeight",arguments),this._renderer.strokeWeight(t),this},e.exports=r},{"../constants":17,"../main":23}],31:[function(t,e,i){"use strict";var r=t("../main");t("../error_helpers"),r.prototype.bezier=function(){return r._validateParameters("bezier",arguments),(this._renderer._doStroke||this._renderer._doFill)&&this._renderer.bezier.apply(this._renderer,arguments),this},r.prototype.bezierDetail=function(t){return r._validateParameters("bezierDetail",arguments),this._bezierDetail=t,this},r.prototype.bezierPoint=function(t,e,i,n,o){r._validateParameters("bezierPoint",arguments);var s=1-o;return Math.pow(s,3)*t+3*Math.pow(s,2)*o*e+3*s*Math.pow(o,2)*i+Math.pow(o,3)*n},r.prototype.bezierTangent=function(t,e,i,n,o){r._validateParameters("bezierTangent",arguments);var s=1-o;return 3*n*Math.pow(o,2)-3*i*Math.pow(o,2)+6*i*s*o-6*e*s*o+3*e*Math.pow(s,2)-3*t*Math.pow(s,2)},r.prototype.curve=function(){return r._validateParameters("curve",arguments),this._renderer._doStroke&&this._renderer.curve.apply(this._renderer,arguments),this},r.prototype.curveDetail=function(t){return r._validateParameters("curveDetail",arguments),this._curveDetail=t<3?3:t,this},r.prototype.curveTightness=function(t){return r._validateParameters("curveTightness",arguments),this._renderer._curveTightness=t,this},r.prototype.curvePoint=function(t,e,i,n,o){r._validateParameters("curvePoint",arguments);var s=o*o*o,a=o*o;return t*(-.5*s+a-.5*o)+e*(1.5*s-2.5*a+1)+i*(-1.5*s+2*a+.5*o)+n*(.5*s-.5*a)},r.prototype.curveTangent=function(t,e,i,n,o){r._validateParameters("curveTangent",arguments);var s=o*o;return t*(-3*s/2+2*o-.5)+e*(9*s/2-5*o)+i*(-9*s/2+4*o+.5)+n*(3*s/2-o)},e.exports=r},{"../error_helpers":19,"../main":23}],32:[function(t,e,i){"use strict";var r=t("../main"),n=t("../constants"),o=null,s=[],a=[],h=!1,l=!1,u=!1,c=!1,p=!0;r.prototype.beginContour=function(){return a=[],c=!0,this},r.prototype.beginShape=function(t){return r._validateParameters("beginShape",arguments),this._renderer.isP3D?this._renderer.beginShape.apply(this._renderer,arguments):(o=t===n.POINTS||t===n.LINES||t===n.TRIANGLES||t===n.TRIANGLE_FAN||t===n.TRIANGLE_STRIP||t===n.QUADS||t===n.QUAD_STRIP?t:null,s=[],a=[]),this},r.prototype.bezierVertex=function(){if(r._validateParameters("bezierVertex",arguments),this._renderer.isP3D)this._renderer.bezierVertex.apply(this._renderer,arguments);else if(0===s.length)r._friendlyError("vertex() must be used once before calling bezierVertex()","bezierVertex");else{h=!0;for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.isVert=!1,c?a.push(t):s.push(t)}return this},r.prototype.curveVertex=function(){return r._validateParameters("curveVertex",arguments),this._renderer.isP3D?this._renderer.curveVertex.apply(this._renderer,arguments):(l=!0,this.vertex(arguments[0],arguments[1])),this},r.prototype.endContour=function(){var t=a[0].slice();t.isVert=a[0].isVert,t.moveTo=!1,a.push(t),p&&(s.push(s[0]),p=!1);for(var e=0;e<a.length;e++)s.push(a[e]);return this},r.prototype.endShape=function(t){if(r._validateParameters("endShape",arguments),this._renderer.isP3D)this._renderer.endShape(t,l,h,u,c,o);else{if(0===s.length)return this;if(!this._renderer._doStroke&&!this._renderer._doFill)return this;var e=t===n.CLOSE;e&&!c&&s.push(s[0]),this._renderer.endShape(t,s,l,h,u,c,o),p=!(c=u=h=l=!1),e&&s.pop()}return this},r.prototype.quadraticVertex=function(){if(r._validateParameters("quadraticVertex",arguments),this._renderer.isP3D)this._renderer.quadraticVertex.apply(this._renderer,arguments);else{if(this._contourInited){var t={};return t.x=arguments[0],t.y=arguments[1],t.x3=arguments[2],t.y3=arguments[3],t.type=n.QUADRATIC,this._contourVertices.push(t),this}if(0<s.length){u=!0;for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];e.isVert=!1,c?a.push(e):s.push(e)}else r._friendlyError("vertex() must be used once before calling quadraticVertex()","quadraticVertex")}return this}
1,r.prototype.vertex=function(t,e,i,r,n){if(this._renderer.isP3D)this._renderer.vertex.apply(this._renderer,arguments);else{var o=[];o.isVert=!0,o[0]=t,o[1]=e,o[2]=0,o[3]=0,o[4]=0,o[5]=this._renderer._getFill(),o[6]=this._renderer._getStroke(),i&&(o.moveTo=i),c?(0===a.length&&(o.moveTo=!0),a.push(o)):s.push(o)}return this},e.exports=r},{"../constants":17,"../main":23}],33:[function(t,e,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t,e){window.setTimeout(t,1e3/60)},"undefined"==typeof Uint8ClampedArray||Uint8ClampedArray.prototype.slice||Object.defineProperty(Uint8ClampedArray.prototype,"slice",{value:Array.prototype.slice,writable:!0,configurable:!0,enumerable:!1}),function(){if(!Object.assign){var t=Object.keys,e=Object.defineProperty,i="function"==typeof Symbol&&"symbol"===r(Symbol()),n=Object.prototype.propertyIsEnumerable,o=function(t){return function(e){return n.call(t,e)}};e(Object,"assign",{value:function(e,r){if(null==e)throw new TypeError("target must be an object");var n,s,a,h,l=Object(e);for(n=1;n<arguments.length;++n)for(s=Object(arguments[n]),h=t(s),i&&Object.getOwnPropertySymbols&&h.push.apply(h,Object.getOwnPropertySymbols(s).filter(o(s))),a=0;a<h.length;++a)l[h[a]]=s[h[a]];return l},configurable:!0,enumerable:!1,writable:!0})}}()},{}],34:[function(t,e,i){"use strict";var r=t("./main");r.prototype.noLoop=function(){this._loop=!1},r.prototype.loop=function(){this._loop||(this._loop=!0,this._setupDone&&this._draw())},r.prototype.push=function(){this._styles.push({props:{_colorMode:this._colorMode},renderer:this._renderer.push()})},r.prototype.pop=function(){var t=this._styles.pop();t?(this._renderer.pop(t.renderer),Object.assign(this,t.props)):console.warn("pop() was called without matching push()")},r.prototype.redraw=function(t){if(!this._inUserDraw&&this._setupDone){var e=parseInt(t);(isNaN(e)||e<1)&&(e=1);var i=this._isGlobal?window:this,r=i.draw;if("function"==typeof r){void 0===i.setup&&i.scale(i._pixelDensity,i._pixelDensity);for(var n=function(t){t.call(i)},o=0;o<e;o++){i.resetMatrix(),i._renderer.isP3D&&i._renderer._update(),i._setProperty("frameCount",i.frameCount+1),i._registeredMethods.pre.forEach(n),this._inUserDraw=!0;try{r()}finally{this._inUserDraw=!1}i._registeredMethods.post.forEach(n)}}}},e.exports=r},{"./main":23}],35:[function(t,e,i){"use strict";var r=t("./main");r.prototype.applyMatrix=function(t,e,i,r,n,o){return this._renderer.applyMatrix.apply(this._renderer,arguments),this},r.prototype.resetMatrix=function(){return this._renderer.resetMatrix(),this},r.prototype.rotate=function(t,e){return r._validateParameters("rotate",arguments),this._renderer.rotate(this._toRadians(t),e),this},r.prototype.rotateX=function(t){return this._assert3d("rotateX"),r._validateParameters("rotateX",arguments),this._renderer.rotateX(this._toRadians(t)),this},r.prototype.rotateY=function(t){return this._assert3d("rotateY"),r._validateParameters("rotateY",arguments),this._renderer.rotateY(this._toRadians(t)),this},r.prototype.rotateZ=function(t){return this._assert3d("rotateZ"),r._validateParameters("rotateZ",arguments),this._renderer.rotateZ(this._toRadians(t)),this},r.prototype.scale=function(t,e,i){if(r._validateParameters("scale",arguments),t instanceof r.Vector){var n=t;t=n.x,e=n.y,i=n.z}else if(t instanceof Array){var o=t;t=o[0],e=o[1],i=o[2]||1}return isNaN(e)?e=i=t:isNaN(i)&&(i=1),this._renderer.scale.call(this._renderer,t,e,i),this},r.prototype.shearX=function(t){r._validateParameters("shearX",arguments);var e=this._toRadians(t);return this._renderer.applyMatrix(1,0,Math.tan(e),1,0,0),this},r.prototype.shearY=function(t){r._validateParameters("shearY",arguments);var e=this._toRadians(t);
1return this._renderer.applyMatrix(1,Math.tan(e),0,1,0,0),this},r.prototype.translate=function(t,e,i){return r._validateParameters("translate",arguments),this._renderer.isP3D?this._renderer.translate(t,e,i):this._renderer.translate(t,e),this},e.exports=r},{"./main":23}],36:[function(t,e,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=t("../core/main");n.prototype.storeItem=function(t,e){void 0===e&&console.log("You cannot store undefined variables using storeItem()");var i=r(e);switch(i){case"number":case"boolean":e=e.toString();break;case"object":e instanceof n.Color&&(i="p5.Color"),e=JSON.stringify(e)}localStorage.setItem(t,e),localStorage.setItem(t+"p5TypeID",i)},n.prototype.getItem=function(t){var e=localStorage.getItem(t),i=localStorage.getItem(t+"p5TypeID");if(void 0===i)console.log("Unable to determine type of item stored under "+t+"in local storage. Did you save the item with something other than setItem()?");else if(null!==e)switch(i){case"number":e=parseInt(e);break;case"boolean":e="true"===e;break;case"object":e=JSON.parse(e);break;case"p5.Color":e=JSON.parse(e),e=this.color.apply(this,e.levels)}return e},n.prototype.clearStorage=function(){localStorage.clear()},n.prototype.removeItem=function(t){"string"!=typeof t&&console.log("The argument that you passed to removeItem() - "+t+" is not a string."),localStorage.removeItem(t),localStorage.removeItem(t+"p5TypeID")}},{"../core/main":23}],37:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.createStringDict=function(t,e){return r._validateParameters("createStringDict",arguments),new r.StringDict(t,e)},r.prototype.createNumberDict=function(t,e){return r._validateParameters("createNumberDict",arguments),new r.NumberDict(t,e)},r.TypedDict=function(t,e){return t instanceof Object?this.data=t:(this.data={},this.data[t]=e),this},r.TypedDict.prototype.size=function(){return Object.keys(this.data).length},r.TypedDict.prototype.hasKey=function(t){return this.data.hasOwnProperty(t)},r.TypedDict.prototype.get=function(t){if(this.data.hasOwnProperty(t))return this.data[t];console.log(t+" does not exist in this Dictionary")},r.TypedDict.prototype.set=function(t,e){this._validate(e)?this.data[t]=e:console.log("Those values dont work for this dictionary type.")},r.TypedDict.prototype._addObj=function(t){for(var e in t)this.set(e,t[e])},r.TypedDict.prototype.create=function(t,e){t instanceof Object&&void 0===e?this._addObj(t):void 0!==t?this.set(t,e):console.log("In order to create a new Dictionary entry you must pass an object or a key, value pair")},r.TypedDict.prototype.clear=function(){this.data={}},r.TypedDict.prototype.remove=function(t){if(!this.data.hasOwnProperty(t))throw new Error(t+" does not exist in this Dictionary");delete this.data[t]},r.TypedDict.prototype.print=function(){for(var t in this.data)console.log("key:"+t+" value:"+this.data[t])},r.TypedDict.prototype.saveTable=function(t){var e="";for(var i in this.data)e+=i+","+this.data[i]+"\n";var n=new Blob([e],{type:"text/csv"});r.prototype.downloadFile(n,t||"mycsv","csv")},r.TypedDict.prototype.saveJSON=function(t,e){r.prototype.saveJSON(this.data,t,e)},r.TypedDict.prototype._validate=function(t){return!0},r.StringDict=function(){r.TypedDict.apply(this,arguments)},r.StringDict.prototype=Object.create(r.TypedDict.prototype),r.StringDict.prototype._validate=function(t){return"string"==typeof t},r.NumberDict=function(){r.TypedDict.apply(this,arguments)},r.NumberDict.prototype=Object.create(r.TypedDict.prototype),r.NumberDict.prototype._validate=function(t){return"number"==typeof t},r.NumberDict.prototype.add=function(t,e){this.data.hasOwnProperty(t)?this.data[t]+=e:console.log("The key - "+t+" does not exist in this dictionary.")},r.NumberDict.prototype.sub=function(t,e){this.add(t,-e)},r.NumberDict.prototype.mult=function(t,e){this.data.hasOwnProperty(t)?this.data[t]*=e:console.log("The key - "+t+" does not exist in this dictionary.")},r.NumberDict.prototype.div=function(t,e){this.data.hasOwnProperty(t)?this.data[t]/=e:console.log("The key - "+t+" does not exist in this dictionary.")},r.NumberDict.prototype._valueTest=function(t){if(0===Object.keys(this.data).length)throw new Error("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 e=this.data[Object.keys(this.data)[0]];for(var i in this.data)this.data[i]*t<e*t&&(e=this.data[i]);return e},r.NumberDict.prototype.minValue=function(){return this._valueTest(1)},r.NumberDict.prototype.maxValue=function(){return this._valueTest(-1)},r.NumberDict.prototype._keyTest=function(t){if(0===Object.keys(this.data).length)throw new Error("Unable to use minValue on an empty NumberDict");if(1===Object.keys(this.data).length)return Object.keys(this.data)[0];for(var e=Object.keys(this.data)[0],i=1;i<Object.keys(this.data).length;i++)Object.keys(this.data)[i]*t<e*t&&(e=Object.keys(this.data)[i]);return e},r.NumberDict.prototype.minKey=function(){return this._keyTest(1)},r.NumberDict.prototype.maxKey=function(){return this._keyTest(-1)},e.exports=r.TypedDict},{"../core/main":23}
1],38:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.deviceOrientation=void 0,r.prototype.accelerationX=0,r.prototype.accelerationY=0,r.prototype.accelerationZ=0,r.prototype.pAccelerationX=0,r.prototype.pAccelerationY=0,r.prototype.pAccelerationZ=0,r.prototype._updatePAccelerations=function(){this._setProperty("pAccelerationX",this.accelerationX),this._setProperty("pAccelerationY",this.accelerationY),this._setProperty("pAccelerationZ",this.accelerationZ)},r.prototype.rotationX=0,r.prototype.rotationY=0,r.prototype.rotationZ=0,r.prototype.pRotationX=0,r.prototype.pRotationY=0;var n,o,s,a=r.prototype.pRotationZ=0,h=0,l=0,u="clockwise",c="clockwise",p="clockwise";r.prototype._updatePRotations=function(){this._setProperty("pRotationX",this.rotationX),this._setProperty("pRotationY",this.rotationY),this._setProperty("pRotationZ",this.rotationZ)},r.prototype.turnAxis=void 0;var f=.5,d=30;r.prototype.setMoveThreshold=function(t){r._validateParameters("setMoveThreshold",arguments),f=t},r.prototype.setShakeThreshold=function(t){r._validateParameters("setShakeThreshold",arguments),d=t},r.prototype._ondeviceorientation=function(t){this._updatePRotations(),this._setProperty("rotationX",t.beta),this._setProperty("rotationY",t.gamma),this._setProperty("rotationZ",t.alpha),this._handleMotion()},r.prototype._ondevicemotion=function(t){this._updatePAccelerations(),this._setProperty("accelerationX",2*t.acceleration.x),this._setProperty("accelerationY",2*t.acceleration.y),this._setProperty("accelerationZ",2*t.acceleration.z),this._handleMotion()},r.prototype._handleMotion=function(){90===window.orientation||-90===window.orientation?this._setProperty("deviceOrientation","landscape"):0===window.orientation?this._setProperty("deviceOrientation","portrait"):void 0===window.orientation&&this._setProperty("deviceOrientation","undefined");var t=this.deviceMoved||window.deviceMoved;"function"==typeof t&&(Math.abs(this.accelerationX-this.pAccelerationX)>f||Math.abs(this.accelerationY-this.pAccelerationY)>f||Math.abs(this.accelerationZ-this.pAccelerationZ)>f)&&t();var e=this.deviceTurned||window.deviceTurned;if("function"==typeof e){var i=this.rotationX+180,r=this.pRotationX+180,m=a+180;0<i-r&&i-r<270||i-r<-270?u="clockwise":(i-r<0||270<i-r)&&(u="counter-clockwise"),u!==n&&(m=i),90<Math.abs(i-m)&&Math.abs(i-m)<270&&(m=i,this._setProperty("turnAxis","X"),e()),n=u,a=m-180;var y=this.rotationY+180,g=this.pRotationY+180,v=h+180;0<y-g&&y-g<270||y-g<-270?c="clockwise":(y-g<0||270<y-this.pRotationY)&&(c="counter-clockwise"),c!==o&&(v=y),90<Math.abs(y-v)&&Math.abs(y-v)<270&&(v=y,this._setProperty("turnAxis","Y"),e()),o=c,h=v-180,0<this.rotationZ-this.pRotationZ&&this.rotationZ-this.pRotationZ<270||this.rotationZ-this.pRotationZ<-270?p="clockwise":(this.rotationZ-this.pRotationZ<0||270<this.rotationZ-this.pRotationZ)&&(p="counter-clockwise"),p!==s&&(l=this.rotationZ),90<Math.abs(this.rotationZ-l)&&Math.abs(this.rotationZ-l)<270&&(l=this.rotationZ,this._setProperty("turnAxis","Z"),e()),s=p,this._setProperty("turnAxis",void 0)}var _,b,x=this.deviceShaken||window.deviceShaken;"function"==typeof x&&(null!==this.pAccelerationX&&(_=Math.abs(this.accelerationX-this.pAccelerationX),b=Math.abs(this.accelerationY-this.pAccelerationY)),d<_+b&&x())},e.exports=r},{"../core/main":23}],39:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.isKeyPressed=!1,r.prototype.keyIsPressed=!1,r.prototype.key="",r.prototype.keyCode=0,r.prototype._onkeydown=function(t){if(!this._downKeys[t.which]){this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",t.which),this._downKeys[t.which]=!0,this._setProperty("key",t.key||String.fromCharCode(t.which)||t.which);var e=this.keyPressed||window.keyPressed;"function"!=typeof e||t.charCode||!1===e(t)&&t.preventDefault()}},r.prototype._onkeyup=function(t){var e=this.keyReleased||window.keyReleased;this._downKeys[t.which]=!1,this._areDownKeys()||(this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1)),this._setProperty("_lastKeyCodeTyped",null),this._setProperty("key",t.key||String.fromCharCode(t.which)||t.which),this._setProperty("keyCode",t.which),"function"==typeof e&&!1===e(t)&&t.preventDefault()},r.prototype._onkeypress=function(t){if(t.which!==this._lastKeyCodeTyped){this._setProperty("_lastKeyCodeTyped",t.which),this._setProperty("key",String.fromCharCode(t.which));var e=this.keyTyped||window.keyTyped;"function"==typeof e&&!1===e(t)&&t.preventDefault()}}
1,r.prototype._onblur=function(t){this._downKeys={}},r.prototype.keyIsDown=function(t){return r._validateParameters("keyIsDown",arguments),this._downKeys[t]||!1},r.prototype._areDownKeys=function(){for(var t in this._downKeys)if(this._downKeys.hasOwnProperty(t)&&!0===this._downKeys[t])return!0;return!1},e.exports=r},{"../core/main":23}],40:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");r.prototype._hasMouseInteracted=!1,r.prototype.mouseX=0,r.prototype.mouseY=0,r.prototype.pmouseX=0,r.prototype.pmouseY=0,r.prototype.winMouseX=0,r.prototype.winMouseY=0,r.prototype.pwinMouseX=0,r.prototype.pwinMouseY=0,r.prototype.mouseButton=0,r.prototype.mouseIsPressed=!1,r.prototype._updateNextMouseCoords=function(t){if(null!==this._curElement&&(!t.touches||0<t.touches.length)){var e=function(t,e,i,r){r&&!r.clientX&&(r.touches?r=r.touches[0]:r.changedTouches&&(r=r.changedTouches[0]));var n=t.getBoundingClientRect();return{x:(r.clientX-n.left)/(t.scrollWidth/e||1),y:(r.clientY-n.top)/(t.scrollHeight/i||1),winX:r.clientX,winY:r.clientY,id:r.identifier}}(this._curElement.elt,this.width,this.height,t);this._setProperty("mouseX",e.x),this._setProperty("mouseY",e.y),this._setProperty("winMouseX",e.winX),this._setProperty("winMouseY",e.winY)}this._hasMouseInteracted||(this._updateMouseCoords(),this._setProperty("_hasMouseInteracted",!0))},r.prototype._updateMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY),this._setProperty("_pmouseWheelDeltaY",this._mouseWheelDeltaY)},r.prototype._setMouseButton=function(t){this._setProperty("mouseButton",1===t.button?n.CENTER:2===t.button?n.RIGHT:n.LEFT)},r.prototype._onmousemove=function(t){var e=this._isGlobal?window:this;this._updateNextMouseCoords(t),this.mouseIsPressed?"function"==typeof e.mouseDragged?!1===e.mouseDragged(t)&&t.preventDefault():"function"==typeof e.touchMoved&&!1===e.touchMoved(t)&&t.preventDefault():"function"==typeof e.mouseMoved&&!1===e.mouseMoved(t)&&t.preventDefault()},r.prototype._onmousedown=function(t){var e=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._setMouseButton(t),this._updateNextMouseCoords(t),"function"==typeof e.mousePressed?!1===e.mousePressed(t)&&t.preventDefault():navigator.userAgent.toLowerCase().includes("safari")&&"function"==typeof e.touchStarted&&!1===e.touchStarted(t)&&t.preventDefault()},r.prototype._onmouseup=function(t){var e=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!1),"function"==typeof e.mouseReleased?!1===e.mouseReleased(t)&&t.preventDefault():"function"==typeof e.touchEnded&&!1===e.touchEnded(t)&&t.preventDefault()},r.prototype._ondragend=r.prototype._onmouseup,r.prototype._ondragover=r.prototype._onmousemove,r.prototype._onclick=function(t){var e=this._isGlobal?window:this;"function"==typeof e.mouseClicked&&!1===e.mouseClicked(t)&&t.preventDefault()},r.prototype._ondblclick=function(t){var e=this._isGlobal?window:this;"function"==typeof e.doubleClicked&&!1===e.doubleClicked(t)&&t.preventDefault()},r.prototype._mouseWheelDeltaY=0,r.prototype._pmouseWheelDeltaY=0,r.prototype._onwheel=function(t){var e=this._isGlobal?window:this;this._setProperty("_mouseWheelDeltaY",t.deltaY),"function"==typeof e.mouseWheel&&(t.delta=t.deltaY,!1===e.mouseWheel(t)&&t.preventDefault())},e.exports=r},{"../core/constants":17,"../core/main":23}],41:[function(t,e,i){"use strict";var r=t("../core/main");function n(t,e,i,r,n){n=n||0;var o=t.getBoundingClientRect(),s=r.touches[n]||r.changedTouches[n];return{x:(s.clientX-o.left)/(t.scrollWidth/e||1),y:(s.clientY-o.top)/(t.scrollHeight/i||1),winX:s.clientX,winY:s.clientY,id:s.identifier}}r.prototype.touches=[],r.prototype._updateTouchCoords=function(t){if(null!==this._curElement){for(var e=[],i=0;i<t.touches.length;i++)e[i]=n(this._curElement.elt,this.width,this.height,t,i);this._setProperty("touches",e)}},r.prototype._ontouchstart=function(t){var e=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._updateTouchCoords(t),this._updateNextMouseCoords(t),this._updateMouseCoords(),"function"==typeof e.touchStarted?!1===e.touchStarted(t)&&t.preventDefault():navigator.userAgent.toLowerCase().includes("safari")&&"function"==typeof e.touchStarted&&!1===e.mousePressed(t)&&t.preventDefault()},r.prototype._ontouchmove=function(t){var e=this._isGlobal?window:this;this._updateTouchCoords(t),this._updateNextMouseCoords(t),"function"==typeof e.touchMoved?!1===e.touchMoved(t)&&t.preventDefault():"function"==typeof e.mouseDragged&&!1===e.mouseDragged(t)&&t.preventDefault()},r.prototype._ontouchend=function(t){this._setProperty("mouseIsPressed",!1),this._updateTouchCoords(t),this._updateNextMouseCoords(t);var e=this._isGlobal?window:this;"function"==typeof e.touchEnded?!1===e.touchEnded(t)&&t.preventDefault():"function"==typeof e.mouseReleased&&!1===e.mouseReleased(t)&&t.preventDefault()},e.exports=r},{"../core/main":23}
1],42:[function(t,e,i){"use strict";var r,n,o,s,a={_toPixels:function(t){return t instanceof ImageData?t.data:t.getContext("2d").getImageData(0,0,t.width,t.height).data},_getARGB:function(t,e){var i=4*e;return t[i+3]<<24&4278190080|t[i]<<16&16711680|t[i+1]<<8&65280|255&t[i+2]},_setPixels:function(t,e){for(var i=0,r=0,n=t.length;r<n;r++)t[0+(i=4*r)]=(16711680&e[r])>>>16,t[i+1]=(65280&e[r])>>>8,t[i+2]=255&e[r],t[i+3]=(4278190080&e[r])>>>24},_toImageData:function(t){return t instanceof ImageData?t:t.getContext("2d").getImageData(0,0,t.width,t.height)},_createImageData:function(t,e){return a._tmpCanvas=document.createElement("canvas"),a._tmpCtx=a._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(t,e)},apply:function(t,e,i){var r=t.getContext("2d"),n=r.getImageData(0,0,t.width,t.height),o=e(n,i);o instanceof ImageData?r.putImageData(o,0,0,0,0,t.width,t.height):r.putImageData(n,0,0,0,0,t.width,t.height)},threshold:function(t,e){var i=a._toPixels(t);void 0===e&&(e=.5);for(var r=Math.floor(255*e),n=0;n<i.length;n+=4)i[n]=i[n+1]=i[n+2]=r<=.2126*i[n]+.7152*i[n+1]+.0722*i[n+2]?255:0},gray:function(t){for(var e=a._toPixels(t),i=0;i<e.length;i+=4)e[i]=e[i+1]=e[i+2]=.2126*e[i]+.7152*e[i+1]+.0722*e[i+2]},opaque:function(t){for(var e=a._toPixels(t),i=0;i<e.length;i+=4)e[i+3]=255;return e},invert:function(t){for(var e=a._toPixels(t),i=0;i<e.length;i+=4)e[i]=255-e[i],e[i+1]=255-e[i+1],e[i+2]=255-e[i+2]},posterize:function(t,e){var i=a._toPixels(t);if(e<2||255<e)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var r=e-1,n=0;n<i.length;n+=4){var o=i[n+1],s=i[n+2];i[n]=255*(i[n]*e>>8)/r,i[n+1]=255*(o*e>>8)/r,i[n+2]=255*(s*e>>8)/r}},dilate:function(t){for(var e,i,r,n,o,s,h,l,u,c,p,f,d,m,y,g,v,_=a._toPixels(t),b=0,x=_.length?_.length/4:0,w=new Int32Array(x);b<x;)for(i=(e=b)+t.width;b<i;)r=n=a._getARGB(_,b),(h=b-1)<e&&(h=b),i<=(s=b+1)&&(s=b),(l=b-t.width)<0&&(l=0),x<=(u=b+t.width)&&(u=b),f=a._getARGB(_,l),p=a._getARGB(_,h),d=a._getARGB(_,u),(o=77*(r>>16&255)+151*(r>>8&255)+28*(255&r))<(y=77*(p>>16&255)+151*(p>>8&255)+28*(255&p))&&(n=p,o=y),o<(m=77*((c=a._getARGB(_,s))>>16&255)+151*(c>>8&255)+28*(255&c))&&(n=c,o=m),o<(g=77*(f>>16&255)+151*(f>>8&255)+28*(255&f))&&(n=f,o=g),o<(v=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))&&(n=d,o=v),w[b++]=n;a._setPixels(_,w)},erode:function(t){for(var e,i,r,n,o,s,h,l,u,c,p,f,d,m,y,g,v,_=a._toPixels(t),b=0,x=_.length?_.length/4:0,w=new Int32Array(x);b<x;)for(i=(e=b)+t.width;b<i;)r=n=a._getARGB(_,b),(h=b-1)<e&&(h=b),i<=(s=b+1)&&(s=b),(l=b-t.width)<0&&(l=0),x<=(u=b+t.width)&&(u=b),f=a._getARGB(_,l),p=a._getARGB(_,h),d=a._getARGB(_,u),(y=77*(p>>16&255)+151*(p>>8&255)+28*(255&p))<(o=77*(r>>16&255)+151*(r>>8&255)+28*(255&r))&&(n=p,o=y),(m=77*((c=a._getARGB(_,s))>>16&255)+151*(c>>8&255)+28*(255&c))<o&&(n=c,o=m),(g=77*(f>>16&255)+151*(f>>8&255)+28*(255&f))<o&&(n=f,o=g),(v=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))<o&&(n=d,o=v),w[b++]=n;a._setPixels(_,w)},blur:function(t,e){!function(t,e){for(var i,h,l,u,c,p,f,d,m,y,g=a._toPixels(t),v=t.width,_=t.height,b=v*_,x=new Int32Array(b),w=0;w<b;w++)x[w]=a._getARGB(g,w);var T,S,M,E,C=new Int32Array(b),A=new Int32Array(b),P=new Int32Array(b),k=new Int32Array(b),R=0;for(function(t){var e=3.5*t|0;if(r!==(e=e<1?1:e<248?e:248)){n=1+(r=e)<<1,o=new Int32Array(n),s=new Array(n);for(var i=0;i<n;i++)s[i]=new Int32Array(256);for(var a,h,l,u,c=1,p=e-1;c<e;c++){o[e+c]=o[p]=h=p*p,l=s[e+c],u=s[p--];for(var f=0;f<256;f++)l[f]=u[f]=h*f}a=o[e]=e*e,l=s[e];for(var d=0;d<256;d++)l[d]=a*d}}(e),S=0;S<_;S++){for(T=0;T<v;T++){if(u=l=h=c=i=0,(p=T-r)<0)y=-p,p=0;else{if(v<=p)break;y=0}for(M=y;M<n&&!(v<=p);M++){var D=x[p+R];c+=(E=s[M])[(-16777216&D)>>>24],h+=E[(16711680&D)>>16],l+=E[(65280&D)>>8],u+=E[255&D],i+=o[M],p++}C[f=R+T]=c/i,A[f]=h/i,P[f]=l/i,k[f]=u/i}R+=v}for(m=(d=-r)*v,S=R=0;S<_;S++){for(T=0;T<v;T++){if(u=l=h=c=i=0,d<0)y=f=-d,p=T;else{if(_<=d)break;y=0,f=d,p=T+m}for(M=y;M<n&&!(_<=f);M++)c+=(E=s[M])[C[p]],h+=E[A[p]],l+=E[P[p]],u+=E[k[p]],i+=o[M],f++,p+=v;x[T+R]=c/i<<24|h/i<<16|l/i<<8|u/i}R+=v,m+=v,d++}a._setPixels(g,x)}(t,e)}};e.exports=a},{}],43:[function(t,e,i){"use strict";var r=t("../core/main"),n=[];r.prototype.createImage=function(t,e){return r._validateParameters("createImage",arguments),new r.Image(t,e)},r.prototype.saveCanvas=function(){r._validateParameters("saveCanvas",arguments);var t,e,i,n,o=[].slice.call(arguments);switch(arguments[0]instanceof HTMLCanvasElement?(t=arguments[0],o.shift()):arguments[0]instanceof r.Element?(t=arguments[0].elt,o.shift()):t=this._curElement&&this._curElement.elt,1<=o.length&&(e=o[0]),2<=o.length&&(i=o[1]),i=i||r.prototype._checkFileExtension(e,i)[1]||"png"){default:n="image/png";break;case"jpeg":case"jpg":n="image/jpeg"}t.toBlob(function(t){r.prototype.downloadFile(t,e,i)},n)}
vendor: 5,879 bytes, line 1
1,r.prototype.saveFrames=function(t,e,i,o,s){r._validateParameters("saveFrames",arguments);var a=i||3;a=r.prototype.constrain(a,0,15),a*=1e3;var h=o||15;h=r.prototype.constrain(h,0,22);var l=0,u=r.prototype._makeFrame,c=this._curElement.elt,p=setInterval(function(){u(t+l,e,c),l++},1e3/h);setTimeout(function(){if(clearInterval(p),s)s(n);else for(var t=0;t<n.length;t++){var e=n[t];r.prototype.downloadFile(e.imageData,e.filename,e.ext)}n=[]},a+.01)},r.prototype._makeFrame=function(t,e,i){var r,o;if(r=this?this._curElement.elt:i,e)switch(e.toLowerCase()){case"png":o="image/png";break;case"jpeg":case"jpg":o="image/jpeg";break;default:o="image/png"}else e="png",o="image/png";var s=r.toDataURL(o);s=s.replace(o,"image/octet-stream");var a={};a.imageData=s,a.filename=t,a.ext=e,n.push(a)},e.exports=r},{"../core/main":23}],44:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("./filters"),o=t("../core/helpers"),s=t("../core/constants");function a(t,e){return 0<t&&t<e?t:e}t("../core/error_helpers"),r.prototype.loadImage=function(t,e,i){r._validateParameters("loadImage",arguments);var n=new Image,o=new r.Image(1,1,this),s=this;return n.onload=function(){o.width=o.canvas.width=n.width,o.height=o.canvas.height=n.height,o.drawingContext.drawImage(n,0,0),o.modified=!0,"function"==typeof e&&e(o),s._decrementPreload()},n.onerror=function(t){r._friendlyFileLoadError(0,n.src),"function"==typeof i?i(t):console.error(t)},0!==t.indexOf("data:image/")&&(n.crossOrigin="Anonymous"),n.src=t,o},r.prototype.image=function(t,e,i,n,s,h,l,u,c){r._validateParameters("image",arguments);var p=t.width,f=t.height;t.elt&&t.elt.videoWidth&&!t.canvas&&(p=t.elt.videoWidth,f=t.elt.videoHeight);var d=e,m=i,y=n||p,g=s||f,v=h||0,_=l||0,b=u||p,x=c||f;b=a(b,p),x=a(x,f);var w=1;t.elt&&!t.canvas&&t.elt.style.width&&(w=t.elt.videoWidth&&!n?t.elt.videoWidth:t.elt.width,w/=parseInt(t.elt.style.width,10)),v*=w,_*=w,x*=w,b*=w;var T=o.modeAdjust(d,m,y,g,this._renderer._imageMode);this._renderer.image(t,v,_,b,x,T.x,T.y,T.w,T.h)},r.prototype.tint=function(){r._validateParameters("tint",arguments);var t=this.color.apply(this,arguments);this._renderer._tint=t.levels},r.prototype.noTint=function(){this._renderer._tint=null},r.prototype._getTintedImageCanvas=function(t){if(!t.canvas)return t;var e=n._toPixels(t.canvas),i=document.createElement("canvas");i.width=t.canvas.width,i.height=t.canvas.height;for(var r=i.getContext("2d"),o=r.createImageData(t.canvas.width,t.canvas.height),s=o.data,a=0;a<e.length;a+=4){var h=e[a+1],l=e[a+2],u=e[a+3];s[a]=e[a]*this._renderer._tint[0]/255,s[a+1]=h*this._renderer._tint[1]/255,s[a+2]=l*this._renderer._tint[2]/255,s[a+3]=u*this._renderer._tint[3]/255}return r.putImageData(o,0,0),i},r.prototype.imageMode=function(t){r._validateParameters("imageMode",arguments),t!==s.CORNER&&t!==s.CORNERS&&t!==s.CENTER||(this._renderer._imageMode=t)},e.exports=r},{"../core/constants":17,"../core/error_helpers":19,"../core/helpers":20,"../core/main":23,"./filters":42}],45:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("./filters");r.Image=function(t,e){this.width=t,this.height=e,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),(this._pixelsState=this)._pixelDensity=1,this._pixelsDirty=!0,this._modified=!1,this.pixels=[]},r.Image.prototype._setProperty=function(t,e){this[t]=e,this.setModified(!0)},r.Image.prototype.loadPixels=function(){r.Renderer2D.prototype.loadPixels.call(this),this.setModified(!0)},r.Image.prototype.updatePixels=function(t,e,i,n){r.Renderer2D.prototype.updatePixels.call(this,t,e,i,n),this.setModified(!0)},r.Image.prototype.get=function(t,e,i,n){return r._validateParameters("p5.Image.get",arguments),r.Renderer2D.prototype.get.apply(this,arguments)},r.Image.prototype._getPixel=r.Renderer2D.prototype._getPixel,r.Image.prototype.set=function(t,e,i){r.Renderer2D.prototype.set.call(this,t,e,i),this.setModified(!0)},r.Image.prototype.resize=function(t,e){0===t&&0===e?(t=this.canvas.width,e=this.canvas.height):0===t?t=this.canvas.width*e/this.canvas.height:0===e&&(e=this.canvas.height*t/this.canvas.width),t=Math.floor(t),e=Math.floor(e);var i=document.createElement("canvas");i.width=t,i.height=e,i.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,i.width,i.height),this.canvas.width=this.width=t,this.canvas.height=this.height=e,this.drawingContext.drawImage(i,0,0,t,e,0,0,t,e),0<this.pixels.length&&this.loadPixels(),this.setModified(!0),this._pixelsDirty=!0},r.Image.prototype.copy=function(){var t,e,i,n,o,s,a,h,l;if(9===arguments.length)t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3],o=arguments[4],s=arguments[5],a=arguments[6],h=arguments[7],l=arguments[8];else{if(8!==arguments.length)throw new Error("Signature not supported");t=this,e=arguments[0],i=arguments[1],n=arguments[2],o=arguments[3],s=arguments[4],a=arguments[5],h=arguments[6],l=arguments[7]}r.Renderer2D._copyHelper(this,t,e,i,n,o,s,a,h,l),this._pixelsDirty=!0},r.Image.prototype.mask=function(t){void 0===t&&(t=this);var e=this.drawingContext.globalCompositeOperation,i=1;t instanceof r.Renderer&&(i=t._pInst._pixelDensity);var n=[t,0,0,i*t.width,i*t.height,0,0,this.width,this.height];this.drawingContext.globalCompositeOperation="destination-in",r.Image.prototype.copy.apply(this,n),this.drawingContext.globalCompositeOperation=e,this.setModified(!0)},r.Image.prototype.filter=function(t,e){n.apply(this.canvas,n[t],e),this.setModified(!0)},r.Image.prototype.blend=function(){r.prototype.blend.apply(this,arguments),this.setModified(!0)},r.Image.prototype.setModified=function(t){this._modified=t},r.Image.prototype.isModified=function(){return this._modified},r.Image.prototype.save=function(t,e){r.prototype.saveCanvas(this.canvas,t,e)},e.exports=r.Image},{"../core/main":23,"./filters":42}
1],46:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("./filters");t("../color/p5.Color"),r.prototype.pixels=[],r.prototype.blend=function(){r._validateParameters("blend",arguments),this._renderer?this._renderer.blend.apply(this._renderer,arguments):r.Renderer2D.prototype.blend.apply(this,arguments)},r.prototype.copy=function(){r._validateParameters("copy",arguments),r.Renderer2D.prototype.copy.apply(this._renderer,arguments)},r.prototype.filter=function(t,e){r._validateParameters("filter",arguments),n.apply(void 0!==this.canvas?this.canvas:this.elt,n[t],e)},r.prototype.get=function(t,e,i,n){return r._validateParameters("get",arguments),this._renderer.get.apply(this._renderer,arguments)},r.prototype.loadPixels=function(){r._validateParameters("loadPixels",arguments),this._renderer.loadPixels()},r.prototype.set=function(t,e,i){this._renderer.set(t,e,i)},r.prototype.updatePixels=function(t,e,i,n){r._validateParameters("updatePixels",arguments),0!==this.pixels.length&&this._renderer.updatePixels(t,e,i,n)},e.exports=r},{"../color/p5.Color":15,"../core/main":23,"./filters":42}],47:[function(t,e,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=t("../core/main");t("whatwg-fetch"),t("es6-promise").polyfill();var o=t("fetch-jsonp");function s(t,e){var i={};if(void 0===(e=e||[]))for(var r=0;r<t.length;r++)e[r.toString()]=r;for(var n=0;n<e.length;n++)i[e[n]]=t[n];return i}function a(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function h(t,e){e&&!0!==e&&"true"!==e||(e=""),t||(t="untitled");var i="";return t&&-1<t.indexOf(".")&&(i=t.split(".").pop()),e&&i!==e&&(t=t+"."+(i=e)),[t,i]}t("../core/error_helpers"),n.prototype.loadJSON=function(){n._validateParameters("loadJSON",arguments);for(var t,e,i,o=arguments[0],s={},a="json",h=1;h<arguments.length;h++){var l=arguments[h];"string"==typeof l?"jsonp"!==l&&"json"!==l||(a=l):"function"==typeof l?t?e=l:t=l:"object"===r(l)&&(l.hasOwnProperty("jsonpCallback")||l.hasOwnProperty("jsonpCallbackFunction"))&&(a="jsonp",i=l)}var u=this;return this.httpDo(o,"GET",i,a,function(e){for(var i in e)s[i]=e[i];void 0!==t&&t(e),u._decrementPreload()},function(t){if(n._friendlyFileLoadError(5,o),!e)throw t;e(t)}),s},n.prototype.loadStrings=function(){n._validateParameters("loadStrings",arguments);for(var t,e,i=[],r=1;r<arguments.length;r++){var o=arguments[r];"function"==typeof o&&(void 0===t?t=o:void 0===e&&(e=o))}var s=this;return n.prototype.httpDo.call(this,arguments[0],"GET","text",function(e){var r=e.replace(/\r\n/g,"\r").replace(/\n/g,"\r").split(/\r/);Array.prototype.push.apply(i,r),void 0!==t&&t(i),s._decrementPreload()},function(t){if(n._friendlyFileLoadError(3,t),!e)throw t;e(t)}),i},n.prototype.loadTable=function(t){var e,i,r=[],o=!1,a=t.substring(t.lastIndexOf(".")+1,t.length),h=",",l=!1;"tsv"===a&&(h="\t");for(var u=1;u<arguments.length;u++)if("function"==typeof arguments[u])void 0===e?e=arguments[u]:void 0===i&&(i=arguments[u]);else if("string"==typeof arguments[u])if(r.push(arguments[u]),"header"===arguments[u]&&(o=!0),"csv"===arguments[u]){if(l)throw new Error("Cannot set multiple separator types.");h=",",l=!0}else if("tsv"===arguments[u]){if(l)throw new Error("Cannot set multiple separator types.");h="\t",l=!0}var c=new n.Table,p=this;return this.httpDo(t,"GET","table",function(t){for(var i,r,a={},l=[],f=0,d=null,m=function(){a.currentState=0,a.token=""},y=function(){d.push(a.token),m()},g=function(){a.currentState=4,l.push(d),d=null};;){if(null==(i=t[f++])){if(a.escaped)throw new Error("Unclosed quote in file.");if(d){y(),g();break}}if(null===d&&(a.escaped=!1,d=[],m()),0===a.currentState){if('"'===i){a.escaped=!0,a.currentState=1;continue}a.currentState=1}if(1===a.currentState&&a.escaped)if('"'===i)'"'===t[f]?(a.token+='"',f++):(a.escaped=!1,a.currentState=2);else{if("\r"===i)continue;a.token+=i}else"\r"===i?("\n"===t[f]&&f++,y(),g()):"\n"===i?(y(),g()):i===h?y():1===a.currentState&&(a.token+=i)}if(o)c.columns=l.shift();else for(u=0;
1u<l[0].length;u++)c.columns[u]="null";for(u=0;u<l.length;u++)(1!==l[u].length||"undefined"!==l[u][0]&&""!==l[u][0])&&((r=new n.TableRow).arr=l[u],r.obj=s(l[u],c.columns),c.addRow(r));"function"==typeof e&&e(c),p._decrementPreload()},function(e){n._friendlyFileLoadError(2,t),i?i(e):console.error(e)}),c},n.prototype.loadXML=function(){for(var t,e,i=new n.XML,r=1;r<arguments.length;r++){var o=arguments[r];"function"==typeof o&&(void 0===t?t=o:void 0===e&&(e=o))}var s=this;return this.httpDo(arguments[0],"GET","xml",function(e){for(var r in e)i[r]=e[r];void 0!==t&&t(i),s._decrementPreload()},function(t){if(n._friendlyFileLoadError(1,t),!e)throw t;e(t)}),i},n.prototype.loadBytes=function(t,e,i){var r={},o=this;return this.httpDo(t,"GET","arrayBuffer",function(t){r.bytes=new Uint8Array(t),"function"==typeof e&&e(r),o._decrementPreload()},function(e){if(n._friendlyFileLoadError(6,t),!i)throw e;i(e)}),r},n.prototype.httpGet=function(){n._validateParameters("httpGet",arguments);var t=Array.prototype.slice.call(arguments);return t.splice(1,0,"GET"),n.prototype.httpDo.apply(this,t)},n.prototype.httpPost=function(){n._validateParameters("httpPost",arguments);var t=Array.prototype.slice.call(arguments);return t.splice(1,0,"POST"),n.prototype.httpDo.apply(this,t)},n.prototype.httpDo=function(){for(var t,e,i,s,a,h={},l=0,u="text/plain",c=arguments.length-1;0<c&&"function"==typeof arguments[c];c--)l++;var p=arguments[0];if(2==arguments.length-l&&"string"==typeof p&&"object"===r(arguments[1]))s=new Request(p,arguments[1]),e=arguments[2],i=arguments[3];else{for(var f,d="GET",m=1;m<arguments.length;m++){var y=arguments[m];if("string"==typeof y)"GET"===y||"POST"===y||"PUT"===y||"DELETE"===y?d=y:"json"===y||"jsonp"===y||"binary"===y||"arrayBuffer"===y||"xml"===y||"text"===y||"table"===y?t=y:f=y;else if("number"==typeof y)f=y.toString();else if("object"===r(y))if(y.hasOwnProperty("jsonpCallback")||y.hasOwnProperty("jsonpCallbackFunction"))for(var g in y)h[g]=y[g];else u=y instanceof n.XML?(f=y.serialize(),"application/xml"):(f=JSON.stringify(y),"application/json");else"function"==typeof y&&(e?i=y:e=y)}s=new Request(p,{method:d,mode:"cors",body:f,headers:new Headers({"Content-Type":u})})}return t||(t=-1!==p.indexOf("json")?"json":-1!==p.indexOf("xml")?"xml":"text"),(a=(a="jsonp"===t?o(p,h):fetch(s)).then(function(e){if(!e.ok){var i=new Error(e.body);throw i.status=e.status,i.ok=!1,i}var r=0;switch("jsonp"!==t&&(r=e.headers.get("content-length")),r&&64e6<r&&n._friendlyFileLoadError(7,p),t){case"json":case"jsonp":return e.json();case"binary":return e.blob();case"arrayBuffer":return e.arrayBuffer();case"xml":return e.text().then(function(t){var e=(new DOMParser).parseFromString(t,"text/xml");return new n.XML(e.documentElement)});default:return e.text()}})).then(e||function(){}),a.catch(i||console.error),a},window.URL=window.URL||window.webkitURL,n.prototype._pWriters=[],n.prototype.createWriter=function(t,e){var i;for(var r in n.prototype._pWriters)if(n.prototype._pWriters[r].name===t)return i=new n.PrintWriter(t+this.millis(),e),n.prototype._pWriters.push(i),i;return i=new n.PrintWriter(t,e),n.prototype._pWriters.push(i),i},n.PrintWriter=function(t,e){var i=this;this.name=t,this.content="",this.write=function(t){this.content+=t},this.print=function(t){this.content+=t+"\n"},this.clear=function(){this.content=""},this.close=function(){var r=[];for(var o in r.push(this.content),n.prototype.writeFile(r,t,e),n.prototype._pWriters)n.prototype._pWriters[o].name===this.name&&n.prototype._pWriters.splice(o,1);i.clear(),i={}}},n.prototype.save=function(t,e,i){var r=arguments,o=this._curElement?this._curElement.elt:this.elt;if(0!==r.length)if(r[0]instanceof n.Renderer||r[0]instanceof n.Graphics)n.prototype.saveCanvas(r[0].elt,r[1],r[2]);else if(1===r.length&&"string"==typeof r[0])n.prototype.saveCanvas(o,r[0]);else switch(h(r[1],r[2])[1]){case"json":return void n.prototype.saveJSON(r[0],r[1],r[2]);case"txt":return void n.prototype.saveStrings(r[0],r[1],r[2]);default:r[0]instanceof Array?n.prototype.saveStrings(r[0],r[1],r[2]):r[0]instanceof n.Table?n.prototype.saveTable(r[0],r[1],r[2]):r[0]instanceof n.Image?n.prototype.saveCanvas(r[0].canvas,r[1]):r[0]instanceof n.SoundFile&&n.prototype.saveSound(r[0],r[1],r[2],r[3])}else n.prototype.saveCanvas(o)}
1,n.prototype.saveJSON=function(t,e,i){var r;n._validateParameters("saveJSON",arguments),r=i?JSON.stringify(t):JSON.stringify(t,void 0,2),this.saveStrings(r.split("\n"),e,"json")},n.prototype.saveJSONObject=n.prototype.saveJSON,n.prototype.saveJSONArray=n.prototype.saveJSON,n.prototype.saveStrings=function(t,e,i){n._validateParameters("saveStrings",arguments);for(var r=this.createWriter(e,i||"txt"),o=0;o<t.length;o++)r.print(t[o]);r.close(),r.clear()},n.prototype.saveTable=function(t,e,i){var r;n._validateParameters("saveTable",arguments),r=void 0===i?e.substring(e.lastIndexOf(".")+1,e.length):i;var o=this.createWriter(e,r),s=t.columns,h=",";if("tsv"===r&&(h="\t"),"html"!==r){if("0"!==s[0]){for(var l=0;l<s.length;l++)o.write(l<s.length-1?s[l]+h:s[l]);o.write("\n")}for(var u=0;u<t.rows.length;u++){var c;for(c=0;c<t.rows[u].arr.length;c++)o.write(c<t.rows[u].arr.length-1?t.rows[u].arr[c]+h:t.rows[u].arr[c]);o.write("\n")}}else{if(o.print("<html>"),o.print("<head>"),o.print('  <meta http-equiv="content-type" content="text/html;charset=utf-8" />'),o.print("</head>"),o.print("<body>"),o.print("  <table>"),"0"!==s[0]){o.print("    <tr>");for(var p=0;p<s.length;p++){var f=a(s[p]);o.print("      <td>"+f),o.print("      </td>")}o.print("    </tr>")}for(var d=0;d<t.rows.length;d++){o.print("    <tr>");for(var m=0;m<t.columns.length;m++){var y=a(t.rows[d].getString(m));o.print("      <td>"+y),o.print("      </td>")}o.print("    </tr>")}o.print("  </table>"),o.print("</body>"),o.print("</html>")}o.close(),o.clear()},n.prototype.writeFile=function(t,e,i){var r="application/octet-stream";n.prototype._isSafari()&&(r="text/plain");var o=new Blob(t,{type:r});n.prototype.downloadFile(o,e,i)},n.prototype.downloadFile=function(e,i,r){var o=h(i,r),s=o[0];if(e instanceof Blob)t("file-saver").saveAs(e,s);else{var a=document.createElement("a");if(a.href=e,a.download=s,a.onclick=function(t){document.body.removeChild(t.target),t.stopPropagation()},a.style.display="none",document.body.appendChild(a),n.prototype._isSafari()){var l="Hello, Safari user! To download this file...\n";l+="1. Go to File --\x3e Save As.\n",l+='2. Choose "Page Source" as the Format.\n',l+='3. Name it with this extension: ."'+o[1]+'"',alert(l)}a.click()}},n.prototype._checkFileExtension=h,n.prototype._isSafari=function(){return 0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")},e.exports=n},{"../core/error_helpers":19,"../core/main":23,"es6-promise":4,"fetch-jsonp":5,"file-saver":6,"whatwg-fetch":11}],48:[function(t,e,i){"use strict";var r=t("../core/main");r.Table=function(t){this.columns=[],this.rows=[]},r.Table.prototype.addRow=function(t){var e=t||new r.TableRow;if(void 0===e.arr||void 0===e.obj)throw new Error("invalid TableRow: "+e);return(e.table=this).rows.push(e),e},r.Table.prototype.removeRow=function(t){this.rows[t].table=null;var e=this.rows.splice(t+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(e)},r.Table.prototype.getRow=function(t){return this.rows[t]},r.Table.prototype.getRows=function(){return this.rows},r.Table.prototype.findRow=function(t,e){if("string"==typeof e){for(var i=0;i<this.rows.length;i++)if(this.rows[i].obj[e]===t)return this.rows[i]}else for(var r=0;r<this.rows.length;r++)if(this.rows[r].arr[e]===t)return this.rows[r];return null},r.Table.prototype.findRows=function(t,e){var i=[];if("string"==typeof e)for(var r=0;r<this.rows.length;r++)this.rows[r].obj[e]===t&&i.push(this.rows[r]);else for(var n=0;n<this.rows.length;n++)this.rows[n].arr[e]===t&&i.push(this.rows[n]);return i},r.Table.prototype.matchRow=function(t,e){if("number"==typeof e){for(var i=0;i<this.rows.length;i++)if(this.rows[i].arr[e].match(t))return this.rows[i]}else for(var r=0;r<this.rows.length;r++)if(this.rows[r].obj[e].match(t))return this.rows[r];return null},r.Table.prototype.matchRows=function(t,e){var i=[];if("number"==typeof e)for(var r=0;r<this.rows.length;r++)this.rows[r].arr[e].match(t)&&i.push(this.rows[r]);else for(var n=0;n<this.rows.length;n++)this.rows[n].obj[e].match(t)&&i.push(this.rows[n]);return i},r.Table.prototype.getColumn=function(t){var e=[];
1if("string"==typeof t)for(var i=0;i<this.rows.length;i++)e.push(this.rows[i].obj[t]);else for(var r=0;r<this.rows.length;r++)e.push(this.rows[r].arr[t]);return e},r.Table.prototype.clearRows=function(){delete this.rows,this.rows=[]},r.Table.prototype.addColumn=function(t){this.columns.push(t||null)},r.Table.prototype.getColumnCount=function(){return this.columns.length},r.Table.prototype.getRowCount=function(){return this.rows.length},r.Table.prototype.removeTokens=function(t,e){for(var i=[],r=0;r<t.length;r++)i.push(t.charAt(r).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));var n=new RegExp(i.join("|"),"g");if(void 0===e)for(var o=0;o<this.columns.length;o++)for(var s=0;s<this.rows.length;s++){var a=this.rows[s].arr[o];a=a.replace(n,""),this.rows[s].arr[o]=a,this.rows[s].obj[this.columns[o]]=a}else if("string"==typeof e)for(var h=0;h<this.rows.length;h++){var l=this.rows[h].obj[e];l=l.replace(n,""),this.rows[h].obj[e]=l;var u=this.columns.indexOf(e);this.rows[h].arr[u]=l}else for(var c=0;c<this.rows.length;c++){var p=this.rows[c].arr[e];p=p.replace(n,""),this.rows[c].arr[e]=p,this.rows[c].obj[this.columns[e]]=p}},r.Table.prototype.trim=function(t){var e=new RegExp(" ","g");if(void 0===t)for(var i=0;i<this.columns.length;i++)for(var r=0;r<this.rows.length;r++){var n=this.rows[r].arr[i];n=n.replace(e,""),this.rows[r].arr[i]=n,this.rows[r].obj[this.columns[i]]=n}else if("string"==typeof t)for(var o=0;o<this.rows.length;o++){var s=this.rows[o].obj[t];s=s.replace(e,""),this.rows[o].obj[t]=s;var a=this.columns.indexOf(t);this.rows[o].arr[a]=s}else for(var h=0;h<this.rows.length;h++){var l=this.rows[h].arr[t];l=l.replace(e,""),this.rows[h].arr[t]=l,this.rows[h].obj[this.columns[t]]=l}},r.Table.prototype.removeColumn=function(t){var e,i;"string"==typeof t?(e=t,i=this.columns.indexOf(t)):(i=t,e=this.columns[t]);var r=this.columns.splice(i+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(r);for(var n=0;n<this.rows.length;n++){var o=this.rows[n].arr,s=o.splice(i+1,o.length);o.pop(),this.rows[n].arr=o.concat(s),delete this.rows[n].obj[e]}},r.Table.prototype.set=function(t,e,i){this.rows[t].set(e,i)},r.Table.prototype.setNum=function(t,e,i){this.rows[t].setNum(e,i)},r.Table.prototype.setString=function(t,e,i){this.rows[t].setString(e,i)},r.Table.prototype.get=function(t,e){return this.rows[t].get(e)},r.Table.prototype.getNum=function(t,e){return this.rows[t].getNum(e)},r.Table.prototype.getString=function(t,e){return this.rows[t].getString(e)},r.Table.prototype.getObject=function(t){for(var e,i={},r=0;r<this.rows.length;r++)if(e=this.rows[r].obj,"string"==typeof t){if(!(0<=this.columns.indexOf(t)))throw new Error('This table has no column named "'+t+'"');i[e[t]]=e}else i[r]=this.rows[r].obj;return i},r.Table.prototype.getArray=function(){for(var t=[],e=0;e<this.rows.length;e++)t.push(this.rows[e].arr);return t},e.exports=r},{"../core/main":23}],49:[function(t,e,i){"use strict";var r=t("../core/main");r.TableRow=function(t,e){var i=[],r={};t&&(i=t.split(e=e||","));for(var n=0;n<i.length;n++)r[n]=i[n];this.arr=i,this.obj=r,this.table=null},r.TableRow.prototype.set=function(t,e){if("string"==typeof t){var i=this.table.columns.indexOf(t);if(!(0<=i))throw new Error('This table has no column named "'+t+'"');this.obj[t]=e,this.arr[i]=e}else{if(!(t<this.table.columns.length))throw new Error("Column #"+t+" is out of the range of this table");this.arr[t]=e,this.obj[this.table.columns[t]]=e}},r.TableRow.prototype.setNum=function(t,e){var i=parseFloat(e);this.set(t,i)},r.TableRow.prototype.setString=function(t,e){var i=e.toString();this.set(t,i)},r.TableRow.prototype.get=function(t){return"string"==typeof t?this.obj[t]:this.arr[t]},r.TableRow.prototype.getNum=function(t){var e;if("NaN"===(e="string"==typeof t?parseFloat(this.obj[t]):parseFloat(this.arr[t])).toString())throw"Error: "+this.obj[t]+" is NaN (Not a Number)";return e},r.TableRow.prototype.getString=function(t){return"string"==typeof t?this.obj[t].toString():this.arr[t].toString()},e.exports=r},{"../core/main":23}],50:[function(t,e,i){"use strict";var r=t("../core/main");r.XML=function(t){if(t)this.DOM=t;else{var e=document.implementation.createDocument(null,"doc");this.DOM=e.createElement("root")}},r.XML.prototype.getParent=function(){return new r.XML(this.DOM.parentElement)},r.XML.prototype.getName=function(){return this.DOM.tagName},r.XML.prototype.setName=function(t){var e=this.DOM.innerHTML,i=this.DOM.attributes,r=document.implementation.createDocument(null,"default").createElement(t);r.innerHTML=e;for(var n=0;n<i.length;n++)r.setAttribute(i[n].nodeName,i.nodeValue);this.DOM=r},r.XML.prototype.hasChildren=function(){return 0<this.DOM.children.length},r.XML.prototype.listChildren=function(){for(var t=[],e=0;e<this.DOM.childNodes.length;e++)t.push(this.DOM.childNodes[e].nodeName);return t},r.XML.prototype.getChildren=function(t){return function(t){for(var e=[],i=0;i<t.length;i++)e.push(new r.XML(t[i]));return e}(t?this.DOM.getElementsByTagName(t):this.DOM.children)},r.XML.prototype.getChild=function(t){if("string"!=typeof t)return new r.XML(this.DOM.children[t]);for(var e=0;e<this.DOM.children.length;e++){var i=this.DOM.children[e];if(i.tagName===t)return new r.XML(i)}},r.XML.prototype.addChild=function(t){t instanceof r.XML&&this.DOM.appendChild(t.DOM)},r.XML.prototype.removeChild=function(t){var e=-1;if("string"==typeof t){for(var i=0;i<this.DOM.children.length;i++)if(this.DOM.children[i].tagName===t){e=i;break}}else e=t;-1!==e&&this.DOM.removeChild(this.DOM.children[e])},r.XML.prototype.getAttributeCount=function(){return this.DOM.attributes.length},r.XML.prototype.listAttributes=function(){for(var t=[],e=0;e<this.DOM.attributes.length;e++)t.push(this.DOM.attributes[e].nodeName);return t},r.XML.prototype.hasAttribute=function(t){for(var e={},i=0;i<this.DOM.attributes.length;i++){var r=this.DOM.attributes[i];e[r.nodeName]=r.nodeValue}return!!e[t]},r.XML.prototype.getNum=function(t,e){for(var i={},r=0;r<this.DOM.attributes.length;r++){var n=this.DOM.attributes[r];i[n.nodeName]=n.nodeValue}return Number(i[t])||e||0},r.XML.prototype.getString=function(t,e){for(var i={},r=0;r<this.DOM.attributes.length;r++){var n=this.DOM.attributes[r];i[n.nodeName]=n.nodeValue}return i[t]?String(i[t]):e||null},r.XML.prototype.setAttribute=function(t,e){this.DOM.setAttribute(t,e)},r.XML.prototype.getContent=function(t){return this.DOM.textContent.replace(/\s\s+/g,",")||t||null},r.XML.prototype.setContent=function(t){this.DOM.children.length||(this.DOM.textContent=t)},r.XML.prototype.serialize=function(){return(new XMLSerializer).serializeToString(this.DOM)},e.exports=r},{"../core/main":23}
1],51:[function(t,e,i){"use strict";var r=t("../core/main");function n(t,e,i){if("function"==typeof Math.hypot)return Math.hypot.apply(null,arguments);for(var r=arguments.length,n=[],o=0,s=0;s<r;s++){var a=arguments[s];if((a=+a)==1/0||a===-1/0)return 1/0;o<(a=Math.abs(a))&&(o=a),n[s]=a}0===o&&(o=1);for(var h=0,l=0,u=0;u<r;u++){var c=n[u]/o,p=c*c-l,f=h+p;l=f-h-p,h=f}return Math.sqrt(h)*o}r.prototype.abs=Math.abs,r.prototype.ceil=Math.ceil,r.prototype.constrain=function(t,e,i){return r._validateParameters("constrain",arguments),Math.max(Math.min(t,i),e)},r.prototype.dist=function(){return r._validateParameters("dist",arguments),4===arguments.length?n(arguments[2]-arguments[0],arguments[3]-arguments[1]):6===arguments.length?n(arguments[3]-arguments[0],arguments[4]-arguments[1],arguments[5]-arguments[2]):void 0},r.prototype.exp=Math.exp,r.prototype.floor=Math.floor,r.prototype.lerp=function(t,e,i){return r._validateParameters("lerp",arguments),i*(e-t)+t},r.prototype.log=Math.log,r.prototype.mag=function(t,e){return r._validateParameters("mag",arguments),n(t,e)},r.prototype.map=function(t,e,i,n,o,s){r._validateParameters("map",arguments);var a=(t-e)/(i-e)*(o-n)+n;return s?n<o?this.constrain(a,n,o):this.constrain(a,o,n):a},r.prototype.max=function(){return r._validateParameters("max",arguments),arguments[0]instanceof Array?Math.max.apply(null,arguments[0]):Math.max.apply(null,arguments)},r.prototype.min=function(){return r._validateParameters("min",arguments),arguments[0]instanceof Array?Math.min.apply(null,arguments[0]):Math.min.apply(null,arguments)},r.prototype.norm=function(t,e,i){return r._validateParameters("norm",arguments),this.map(t,e,i,0,1)},r.prototype.pow=Math.pow,r.prototype.round=Math.round,r.prototype.sq=function(t){return t*t},r.prototype.sqrt=Math.sqrt,e.exports=r},{"../core/main":23}],52:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.createVector=function(t,e,i){return this instanceof r?new r.Vector(this,arguments):new r.Vector(t,e,i)},e.exports=r},{"../core/main":23}],53:[function(t,e,i){"use strict";var r,n=t("../core/main"),o=4095,s=4,a=.5,h=function(t){return.5*(1-Math.cos(t*Math.PI))};n.prototype.noise=function(t,e,i){if(e=e||0,i=i||0,null==r){r=new Array(4096);for(var n=0;n<4096;n++)r[n]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),i<0&&(i=-i);for(var l,u,c,p,f,d=Math.floor(t),m=Math.floor(e),y=Math.floor(i),g=t-d,v=e-m,_=i-y,b=0,x=.5,w=0;w<s;w++){var T=d+(m<<4)+(y<<8);l=h(g),u=h(v),c=r[T&o],c+=l*(r[T+1&o]-c),p=r[T+16&o],c+=u*((p+=l*(r[T+16+1&o]-p))-c),p=r[(T+=256)&o],p+=l*(r[T+1&o]-p),f=r[T+16&o],p+=u*((f+=l*(r[T+16+1&o]-f))-p),b+=(c+=h(_)*(p-c))*x,x*=a,d<<=1,m<<=1,y<<=1,1<=(g*=2)&&(d++,g--),1<=(v*=2)&&(m++,v--),1<=(_*=2)&&(y++,_--)}return b},n.prototype.noiseDetail=function(t,e){0<t&&(s=t),0<e&&(a=e)},n.prototype.noiseSeed=function(t){var e,i,n,o=(n=4294967296,{setSeed:function(t){i=e=(null==t?Math.random()*n:t)>>>0},getSeed:function(){return e},rand:function(){return(i=(1664525*i+1013904223)%n)/n}});o.setSeed(t),r=new Array(4096);for(var s=0;s<4096;s++)r[s]=o.rand()},e.exports=n},{"../core/main":23}],54:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");r.Vector=function(){var t,e,i;i=arguments[0]instanceof r?(this.p5=arguments[0],t=arguments[1][0]||0,e=arguments[1][1]||0,arguments[1][2]||0):(t=arguments[0]||0,e=arguments[1]||0,arguments[2]||0),this.x=t,this.y=e,this.z=i},r.Vector.prototype.toString=function(){return"p5.Vector Object : ["+this.x+", "+this.y+", "+this.z+"]"},r.Vector.prototype.set=function(t,e,i){return t instanceof r.Vector?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):t instanceof Array?(this.x=t[0]||0,this.y=t[1]||0,this.z=t[2]||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},r.Vector.prototype.copy=function(){return this.p5?new r.Vector(this.p5,[this.x,this.y,this.z]):new r.Vector(this.x,this.y,this.z)},r.Vector.prototype.add=function(t,e,i){return t instanceof r.Vector?(this.x+=t.x||0,this.y+=t.y||0,this.z+=t.z||0):t instanceof Array?(this.x+=t[0]||0,this.y+=t[1]||0,this.z+=t[2]||0):(this.x+=t||0,this.y+=e||0,this.z+=i||0),this}
1,r.Vector.prototype.sub=function(t,e,i){return t instanceof r.Vector?(this.x-=t.x||0,this.y-=t.y||0,this.z-=t.z||0):t instanceof Array?(this.x-=t[0]||0,this.y-=t[1]||0,this.z-=t[2]||0):(this.x-=t||0,this.y-=e||0,this.z-=i||0),this},r.Vector.prototype.mult=function(t){return"number"==typeof t&&isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):console.warn("p5.Vector.prototype.mult:","n is undefined or not a finite number"),this},r.Vector.prototype.div=function(t){return"number"==typeof t&&isFinite(t)?0===t?console.warn("p5.Vector.prototype.div:","divide by 0"):(this.x/=t,this.y/=t,this.z/=t):console.warn("p5.Vector.prototype.div:","n is undefined or not a finite number"),this},r.Vector.prototype.mag=function(){return Math.sqrt(this.magSq())},r.Vector.prototype.magSq=function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},r.Vector.prototype.dot=function(t,e,i){return t instanceof r.Vector?this.dot(t.x,t.y,t.z):this.x*(t||0)+this.y*(e||0)+this.z*(i||0)},r.Vector.prototype.cross=function(t){var e=this.y*t.z-this.z*t.y,i=this.z*t.x-this.x*t.z,n=this.x*t.y-this.y*t.x;return this.p5?new r.Vector(this.p5,[e,i,n]):new r.Vector(e,i,n)},r.Vector.prototype.dist=function(t){return t.copy().sub(this).mag()},r.Vector.prototype.normalize=function(){var t=this.mag();return 0!==t&&this.mult(1/t),this},r.Vector.prototype.limit=function(t){var e=this.magSq();return t*t<e&&this.div(Math.sqrt(e)).mult(t),this},r.Vector.prototype.setMag=function(t){return this.normalize().mult(t)},r.Vector.prototype.heading=function(){var t=Math.atan2(this.y,this.x);return this.p5?this.p5._fromRadians(t):t},r.Vector.prototype.rotate=function(t){var e=this.heading()+t;this.p5&&(e=this.p5._toRadians(e));var i=this.mag();return this.x=Math.cos(e)*i,this.y=Math.sin(e)*i,this},r.Vector.prototype.angleBetween=function(t){var e=this.dot(t)/(this.mag()*t.mag()),i=Math.acos(Math.min(1,Math.max(-1,e)));return this.p5?this.p5._fromRadians(i):i},r.Vector.prototype.lerp=function(t,e,i,n){return t instanceof r.Vector?this.lerp(t.x,t.y,t.z,e):(this.x+=(t-this.x)*n||0,this.y+=(e-this.y)*n||0,this.z+=(i-this.z)*n||0,this)},r.Vector.prototype.array=function(){return[this.x||0,this.y||0,this.z||0]},r.Vector.prototype.equals=function(t,e,i){var n,o,s;return s=t instanceof r.Vector?(n=t.x||0,o=t.y||0,t.z||0):t instanceof Array?(n=t[0]||0,o=t[1]||0,t[2]||0):(n=t||0,o=e||0,i||0),this.x===n&&this.y===o&&this.z===s},r.Vector.fromAngle=function(t,e){return void 0===e&&(e=1),new r.Vector(e*Math.cos(t),e*Math.sin(t),0)},r.Vector.fromAngles=function(t,e,i){void 0===i&&(i=1);var n=Math.cos(e),o=Math.sin(e),s=Math.cos(t),a=Math.sin(t);return new r.Vector(i*a*o,-i*s,i*a*n)},r.Vector.random2D=function(){return this.fromAngle(Math.random()*n.TWO_PI)},r.Vector.random3D=function(){var t=Math.random()*n.TWO_PI,e=2*Math.random()-1,i=Math.sqrt(1-e*e),o=i*Math.cos(t),s=i*Math.sin(t);return new r.Vector(o,s,e)},r.Vector.add=function(t,e,i){return i?i.set(t):i=t.copy(),i.add(e),i},r.Vector.sub=function(t,e,i){return i?i.set(t):i=t.copy(),i.sub(e),i},r.Vector.mult=function(t,e,i){return i?i.set(t):i=t.copy(),i.mult(e),i},r.Vector.div=function(t,e,i){return i?i.set(t):i=t.copy(),i.div(e),i},r.Vector.dot=function(t,e){return t.dot(e)},r.Vector.cross=function(t,e){return t.cross(e)},r.Vector.dist=function(t,e){return t.dist(e)},r.Vector.lerp=function(t,e,i,r){return r?r.set(t):r=t.copy(),r.lerp(e,i),r},r.Vector.mag=function(t){var e=t.x,i=t.y,r=t.z;return Math.sqrt(e*e+i*i+r*r)},e.exports=r.Vector},{"../core/constants":17,"../core/main":23}],55:[function(t,e,i){"use strict";var r,n,o,s=t("../core/main"),a=!1,h=!1,l=0,u=(o=2147483647,{setSeed:function(t){n=r=(null==t?Math.random()*o:t)>>>0},getSeed:function(){return r},rand:function(){return(n=(1103515245*n+12345)%o)/o}});s.prototype.randomSeed=function(t){u.setSeed(t),h=!(a=!0)},s.prototype.random=function(t,e){var i;if(i=a?u.rand():Math.random(),void 0===t)return i;if(void 0===e)return t instanceof Array?t[Math.floor(i*t.length)]:i*t;if(e<t){var r=t;t=e,e=r}return i*(e-t)+t},s.prototype.randomGaussian=function(t,e){var i,r,n,o;if(h)i=l,h=!1;else{for(;1<=(o=(r=this.random(2)-1)*r+(n=this.random(2)-1)*n););i=r*(o=Math.sqrt(-2*Math.log(o)/o)),l=n*o,h=!0}return i*(e||1)+(t||0)},e.exports=s},{"../core/main":23}
1],56:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");r.prototype._angleMode=n.RADIANS,r.prototype.acos=function(t){return this._fromRadians(Math.acos(t))},r.prototype.asin=function(t){return this._fromRadians(Math.asin(t))},r.prototype.atan=function(t){return this._fromRadians(Math.atan(t))},r.prototype.atan2=function(t,e){return this._fromRadians(Math.atan2(t,e))},r.prototype.cos=function(t){return Math.cos(this._toRadians(t))},r.prototype.sin=function(t){return Math.sin(this._toRadians(t))},r.prototype.tan=function(t){return Math.tan(this._toRadians(t))},r.prototype.degrees=function(t){return t*n.RAD_TO_DEG},r.prototype.radians=function(t){return t*n.DEG_TO_RAD},r.prototype.angleMode=function(t){t!==n.DEGREES&&t!==n.RADIANS||(this._angleMode=t)},r.prototype._toRadians=function(t){return this._angleMode===n.DEGREES?t*n.DEG_TO_RAD:t},r.prototype._toDegrees=function(t){return this._angleMode===n.RADIANS?t*n.RAD_TO_DEG:t},r.prototype._fromRadians=function(t){return this._angleMode===n.DEGREES?t*n.RAD_TO_DEG:t},e.exports=r},{"../core/constants":17,"../core/main":23}],57:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.textAlign=function(t,e){return r._validateParameters("textAlign",arguments),this._renderer.textAlign.apply(this._renderer,arguments)},r.prototype.textLeading=function(t){return r._validateParameters("textLeading",arguments),this._renderer.textLeading.apply(this._renderer,arguments)},r.prototype.textSize=function(t){return r._validateParameters("textSize",arguments),this._renderer.textSize.apply(this._renderer,arguments)},r.prototype.textStyle=function(t){return r._validateParameters("textStyle",arguments),this._renderer.textStyle.apply(this._renderer,arguments)},r.prototype.textWidth=function(t){return r._validateParameters("textWidth",arguments),0===t.length?0:this._renderer.textWidth.apply(this._renderer,arguments)},r.prototype.textAscent=function(){return r._validateParameters("textAscent",arguments),this._renderer.textAscent()},r.prototype.textDescent=function(){return r._validateParameters("textDescent",arguments),this._renderer.textDescent()},r.prototype._updateTextMetrics=function(){return this._renderer._updateTextMetrics()},e.exports=r},{"../core/main":23}],58:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants"),o=t("opentype.js");t("../core/error_helpers"),r.prototype.loadFont=function(t,e,i){r._validateParameters("loadFont",arguments);var n=new r.Font(this),s=this;return o.load(t,function(o,a){if(o)return r._friendlyFileLoadError(4,t),void 0!==i?i(o):void console.error(o,t);n.font=a,void 0!==e&&e(n),s._decrementPreload();var h,l,u=t.split("\\").pop().split("/").pop(),c=u.lastIndexOf("."),p=c<1?null:u.substr(c+1);-1<["ttf","otf","woff","woff2"].indexOf(p)&&(h=u.substr(0,c),(l=document.createElement("style")).appendChild(document.createTextNode("\n@font-face {\nfont-family: "+h+";\nsrc: url("+t+");\n}\n")),document.head.appendChild(l))}),n},r.prototype.text=function(t,e,i,n,o){return r._validateParameters("text",arguments),this._renderer._doFill||this._renderer._doStroke?this._renderer.text.apply(this._renderer,arguments):this},r.prototype.textFont=function(t,e){if(r._validateParameters("textFont",arguments),arguments.length){if(!t)throw new Error("null font passed to textFont");return this._renderer._setProperty("_textFont",t),e&&(this._renderer._setProperty("_textSize",e),this._renderer._setProperty("_textLeading",e*n._DEFAULT_LEADMULT)),this._renderer._applyTextProperties()}return this._renderer._textFont},e.exports=r},{"../core/constants":17,"../core/error_helpers":19,"../core/main":23,"opentype.js":9}],59:[function(t,e,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=t("../core/main"),o=t("../core/constants");function s(t,e){for(var i=function(t,e){if("object"!==r(t))t=e;else for(var i in e)void 0===t[i]&&(t[i]=e[i]);return t}(e,{sampleFactor:.1,simplifyThreshold:0}),n=f(t,0,1),o=n/(n*i.sampleFactor),s=[],a=0;a<n;a+=o)s.push(f(t,a));return i.simplifyThreshold&&function(t,e){e=void 0===e?0:e;for(var i=t.length-1;3<t.length&&0<=i;--i)u(l(t,i-1),l(t,i),l(t,i+1),e)&&t.splice(i%t.length,1)}(s,i.simplifyThreshold),s}function a(t){for(var e,i=[],r=0;r<t.length;r++)"M"===t[r].type&&(e&&i.push(e),e=[]),e.push(h(t[r]));return i.push(e),i}function h(t){var e=[t.type];return"M"===t.type||"L"===t.type?e.push(t.x,t.y):"C"===t.type?e.push(t.x1,t.y1,t.x2,t.y2,t.x,t.y):"Q"===t.type&&e.push(t.x1,t.y1,t.x,t.y),e}function l(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function u(t,e,i,r){if(!r)return 0==((o=e)[0]-(n=t)[0])*((s=i)[1]-n[1])-(s[0]-n[0])*(o[1]-n[1]);var n,o,s;void 0===u.tmpPoint1&&(u.tmpPoint1=[],u.tmpPoint2=[]);var a=u.tmpPoint1,h=u.tmpPoint2;a.x=e.x-t.x,a.y=e.y-t.y,h.x=i.x-e.x,h.y=i.y-e.y;var l=a.x*h.x+a.y*h.y,c=Math.sqrt(a.x*a.x+a.y*a.y),p=Math.sqrt(h.x*h.x+h.y*h.y);return Math.acos(l/(c*p))<r}function c(t,e,i,r,n,o,s,a,h){var l=1-h,u=Math.pow(l,3),c=Math.pow(l,2),p=h*h,f=p*h,d=u*t+3*c*h*i+3*l*h*h*n+f*s,m=u*e+3*c*h*r+3*l*h*h*o+f*a,y=t+2*h*(i-t)+p*(n-2*i+t),g=e+2*h*(r-e)+p*(o-2*r+e),v=i+2*h*(n-i)+p*(s-2*n+i),_=r+2*h*(o-r)+p*(a-2*o+r),b=l*t+h*i,x=l*e+h*r,w=l*n+h*s,T=l*o+h*a,S=90-180*Math.atan2(y-v,g-_)/Math.PI;return(v<y||g<_)&&(S+=180),{x:d,y:m,m:{x:y,y:g},n:{x:v,y:_},start:{x:b,y:x},end:{x:w,y:T},alpha:S}}
1function p(t,e,i,r,n,o,s,a,h){return null==h?v(t,e,i,r,n,o,s,a):c(t,e,i,r,n,o,s,a,function(t,e,i,r,n,o,s,a,h){if(!(h<0||v(t,e,i,r,n,o,s,a)<h)){var l,u=.5,c=1-u;for(l=v(t,e,i,r,n,o,s,a,c);.01<Math.abs(l-h);)l=v(t,e,i,r,n,o,s,a,c+=(l<h?1:-1)*(u/=2));return c}}(t,e,i,r,n,o,s,a,h))}function f(t,e,i){for(var r,n,o,s,a,h=0,l=0,u=(t=function(t,e){var i,r=d(t),n=void 0,o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=[],h=function(t,e,i){var r,n;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(t[0]in{T:1,Q:1}||(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat((function t(e,i,r,n,o,s,a,h,l,u){var c,p,f,d,m,y=Math.PI,g=120*y/180,v=y/180*(+o||0),_=[],b=function(t,e,i){return{x:t*Math.cos(i)-e*Math.sin(i),y:t*Math.sin(i)+e*Math.cos(i)}};if(u)c=u[0],p=u[1],f=u[2],d=u[3];else{i=(m=b(e,i,-v)).y;var x=((e=m.x)-(h=(m=b(h,l,-v)).x))/2,w=(i-(l=m.y))/2,T=x*x/(r*r)+w*w/(n*n);1<T&&(r*=T=Math.sqrt(T),n*=T);var S=r*r,M=n*n,E=(s===a?-1:1)*Math.sqrt(Math.abs((S*M-S*w*w-M*x*x)/(S*w*w+M*x*x)));f=E*r*w/n+(e+h)/2,d=E*-n*x/r+(i+l)/2,c=Math.asin(((i-d)/n).toFixed(9)),p=Math.asin(((l-d)/n).toFixed(9)),(c=e<f?y-c:c)<0&&(c=2*y+c),(p=h<f?y-p:p)<0&&(p=2*y+p),a&&p<c&&(c-=2*y),!a&&c<p&&(p-=2*y)}var C=p-c;if(Math.abs(C)>g){var A=p,P=h,k=l;p=c+g*(a&&c<p?1:-1),_=t(h=f+r*Math.cos(p),l=d+n*Math.sin(p),r,n,o,0,a,P,k,[p,A,f,d])}C=p-c;var R=Math.cos(c),D=Math.sin(c),O=Math.cos(p),L=Math.sin(p),I=Math.tan(C/4),N=4/3*r*I,F=4/3*n*I,U=[e,i],B=[e+N*D,i-F*R],G=[h+N*L,l-F*O],V=[h,l];if(B[0]=2*U[0]-B[0],B[1]=2*U[1]-B[1],u)return[B,G,V].concat(_);for(var q=[],z=0,j=(_=[B,G,V].concat(_).join().split(",")).length;z<j;z++)q[z]=z%2?b(_[z-1],_[z],v).y:b(_[z],_[z+1],v).x;return q}).apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":n="C"===i||"S"===i?(r=2*e.x-e.bx,2*e.y-e.by):(r=e.x,e.y),t=["C",r,n].concat(t.slice(1));break;case"T":e.qy="Q"===i||"T"===i?(e.qx=2*e.x-e.qx,2*e.y-e.qy):(e.qx=e.x,e.y),t=["C"].concat(g(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(g(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(y(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(y(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(y(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(y(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(7<t[e].length){t[e].shift();for(var n=t[e];n.length;)a[e]="A",t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),i=Math.max(r.length,0)}},u=function(t,e,n,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),n.bx=0,n.by=0,n.x=t[s][1],n.y=t[s][2],i=Math.max(r.length,0))},c="",p="";i=Math.max(r.length,0);for(var f=0;f<i;f++){r[f]&&(c=r[f][0]),"C"!==c&&(a[f]=c,f&&(p=a[f-1])),r[f]=h(r[f],o,p),"A"!==a[f]&&"C"===c&&(a[f]="C"),l(r,f),u(r,n,o,s,f),u(n,r,s,o,f);var m=r[f],v=m.length;o.x=m[v-2],o.y=m[v-1],o.bx=parseFloat(m[v-4])||o.x,o.by=parseFloat(m[v-3])||o.y,s.bx=n,s.by=n,s.x=n,s.y=n}return r}(t)).length;l<u;l++){if("M"===(o=t[l])[0])r=+o[1],n=+o[2];else{if(e<h+(s=p(r,n,o[1],o[2],o[3],o[4],o[5],o[6]))&&!i)return{x:(a=p(r,n,o[1],o[2],o[3],o[4],o[5],o[6],e-h)).x,y:a.y,alpha:a.alpha};h+=s,r=+o[5],n=+o[6]}o.shift()}return(a=i?h:c(r,n,o[0],o[1],o[2],o[3],o[4],o[5],1)).alpha&&(a={x:a.x,y:a.y,alpha:a.alpha}),a}function d(t){var e=[],i=0,r=0,n=0,o=0,s=0;if(!t)return e;"M"===t[0][0]&&(n=i=+t[0][1],o=r=+t[0][2],s++,e[0]=["M",i,r]);for(var a,h,l,u=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),c=s,p=t.length;c<p;c++){if(e.push(h=[]),(l=t[c])[0]!==String.prototype.toUpperCase.call(l[0]))switch(h[0]=String.prototype.toUpperCase.call(l[0]),h[0]){case"A":h[1]=l[1],h[2]=l[2],h[3]=l[3],h[4]=l[4],h[5]=l[5],h[6]=+(l[6]+i),h[7]=+(l[7]+r);break;case"V":h[1]=+l[1]+r;break;case"H":h[1]=+l[1]+i;break;case"R":for(var f=2,d=(a=[i,r].concat(l.slice(1))).length;f<d;f++)a[f]=+a[f]+i,a[++f]=+a[f]+r;e.pop(),e=e.concat(m(a,u));break;case"M":n=+l[1]+i,o=+l[2]+r;break;default:for(f=1,d=l.length;f<d;f++)h[f]=+l[f]+(f%2?i:r)}else if("R"===l[0])a=[i,r].concat(l.slice(1)),e.pop(),e=e.concat(m(a,u)),h=["R"].concat(l.slice(-2));else for(var y=0,g=l.length;y<g;y++)h[y]=l[y];switch(h[0]){case"Z":i=n,r=o;break;case"H":i=h[1];break;case"V":r=h[1];break;case"M":n=h[h.length-2],o=h[h.length-1];break;default:i=h[h.length-2],r=h[h.length-1]}}return e}function m(t,e){for(var i=[],r=0,n=t.length;r<n-2*!e;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?n-4===r?o[3]={x:+t[0],y:+t[1]}:n-2===r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[n-2],y:+t[n-1]}:n-4===r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),i.push(["C",(6*o[1].x-o[0].x+o[2].x)/6,(6*o[1].y-o[0].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i}function y(t,e,i,r){return[t,e,i,r,i,r]}function g(t,e,i,r,n,o){return[1/3*t+2/3*i,1/3*e+2/3*r,1/3*n+2/3*i,1/3*o+2/3*r,n,o]}function v(t,e,i,r,n,o,s,a,h){null==h&&(h=1);for(var l=(h=1<h?1:h<0?0:h)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],c=0,p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0;f<12;f++){var d=l*u[f]+l,m=_(d,t,i,n,s),y=_(d,e,r,o,a);c+=p[f]*Math.sqrt(m*m+y*y)}return l*c}function _(t,e,i,r,n){return t*(t*(-3*e+9*i-9*r+3*n)+6*e-12*i+6*r)-3*e+3*i}n.Font=function(t){this.parent=t,this.cache={},this.font=void 0}
1,n.Font.prototype.textBounds=function(t,e,i,r,n){e=void 0!==e?e:0,i=void 0!==i?i:0;var o,s=n&&n.renderer&&n.renderer._pInst||this.parent;if(r=r||s._renderer._textSize,!o){var a,h,l,u,c=[],p=[],f=this._scale(r);this.font.forEachGlyph(t,e,i,r,n,function(t,e,i,r){var n=t.getMetrics();c.push(e+n.xMin*f),c.push(e+n.xMax*f),p.push(i+-n.yMin*f),p.push(i+-n.yMax*f)}),a=Math.min.apply(null,c),h=Math.min.apply(null,p),l=Math.max.apply(null,c),o={x:a,y:h,h:Math.max.apply(null,p)-h,w:l-a,advance:a-e},u=this._handleAlignment(s._renderer,t,o.x,o.y,o.w+o.advance),o.x=u.x,o.y=u.y}return o},n.Font.prototype.textToPoints=function(t,e,i,r,n){var o,h=0,l=[],u=this._getGlyphs(t);r=r||this.parent._renderer._textSize;for(var c=0;c<u.length;c++){if(!(u[o=c].name&&"space"===u[o].name||t.length===u.length&&" "===t[o]||u[o].index&&3===u[o].index))for(var p=a(u[c].getPath(e,i,r).commands),f=0;f<p.length;f++)for(var d=s(p[f],n),m=0;m<d.length;m++)d[m].x+=h,l.push(d[m]);h+=u[c].advanceWidth*this._scale(r)}return l},n.Font.prototype._getGlyphs=function(t){return this.font.stringToGlyphs(t)},n.Font.prototype._getPath=function(t,e,i,r){var n=(r&&r.renderer&&r.renderer._pInst||this.parent)._renderer,o=this._handleAlignment(n,t,e,i);return this.font.getPath(t,o.x,o.y,n._textSize,r)},n.Font.prototype._getPathData=function(t,e,i,n){var o=3;return"string"==typeof t&&2<arguments.length?t=this._getPath(t,e,i,n):"object"===r(e)&&(n=e),n&&"number"==typeof n.decimals&&(o=n.decimals),t.toPathData(o)},n.Font.prototype._getSVG=function(t,e,i,n){var o=3;return"string"==typeof t&&2<arguments.length?t=this._getPath(t,e,i,n):"object"===r(e)&&(n=e),n&&("number"==typeof n.decimals&&(o=n.decimals),"number"==typeof n.strokeWidth&&(t.strokeWidth=n.strokeWidth),void 0!==n.fill&&(t.fill=n.fill),void 0!==n.stroke&&(t.stroke=n.stroke)),t.toSVG(o)},n.Font.prototype._renderPath=function(t,e,i,n){var s,a=n&&n.renderer||this.parent._renderer,h=a.drawingContext;s="object"===r(t)&&t.commands?t.commands:this._getPath(t,e,i,n).commands,h.beginPath();for(var l=0;l<s.length;l+=1){var u=s[l];"M"===u.type?h.moveTo(u.x,u.y):"L"===u.type?h.lineTo(u.x,u.y):"C"===u.type?h.bezierCurveTo(u.x1,u.y1,u.x2,u.y2,u.x,u.y):"Q"===u.type?h.quadraticCurveTo(u.x1,u.y1,u.x,u.y):"Z"===u.type&&h.closePath()}return a._doStroke&&a._strokeSet&&h.stroke(),a._doFill&&(a._fillSet||a._setFill(o._DEFAULT_TEXT_FILL),h.fill()),this},n.Font.prototype._textWidth=function(t,e){return this.font.getAdvanceWidth(t,e)},n.Font.prototype._textAscent=function(t){return this.font.ascender*this._scale(t)},n.Font.prototype._textDescent=function(t){return-this.font.descender*this._scale(t)},n.Font.prototype._scale=function(t){return 1/this.font.unitsPerEm*(t||this.parent._renderer._textSize)},n.Font.prototype._handleAlignment=function(t,e,i,r,n){var s=t._textSize;switch(void 0===n&&(n=this._textWidth(e,s)),t._textAlign){case o.CENTER:i-=n/2;break;case o.RIGHT:i-=n}switch(t._textBaseline){case o.TOP:r+=this._textAscent(s);break;case o.CENTER:r+=this._textAscent(s)/2;break;case o.BOTTOM:r-=this._textDescent(s)}return{x:i,y:r}},e.exports=n},{"../core/constants":17,"../core/main":23}],60:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.append=function(t,e){return t.push(e),t},r.prototype.arrayCopy=function(t,e,i,r,n){var o,s;t=void 0!==n?(s=Math.min(n,t.length),o=r,t.slice(e,s+e)):(s=void 0!==i?(s=i,Math.min(s,t.length)):t.length,o=0,i=e,t.slice(0,s)),Array.prototype.splice.apply(i,[o,s].concat(t))},r.prototype.concat=function(t,e){return t.concat(e)},r.prototype.reverse=function(t){return t.reverse()},r.prototype.shorten=function(t){return t.pop(),t},r.prototype.shuffle=function(t,e){for(var i,r,n=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t),o=(t=e||n?t:t.slice()).length;1<o;)i=Math.random()*o|0,r=t[--o],t[o]=t[i],t[i]=r;return t},r.prototype.sort=function(t,e){var i=e?t.slice(0,Math.min(e,t.length)):t,r=e?t.slice(Math.min(e,t.length)):[];return(i="string"==typeof i[0]?i.sort():i.sort(function(t,e){return t-e})).concat(r)},r.prototype.splice=function(t,e,i){return Array.prototype.splice.apply(t,[i,0].concat(e)),t}
1,r.prototype.subset=function(t,e,i){return t.slice(e,void 0!==i?e+i:t.length)},e.exports=r},{"../core/main":23}],61:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.float=function(t){return t instanceof Array?t.map(parseFloat):parseFloat(t)},r.prototype.int=function(t,e){return e=e||10,t===1/0||"Infinity"===t?1/0:t===-1/0||"-Infinity"===t?-1/0:"string"==typeof t?parseInt(t,e):"number"==typeof t?0|t:"boolean"==typeof t?t?1:0:t instanceof Array?t.map(function(t){return r.prototype.int(t,e)}):void 0},r.prototype.str=function(t){return t instanceof Array?t.map(r.prototype.str):String(t)},r.prototype.boolean=function(t){return"number"==typeof t?0!==t:"string"==typeof t?"true"===t.toLowerCase():"boolean"==typeof t?t:t instanceof Array?t.map(r.prototype.boolean):void 0},r.prototype.byte=function(t){var e=r.prototype.int(t,10);return"number"==typeof e?(e+128)%256-128:e instanceof Array?e.map(r.prototype.byte):void 0},r.prototype.char=function(t){return"number"!=typeof t||isNaN(t)?t instanceof Array?t.map(r.prototype.char):"string"==typeof t?r.prototype.char(parseInt(t,10)):void 0:String.fromCharCode(t)},r.prototype.unchar=function(t){return"string"==typeof t&&1===t.length?t.charCodeAt(0):t instanceof Array?t.map(r.prototype.unchar):void 0},r.prototype.hex=function(t,e){if(e=null==e?e=8:e,t instanceof Array)return t.map(function(t){return r.prototype.hex(t,e)});if(t===1/0||t===-1/0)return(t===1/0?"F":"0").repeat(e);if("number"==typeof t){t<0&&(t=4294967295+t+1);for(var i=Number(t).toString(16).toUpperCase();i.length<e;)i="0"+i;return i.length>=e&&(i=i.substring(i.length-e,i.length)),i}},r.prototype.unhex=function(t){return t instanceof Array?t.map(r.prototype.unhex):parseInt("0x"+t,16)},e.exports=r},{"../core/main":23}],62:[function(t,e,i){"use strict";var r=t("../core/main");function n(t,e,i){var r=t<0,n=r?t.toString().substring(1):t.toString(),o=n.indexOf("."),s=-1!==o?n.substring(0,o):n,a=-1!==o?n.substring(o+1):"",h=r?"-":"";if(void 0!==i){var l="";(-1!==o||0<i-a.length)&&(l="."),a.length>i&&(a=a.substring(0,i));for(var u=0;u<e-s.length;u++)h+="0";h+=s,h+=l,h+=a;for(var c=0;c<i-a.length;c++)h+="0";return h}for(var p=0;p<Math.max(e-s.length,0);p++)h+="0";return h+n}function o(t,e){var i=(t=t.toString()).indexOf("."),r=-1!==i?t.substring(i):"",n=-1!==i?t.substring(0,i):t;if(n=n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),0===e)r="";else if(void 0!==e)if(e>r.length)for(var o=e-(r+=-1===i?".":"").length+1,s=0;s<o;
1s++)r+="0";else r=r.substring(0,e+1);return n+r}function s(t){return 0<parseFloat(t)?"+"+t.toString():t.toString()}function a(t){return 0<=parseFloat(t)?" "+t.toString():t.toString()}t("../core/error_helpers"),r.prototype.join=function(t,e){return r._validateParameters("join",arguments),t.join(e)},r.prototype.match=function(t,e){return r._validateParameters("match",arguments),t.match(e)},r.prototype.matchAll=function(t,e){r._validateParameters("matchAll",arguments);for(var i=new RegExp(e,"g"),n=i.exec(t),o=[];null!==n;)o.push(n),n=i.exec(t);return o},r.prototype.nf=function(t,e,i){return r._validateParameters("nf",arguments),t instanceof Array?t.map(function(t){return n(t,e,i)}):"[object Arguments]"===Object.prototype.toString.call(t)?3===t.length?this.nf(t[0],t[1],t[2]):2===t.length?this.nf(t[0],t[1]):this.nf(t[0]):n(t,e,i)},r.prototype.nfc=function(t,e){return r._validateParameters("nfc",arguments),t instanceof Array?t.map(function(t){return o(t,e)}):o(t,e)},r.prototype.nfp=function(){r._validateParameters("nfp",arguments);var t=r.prototype.nf.apply(this,arguments);return t instanceof Array?t.map(s):s(t)},r.prototype.nfs=function(){r._validateParameters("nfs",arguments);var t=r.prototype.nf.apply(this,arguments);return t instanceof Array?t.map(a):a(t)},r.prototype.split=function(t,e){return r._validateParameters("split",arguments),t.split(e)},r.prototype.splitTokens=function(t,e){var i;if(r._validateParameters("splitTokens",arguments),void 0!==e){var n=e,o=/\]/g.exec(n),s=/\[/g.exec(n);i=s&&o?(n=n.slice(0,o.index)+n.slice(o.index+1),s=/\[/g.exec(n),n=n.slice(0,s.index)+n.slice(s.index+1),new RegExp("[\\["+n+"\\]]","g")):o?(n=n.slice(0,o.index)+n.slice(o.index+1),new RegExp("["+n+"\\]]","g")):s?(n=n.slice(0,s.index)+n.slice(s.index+1),new RegExp("["+n+"\\[]","g")):new RegExp("["+n+"]","g")}else i=/\s/g;return t.split(i).filter(function(t){return t})},r.prototype.trim=function(t){return r._validateParameters("trim",arguments),t instanceof Array?t.map(this.trim):t.trim()},e.exports=r},{"../core/error_helpers":19,"../core/main":23}],63:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.day=function(){return(new Date).getDate()},r.prototype.hour=function(){return(new Date).getHours()},r.prototype.minute=function(){return(new Date).getMinutes()},r.prototype.millis=function(){return window.performance.now()},r.prototype.month=function(){return(new Date).getMonth()+1},r.prototype.second=function(){return(new Date).getSeconds()},r.prototype.year=function(){return(new Date).getFullYear()},e.exports=r},{"../core/main":23}],64:[function(t,e,i){"use strict";var r=t("../core/main");t("./p5.Geometry");var n=t("../core/constants");r.prototype.plane=function(t,e,i,n){this._assert3d("plane"),r._validateParameters("plane",arguments),void 0===t&&(t=50),void 0===e&&(e=t),void 0===i&&(i=1),void 0===n&&(n=1);var o="plane|"+i+"|"+n;if(!this._renderer.geometryInHash(o)){var s=new r.Geometry(i,n,function(){for(var t,e,i,n=0;n<=this.detailY;n++){e=n/this.detailY;for(var o=0;o<=this.detailX;o++)i=new r.Vector((t=o/this.detailX)-.5,e-.5,0),this.vertices.push(i),this.uvs.push(t,e)}});s.computeFaces().computeNormals(),i<=1&&n<=1?s._makeTriangleEdges()._edgesToVertices():console.log("Cannot draw stroke on plane objects with more than 1 detailX or 1 detailY"),this._renderer.createBuffers(o,s)}return this._renderer.drawBuffersScaled(o,t,e,1),this},r.prototype.box=function(t,e,i,n,o){this._assert3d("box"),r._validateParameters("box",arguments),void 0===t&&(t=50),void 0===e&&(e=t),void 0===i&&(i=e);var s=this._renderer.attributes&&this._renderer.attributes.perPixelLighting;void 0===n&&(n=s?1:4),void 0===o&&(o=s?1:4);var a="box|"+n+"|"+o;if(!this._renderer.geometryInHash(a)){var h=new r.Geometry(n,o,function(){var t=[[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 e=0;e<t.length;e++){for(var i=t[e],n=4*e,o=0;o<4;o++){var s=i[o],a=new r.Vector((2*(1&s)-1)/2,((2&s)-1)/2,((4&s)/2-1)/2);this.vertices.push(a),this.uvs.push(1&o,(2&o)/2)}this.faces.push([n,n+1,n+2]),this.faces.push([n+2,n+1,n+3])}});h.computeNormals(),n<=4&&o<=4?h._makeTriangleEdges()._edgesToVertices():console.log("Cannot draw stroke on box objects with more than 4 detailX or 4 detailY"),this._renderer.createBuffers(a,h)}return this._renderer.drawBuffersScaled(a,t,e,i),this}
1,r.prototype.sphere=function(t,e,i){return this._assert3d("sphere"),r._validateParameters("sphere",arguments),void 0===t&&(t=50),void 0===e&&(e=24),void 0===i&&(i=16),this.ellipsoid(t,t,t,e,i),this};var o=function(t,e,i,n,o,s,a){t=t<=0?1:t,e=e<0?0:e,i=i<=0?t:i,n=n<3?3:n;var h,l,u,c=(s=void 0===s||s)?-2:0,p=(o=o<1?1:o)+((a=void 0===a?0!==e:a)?2:0),f=Math.atan2(t-e,i),d=Math.sin(f),m=Math.cos(f);for(h=c;h<=p;++h){var y,g=h/o,v=i*g;for(y=h<0?(g=v=0,t):o<h?(v=i,g=1,e):t+(e-t)*g,-2!==h&&h!==o+2||(y=0),v-=i/2,l=0;l<n;++l){var _,b=l/n,x=2*Math.PI*b,w=Math.sin(x),T=Math.cos(x);this.vertices.push(new r.Vector(w*y,v,T*y)),_=h<0?new r.Vector(0,-1,0):o<h&&e?new r.Vector(0,1,0):new r.Vector(w*m,d,T*m),this.vertexNormals.push(_),this.uvs.push(b,g)}}var S=0;if(s){for(u=0;u<n;++u)this.faces.push([S+u,S+n+(u+1)%n,S+n+u]);S+=2*n}for(h=0;h<o;++h){for(l=0;l<n;++l){var M=(l+1)%n;this.faces.push([S+l,S+M,S+n+M]),this.faces.push([S+l,S+n+M,S+n+l])}S+=n}if(a)for(S+=n,l=0;l<n;++l)this.faces.push([S+l,S+(l+1)%n,S+n])};r.prototype.cylinder=function(t,e,i,n,s,a){this._assert3d("cylinder"),r._validateParameters("cylinder",arguments),void 0===t&&(t=50),void 0===e&&(e=t),void 0===i&&(i=24),void 0===n&&(n=1),void 0===a&&(a=!0),void 0===s&&(s=!0);var h="cylinder|"+i+"|"+n+"|"+s+"|"+a;if(!this._renderer.geometryInHash(h)){var l=new r.Geometry(i,n);o.call(l,1,1,1,i,n,s,a),i<=24&&n<=16?l._makeTriangleEdges()._edgesToVertices():console.log("Cannot draw stroke on cylinder objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(h,l)}return this._renderer.drawBuffersScaled(h,t,e,t),this},r.prototype.cone=function(t,e,i,n,s){this._assert3d("cone"),r._validateParameters("cone",arguments),void 0===t&&(t=50),void 0===e&&(e=t),void 0===i&&(i=24),void 0===n&&(n=1),void 0===s&&(s=!0);var a="cone|"+i+"|"+n+"|"+s;if(!this._renderer.geometryInHash(a)){var h=new r.Geometry(i,n);o.call(h,1,0,1,i,n,s,!1),i<=24&&n<=16?h._makeTriangleEdges()._edgesToVertices():console.log("Cannot draw stroke on cone objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(a,h)}return this._renderer.drawBuffersScaled(a,t,e,t),this},r.prototype.ellipsoid=function(t,e,i,n,o){this._assert3d("ellipsoid"),r._validateParameters("ellipsoid",arguments),void 0===t&&(t=50),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=24),void 0===o&&(o=16);var s="ellipsoid|"+n+"|"+o;if(!this._renderer.geometryInHash(s)){var a=new r.Geometry(n,o,function(){for(var t=0;t<=this.detailY;t++)for(var e=t/this.detailY,i=Math.PI*e-Math.PI/2,n=Math.cos(i),o=Math.sin(i),s=0;s<=this.detailX;s++){var a=s/this.detailX,h=2*Math.PI*a,l=Math.cos(h),u=Math.sin(h),c=new r.Vector(n*u,o,n*l);this.vertices.push(c),this.vertexNormals.push(c),this.uvs.push(a,e)}});a.computeFaces(),n<=24&&o<=24?a._makeTriangleEdges()._edgesToVertices():console.log("Cannot draw stroke on ellipsoids with more than 24 detailX or 24 detailY"),this._renderer.createBuffers(s,a)}return this._renderer.drawBuffersScaled(s,t,e,i),this},r.prototype.torus=function(t,e,i,n){if(this._assert3d("torus"),r._validateParameters("torus",arguments),void 0===t)t=50;else if(!t)return;if(void 0===e)e=10;else if(!e)return;void 0===i&&(i=24),void 0===n&&(n=16);var o=(e/t).toPrecision(4),s="torus|"+o+"|"+i+"|"+n;if(!this._renderer.geometryInHash(s)){var a=new r.Geometry(i,n,function(){for(var t=0;t<=this.detailY;t++)for(var e=t/this.detailY,i=2*Math.PI*e,n=Math.cos(i),s=Math.sin(i),a=1+o*n,h=0;h<=this.detailX;h++){var l=h/this.detailX,u=2*Math.PI*l,c=Math.cos(u),p=Math.sin(u),f=new r.Vector(a*c,a*p,o*s),d=new r.Vector(n*c,n*p,s);this.vertices.push(f),this.vertexNormals.push(d),this.uvs.push(l,e)}});a.computeFaces(),i<=24&&n<=16?a._makeTriangleEdges()._edgesToVertices():console.log("Cannot draw strokes on torus object with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(s,a)}return this._renderer.drawBuffersScaled(s,t,t,t),this},r.RendererGL.prototype.point=function(t,e,i){void 0===i&&(i=0);var n=[];return n.push(new r.Vector(t,e,i)),this._drawPoints(n,this._pointVertexBuffer),this},r.RendererGL.prototype.triangle=function(t){var e=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5];if(!this.geometryInHash("tri")){var h=new r.Geometry(1,1,function(){var t=[];t.push(new r.Vector(0,0,0)),t.push(new r.Vector(0,1,0)),t.push(new r.Vector(1,0,0)),this.strokeIndices=[[0,1],[1,2],[2,0]],this.vertices=t,this.faces=[[0,1,2]],this.uvs=[0,0,0,1,1,1]});h._makeTriangleEdges()._edgesToVertices(),h.computeNormals(),this.createBuffers("tri",h)}var l=this.uMVMatrix.copy();try{var u=new r.Matrix([n-e,o-i,0,0,s-e,a-i,0,0,0,0,1,0,e,i,0,1]).mult(this.uMVMatrix);this.uMVMatrix=u,this.drawBuffers("tri")}finally{this.uMVMatrix=l}return this},r.RendererGL.prototype.ellipse=function(t){this.arc(t[0],t[1],t[2],t[3],0,n.TWO_PI,n.OPEN,t[4])},r.RendererGL.prototype.arc=function(t){var e,i,o=t,s=arguments[1],a=arguments[2],h=arguments[3],l=arguments[4],u=arguments[5],c=arguments[6],p=arguments[7]||25;if(i=Math.abs(u-l)>=n.TWO_PI?(e="ellipse")+"|"+p+"|":(e="arc")+"|"+l+"|"+u+"|"+c+"|"+p+"|",!this.geometryInHash(i)){var f=new r.Geometry(p,1,function(){if(this.strokeIndices=[],l.toFixed(10)!==u.toFixed(10)){c!==n.PIE&&void 0!==c||(this.vertices.push(new r.Vector(.5,.5,0)),this.uvs.push([.5,.5]));for(var t=0;t<=p;t++){var e=t/p*(u-l)+l,i=.5+Math.cos(e)/2,o=.5+Math.sin(e)/2;this.vertices.push(new r.Vector(i,o,0)),this.uvs.push([i,o]),t<p-1&&(this.faces.push([0,t+1,t+2]),this.strokeIndices.push([t+1,t+2]))}switch(c){case n.PIE:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.strokeIndices.push([0,1]),this.strokeIndices.push([this.vertices.length-2,this.vertices.length-1]),this.strokeIndices.push([0,this.vertices.length-1]);break;case n.CHORD:this.strokeIndices.push([0,1]),this.strokeIndices.push([0,this.vertices.length-1]);break;case n.OPEN:this.strokeIndices.push([0,1]);break;default:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.strokeIndices.push([this.vertices.length-2,this.vertices.length-1])}}});f.computeNormals(),p<=50?f._makeTriangleEdges()._edgesToVertices(f):console.log("Cannot stroke "+e+" with more than 50 detail"),this.createBuffers(i,f)}var d=this.uMVMatrix.copy();try{this.uMVMatrix.translate([o,s,0]),this.uMVMatrix.scale(a,h,1),this.drawBuffers(i)}finally{this.uMVMatrix=d}return this},r.RendererGL.prototype.rect=function(t){var e=this._pInst._glAttributes.perPixelLighting,i=t[0],n=t[1],o=t[2],s=t[3],a=t[4]||(e?1:24),h=t[5]||(e?1:16),l="rect|"+a+"|"+h;if(!this.geometryInHash(l)){var u=new r.Geometry(a,h,function(){for(var t=0;t<=this.detailY;t++)for(var e=t/this.detailY,i=0;i<=this.detailX;i++){var n=i/this.detailX,o=new r.Vector(n,e,0);this.vertices.push(o),this.uvs.push(n,e)}0<a&&0<h&&(this.strokeIndices=[[0,a],[a,(a+1)*(h+1)-1],[(a+1)*(h+1)-1,(a+1)*h],[(a+1)*h,0]])});u.computeFaces().computeNormals()._makeTriangleEdges()._edgesToVertices(),this.createBuffers(l,u)}var c=this.uMVMatrix.copy();try{this.uMVMatrix.translate([i,n,0]),this.uMVMatrix.scale(o,s,1),this.drawBuffers(l)}finally{this.uMVMatrix=c}return this}
1,r.RendererGL.prototype.quad=function(t,e,i,n,o,s,a,h,l,u,c,p){var f="quad|"+t+"|"+e+"|"+i+"|"+n+"|"+o+"|"+s+"|"+a+"|"+h+"|"+l+"|"+u+"|"+c+"|"+p;if(!this.geometryInHash(f)){var d=new r.Geometry(2,2,function(){this.vertices.push(new r.Vector(t,e,i)),this.vertices.push(new r.Vector(n,o,s)),this.vertices.push(new r.Vector(a,h,l)),this.vertices.push(new r.Vector(u,c,p)),this.uvs.push(0,0,1,0,1,1,0,1),this.strokeIndices=[[0,1],[1,2],[2,3],[3,0]]});d.computeNormals()._makeTriangleEdges()._edgesToVertices(),d.faces=[[0,1,2],[2,3,0]],this.createBuffers(f,d)}return this.drawBuffers(f),this},r.RendererGL.prototype.bezier=function(t,e,i,r,n,o,s,a,h,l,u,c){8===arguments.length&&(u=a,l=s,a=o,s=n,n=r,r=i,i=o=h=c=0);var p=this._pInst._bezierDetail||20;this.beginShape();for(var f=0;f<=p;f++){var d=Math.pow(1-f/p,3),m=f/p*3*Math.pow(1-f/p,2),y=3*Math.pow(f/p,2)*(1-f/p),g=Math.pow(f/p,3);this.vertex(t*d+r*m+s*y+l*g,e*d+n*m+a*y+u*g,i*d+o*m+h*y+c*g)}return this.endShape(),this},r.RendererGL.prototype.curve=function(t,e,i,r,n,o,s,a,h,l,u,c){8===arguments.length&&(l=s,u=a,s=n,a=r,n=r=i,i=o=h=c=0);var p=this._pInst._curveDetail;this.beginShape();for(var f=0;f<=p;f++){var d=.5*Math.pow(f/p,3),m=.5*Math.pow(f/p,2),y=f/p*.5;this.vertex(d*(3*r-t-3*s+l)+m*(2*t-5*r+4*s-l)+y*(-t+s)+2*r*.5,d*(3*n-e-3*a+u)+m*(2*e-5*n+4*a-u)+y*(-e+a)+2*n*.5,d*(3*o-i-3*h+c)+m*(2*i-5*o+4*h-c)+y*(-i+h)+2*o*.5)}return this.endShape(),this},r.RendererGL.prototype.line=function(){return 6===arguments.length?(this.beginShape(),this.vertex(arguments[0],arguments[1],arguments[2]),this.vertex(arguments[3],arguments[4],arguments[5]),this.endShape()):4===arguments.length&&(this.beginShape(),this.vertex(arguments[0],arguments[1],0),this.vertex(arguments[2],arguments[3],0),this.endShape()),this},r.RendererGL.prototype.bezierVertex=function(){if(0===this.immediateMode._bezierVertex.length)throw Error("vertex() must be used once before calling bezierVertex()");var t,e,i=[],r=[],n=[],o=arguments.length;if((t=0)===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var s=1/this._lutBezierDetail,a=0,h=1,l=0;a<1;){if(t=parseFloat(a.toFixed(6)),this._lookUpTableBezier[l]=this._bezierCoefficients(t),h.toFixed(6)===s.toFixed(6)){t=parseFloat(h.toFixed(6))+parseFloat(a.toFixed(6)),this._lookUpTableBezier[++l]=this._bezierCoefficients(t);break}a+=s,h-=s,++l}}var u=this._lookUpTableBezier.length;if(6===o){for(this.isBezier=!0,i=[this.immediateMode._bezierVertex[0],arguments[0],arguments[2],arguments[4]],r=[this.immediateMode._bezierVertex[1],arguments[1],arguments[3],arguments[5]],e=0;e<u;e++)this.vertex(i[0]*this._lookUpTableBezier[e][0]+i[1]*this._lookUpTableBezier[e][1]+i[2]*this._lookUpTableBezier[e][2]+i[3]*this._lookUpTableBezier[e][3],r[0]*this._lookUpTableBezier[e][0]+r[1]*this._lookUpTableBezier[e][1]+r[2]*this._lookUpTableBezier[e][2]+r[3]*this._lookUpTableBezier[e][3]);this.immediateMode._bezierVertex[0]=arguments[4],this.immediateMode._bezierVertex[1]=arguments[5]}else if(9===o){for(this.isBezier=!0,i=[this.immediateMode._bezierVertex[0],arguments[0],arguments[3],arguments[6]],r=[this.immediateMode._bezierVertex[1],arguments[1],arguments[4],arguments[7]],n=[this.immediateMode._bezierVertex[2],arguments[2],arguments[5],arguments[8]],e=0;e<u;e++)this.vertex(i[0]*this._lookUpTableBezier[e][0]+i[1]*this._lookUpTableBezier[e][1]+i[2]*this._lookUpTableBezier[e][2]+i[3]*this._lookUpTableBezier[e][3],r[0]*this._lookUpTableBezier[e][0]+r[1]*this._lookUpTableBezier[e][1]+r[2]*this._lookUpTableBezier[e][2]+r[3]*this._lookUpTableBezier[e][3],n[0]*this._lookUpTableBezier[e][0]+n[1]*this._lookUpTableBezier[e][1]+n[2]*this._lookUpTableBezier[e][2]+n[3]*this._lookUpTableBezier[e][3]);this.immediateMode._bezierVertex[0]=arguments[6],this.immediateMode._bezierVertex[1]=arguments[7],this.immediateMode._bezierVertex[2]=arguments[8]}},r.RendererGL.prototype.quadraticVertex=function(){if(0===this.immediateMode._quadraticVertex.length)throw Error("vertex() must be used once before calling quadraticVertex()");var t,e,i=[],r=[],n=[],o=arguments.length;if((t=0)===this._lookUpTableQuadratic.length||this._lutQuadraticDetail!==this._pInst._curveDetail){this._lookUpTableQuadratic=[],this._lutQuadraticDetail
1=this._pInst._curveDetail;for(var s=1/this._lutQuadraticDetail,a=0,h=1,l=0;a<1;){if(t=parseFloat(a.toFixed(6)),this._lookUpTableQuadratic[l]=this._quadraticCoefficients(t),h.toFixed(6)===s.toFixed(6)){t=parseFloat(h.toFixed(6))+parseFloat(a.toFixed(6)),this._lookUpTableQuadratic[++l]=this._quadraticCoefficients(t);break}a+=s,h-=s,++l}}var u=this._lookUpTableQuadratic.length;if(4===o){for(this.isQuadratic=!0,i=[this.immediateMode._quadraticVertex[0],arguments[0],arguments[2]],r=[this.immediateMode._quadraticVertex[1],arguments[1],arguments[3]],e=0;e<u;e++)this.vertex(i[0]*this._lookUpTableQuadratic[e][0]+i[1]*this._lookUpTableQuadratic[e][1]+i[2]*this._lookUpTableQuadratic[e][2],r[0]*this._lookUpTableQuadratic[e][0]+r[1]*this._lookUpTableQuadratic[e][1]+r[2]*this._lookUpTableQuadratic[e][2]);this.immediateMode._quadraticVertex[0]=arguments[2],this.immediateMode._quadraticVertex[1]=arguments[3]}else if(6===o){for(this.isQuadratic=!0,i=[this.immediateMode._quadraticVertex[0],arguments[0],arguments[3]],r=[this.immediateMode._quadraticVertex[1],arguments[1],arguments[4]],n=[this.immediateMode._quadraticVertex[2],arguments[2],arguments[5]],e=0;e<u;e++)this.vertex(i[0]*this._lookUpTableQuadratic[e][0]+i[1]*this._lookUpTableQuadratic[e][1]+i[2]*this._lookUpTableQuadratic[e][2],r[0]*this._lookUpTableQuadratic[e][0]+r[1]*this._lookUpTableQuadratic[e][1]+r[2]*this._lookUpTableQuadratic[e][2],n[0]*this._lookUpTableQuadratic[e][0]+n[1]*this._lookUpTableQuadratic[e][1]+n[2]*this._lookUpTableQuadratic[e][2]);this.immediateMode._quadraticVertex[0]=arguments[3],this.immediateMode._quadraticVertex[1]=arguments[4],this.immediateMode._quadraticVertex[2]=arguments[5]}},r.RendererGL.prototype.curveVertex=function(){var t,e,i=[],r=[],n=[];t=0;var o=arguments.length;if(0===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var s=1/this._lutBezierDetail,a=0,h=1,l=0;a<1;){if(t=parseFloat(a.toFixed(6)),this._lookUpTableBezier[l]=this._bezierCoefficients(t),h.toFixed(6)===s.toFixed(6)){t=parseFloat(h.toFixed(6))+parseFloat(a.toFixed(6)),this._lookUpTableBezier[++l]=this._bezierCoefficients(t);break}a+=s,h-=s,++l}}var u=this._lookUpTableBezier.length;if(2===o){if(this.immediateMode._curveVertex.push(arguments[0]),this.immediateMode._curveVertex.push(arguments[1]),8===this.immediateMode._curveVertex.length){for(this.isCurve=!0,i=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[6]]),r=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[7]]),e=0;e<u;e++)this.vertex(i[0]*this._lookUpTableBezier[e][0]+i[1]*this._lookUpTableBezier[e][1]+i[2]*this._lookUpTableBezier[e][2]+i[3]*this._lookUpTableBezier[e][3],r[0]*this._lookUpTableBezier[e][0]+r[1]*this._lookUpTableBezier[e][1]+r[2]*this._lookUpTableBezier[e][2]+r[3]*this._lookUpTableBezier[e][3]);for(e=0;e<o;e++)this.immediateMode._curveVertex.shift()}}else if(3===o&&(this.immediateMode._curveVertex.push(arguments[0]),this.immediateMode._curveVertex.push(arguments[1]),this.immediateMode._curveVertex.push(arguments[2]),12===this.immediateMode._curveVertex.length)){for(this.isCurve=!0,i=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[6],this.immediateMode._curveVertex[9]]),r=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[7],this.immediateMode._curveVertex[10]]),n=this._bezierToCatmull([this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[8],this.immediateMode._curveVertex[11]]),e=0;e<u;e++)this.vertex(i[0]*this._lookUpTableBezier[e][0]+i[1]*this._lookUpTableBezier[e][1]+i[2]*this._lookUpTableBezier[e][2]+i[3]*this._lookUpTableBezier[e][3],r[0]*this._lookUpTableBezier[e][0]+r[1]*this._lookUpTableBezier[e][1]+r[2]*this._lookUpTableBezier[e][2]+r[3]*this._lookUpTableBezier[e][3],n[0]*this._lookUpTableBezier[e][0]+n[1]*this._lookUpTableBezier[e][1]+n[2]*this._lookUpTableBezier[e][2]+n[3]*this._lookUpTableBezier[e][3]);for(e=0;e<o;e++)this.immediateMode._curveVertex.shift()}}
1,r.RendererGL.prototype.image=function(t,e,i,r,o,s,a,h,l){this._pInst.push(),this._pInst.texture(t),this._pInst.textureMode(n.NORMAL);var u=0;e<=t.width&&(u=e/t.width);var c=1;e+r<=t.width&&(c=(e+r)/t.width);var p=0;i<=t.height&&(p=i/t.height);var f=1;i+o<=t.height&&(f=(i+o)/t.height),this.beginShape(),this.vertex(s,a,0,u,p),this.vertex(s+h,a,0,c,p),this.vertex(s+h,a+l,0,c,f),this.vertex(s,a+l,0,u,f),this.endShape(n.CLOSE),this._pInst.pop()},e.exports=r},{"../core/constants":17,"../core/main":23,"./p5.Geometry":70}],65:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");r.prototype.orbitControl=function(t,e){if(this._assert3d("orbitControl"),r._validateParameters("orbitControl",arguments),this.mouseX<this.width&&0<this.mouseX&&this.mouseY<this.height&&0<this.mouseY){var i=this._renderer._curCamera;void 0===t&&(t=1),void 0===e&&(e=t),!0!==this.contextMenuDisabled&&(this.canvas.oncontextmenu=function(){return!1},this._setProperty("contextMenuDisabled",!0)),!0!==this.wheelDefaultDisabled&&(this.canvas.onwheel=function(){return!1},this._setProperty("wheelDefaultDisabled",!0));var n=this.height<this.width?this.height:this.width;if(this._mouseWheelDeltaY!==this._pmouseWheelDeltaY&&this._renderer._curCamera._orbit(0,0,0<this._mouseWheelDeltaY?.5*n:-.5*n),this.mouseIsPressed)if(this.mouseButton===this.LEFT)this._renderer._curCamera._orbit(-t*(this.mouseX-this.pmouseX)/n,e*(this.mouseY-this.pmouseY)/n,0);else if(this.mouseButton===this.RIGHT){var o=i._getLocalAxes(),s=Math.sqrt(o.x[0]*o.x[0]+o.x[2]*o.x[2]);0!==s&&(o.x[0]/=s,o.x[2]/=s);var a=Math.sqrt(o.y[0]*o.y[0]+o.y[2]*o.y[2]);0!==a&&(o.y[0]/=a,o.y[2]/=a);var h=-1*t*(this.mouseX-this.pmouseX),l=-1*e*(this.mouseY-this.pmouseY);i.setPosition(i.eyeX+h*o.x[0]+l*o.z[0],i.eyeY,i.eyeZ+h*o.x[2]+l*o.z[2])}return this}},r.prototype.debugMode=function(){this._assert3d("debugMode"),r._validateParameters("debugMode",arguments);for(var t=this._registeredMethods.post.length-1;0<=t;t--)this._registeredMethods.post[t].toString()!==this._grid().toString()&&this._registeredMethods.post[t].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(t,1);arguments[0]===n.GRID?this.registerMethod("post",this._grid.call(this,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])):arguments[0]===n.AXES?this.registerMethod("post",this._axesIcon.call(this,arguments[1],arguments[2],arguments[3],arguments[4])):(this.registerMethod("post",this._grid.call(this,arguments[0],arguments[1],arguments[2],arguments[3],arguments[4])),this.registerMethod("post",this._axesIcon.call(this,arguments[5],arguments[6],arguments[7],arguments[8])))},r.prototype.noDebugMode=function(){this._assert3d("noDebugMode");for(var t=this._registeredMethods.post.length-1;0<=t;t--)this._registeredMethods.post[t].toString()!==this._grid().toString()&&this._registeredMethods.post[t].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(t,1)},r.prototype._grid=function(t,e,i,r,n){void 0===t&&(t=this.width/2),void 0===e&&(e=Math.round(t/30)<4?4:Math.round(t/30)),void 0===i&&(i=0),void 0===r&&(r=0),void 0===n&&(n=0);var o=t/e,s=t/2;return function(){this.push(),this.stroke(255*this._renderer.curStrokeColor[0],255*this._renderer.curStrokeColor[1],255*this._renderer.curStrokeColor[2]),this._renderer.uMVMatrix.set(this._renderer._curCamera.cameraMatrix.mat4[0],this._renderer._curCamera.cameraMatrix.mat4[1],this._renderer._curCamera.cameraMatrix.mat4[2],this._renderer._curCamera.cameraMatrix.mat4[3],this._renderer._curCamera.cameraMatrix.mat4[4],this._renderer._curCamera.cameraMatrix.mat4[5],this._renderer._curCamera.cameraMatrix.mat4[6],this._renderer._curCamera.cameraMatrix.mat4[7],this._renderer._curCamera.cameraMatrix.mat4[8],this._renderer._curCamera.cameraMatrix.mat4[9],this._renderer._curCamera.cameraMatrix.mat4[10],this._renderer._curCamera.cameraMatrix.mat4[11],this._renderer._curCamera.cameraMatrix.mat4[12],this._renderer._curCamera.cameraMatrix.mat4[13],this._renderer._curCamera.cameraMatrix.mat4[14],this._renderer._curCamera.cameraMatrix.mat4[15]);for(var t=0;t<=e;t++)this.beginShape(this.LINES),this.vertex(-s+i,r,t*o-s+n),this.vertex(+s+i,r,t*o-s+n),this.endShape();for(var a=0;a<=e;a++)this.beginShape(this.LINES),this.vertex(a*o-s+i,r,-s+n),this.vertex(a*o-s+i,r,+s+n),this.endShape();this.pop()}}
1,r.prototype._axesIcon=function(t,e,i,r){return void 0===t&&(t=40<this.width/20?this.width/20:40),void 0===e&&(e=-this.width/4),void 0===i&&(i=e),void 0===r&&(r=e),function(){this.push(),this._renderer.uMVMatrix.set(this._renderer._curCamera.cameraMatrix.mat4[0],this._renderer._curCamera.cameraMatrix.mat4[1],this._renderer._curCamera.cameraMatrix.mat4[2],this._renderer._curCamera.cameraMatrix.mat4[3],this._renderer._curCamera.cameraMatrix.mat4[4],this._renderer._curCamera.cameraMatrix.mat4[5],this._renderer._curCamera.cameraMatrix.mat4[6],this._renderer._curCamera.cameraMatrix.mat4[7],this._renderer._curCamera.cameraMatrix.mat4[8],this._renderer._curCamera.cameraMatrix.mat4[9],this._renderer._curCamera.cameraMatrix.mat4[10],this._renderer._curCamera.cameraMatrix.mat4[11],this._renderer._curCamera.cameraMatrix.mat4[12],this._renderer._curCamera.cameraMatrix.mat4[13],this._renderer._curCamera.cameraMatrix.mat4[14],this._renderer._curCamera.cameraMatrix.mat4[15]),this.strokeWeight(2),this.stroke(255,0,0),this.beginShape(this.LINES),this.vertex(e,i,r),this.vertex(e+t,i,r),this.endShape(),this.stroke(0,255,0),this.beginShape(this.LINES),this.vertex(e,i,r),this.vertex(e,i+t,r),this.endShape(),this.stroke(0,0,255),this.beginShape(this.LINES),this.vertex(e,i,r),this.vertex(e,i,r+t),this.endShape(),this.pop()}},e.exports=r},{"../core/constants":17,"../core/main":23}],66:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.ambientLight=function(t,e,i,n){this._assert3d("ambientLight"),r._validateParameters("ambientLight",arguments);var o=this.color.apply(this,arguments);return this._renderer.ambientLightColors.push(o._array[0],o._array[1],o._array[2]),this._renderer._enableLighting=!0,this},r.prototype.directionalLight=function(t,e,i,n,o,s){var a,h,l,u;this._assert3d("directionalLight"),r._validateParameters("directionalLight",arguments),a=t instanceof r.Color?t:this.color(t,e,i);var c=arguments[arguments.length-1];u="number"==typeof c?(h=arguments[arguments.length-3],l=arguments[arguments.length-2],arguments[arguments.length-1]):(h=c.x,l=c.y,c.z);var p=Math.sqrt(h*h+l*l+u*u);return this._renderer.directionalLightDirections.push(h/p,l/p,u/p),this._renderer.directionalLightColors.push(a._array[0],a._array[1],a._array[2]),this._renderer._enableLighting=!0,this},r.prototype.pointLight=function(t,e,i,n,o,s){var a,h,l,u;this._assert3d("pointLight"),r._validateParameters("pointLight",arguments),a=t instanceof r.Color?t:this.color(t,e,i);var c=arguments[arguments.length-1];return u="number"==typeof c?(h=arguments[arguments.length-3],l=arguments[arguments.length-2],arguments[arguments.length-1]):(h=c.x,l=c.y,c.z),this._renderer.pointLightPositions.push(h,l,u),this._renderer.pointLightColors.push(a._array[0],a._array[1],a._array[2]),this._renderer._enableLighting=!0,this},r.prototype.lights=function(){return this._assert3d("lights"),this.ambientLight(128,128,128),this.directionalLight(128,128,128,0,0,-1),this},r.prototype.lightFalloff=function(t,e,i){return this._assert3d("lightFalloff"),r._validateParameters("lightFalloff",arguments),t<0&&(t=0,console.warn("Value of constant argument in lightFalloff() should be never be negative. Set to 0.")),e<0&&(e=0,console.warn("Value of linear argument in lightFalloff() should be never be negative. Set to 0.")),i<0&&(i=0,console.warn("Value of quadratic argument in lightFalloff() should be never be negative. Set to 0.")),0===t&&0===e&&0===i&&(t=1,console.warn("Either one of the three arguments in lightFalloff() should be greater than zero. Set constant argument to 1.")),this._renderer.constantAttenuation=t,this._renderer.linearAttenuation=e,this._renderer.quadraticAttenuation=i,this},e.exports=r},{"../core/main":23}],67:[function(t,e,i){"use strict";var r=t("../core/main");function n(t,e,i){for(var r=0,n=t.length;r<n;r++)if(t[r]!==e.getUint8(i+r,!1))return!1;return!0}t("./p5.Geometry"),r.prototype.loadModel=function(t){var e,i,o;r._validateParameters("loadModel",arguments),o="boolean"==typeof arguments[1]?(e=arguments[1],i=arguments[2],arguments[3]):(e=!1,i=arguments[1],arguments[2]);var s=t.slice(-4),a=new r.Geometry;a.gid=t+"|"+e;var h=this;return".stl"===s?this.httpDo(t,"GET","arrayBuffer",(function(t){!function(t,e){if(function(t){for(var e=new DataView(t),i=[115,111,108,105,100],r=0;r<5;r++)if(n(i,e,r))return!1;return!0}(e))!function(t,e){for(var i,n,o,s,a,h,l,u=new DataView(e),c=u.getUint32(80,!0),p=!1,f=0;f<70;f++)1129270351===u.getUint32(f,!1)&&82===u.getUint8(f+4)&&61===u.getUint8(f+5)&&(p=!0,s=[],a=u.getUint8(f+6)/255,h=u.getUint8(f+7)/255,l=u.getUint8(f+8)/255
1);for(var d=0;d<c;d++){var m=84+50*d,y=u.getFloat32(m,!0),g=u.getFloat32(m+4,!0),v=u.getFloat32(m+8,!0);if(p){var _=u.getUint16(m+48,!0);o=0==(32768&_)?(i=(31&_)/31,n=(_>>5&31)/31,(_>>10&31)/31):(i=a,n=h,l)}for(var b=1;b<=3;b++){var x=m+12*b,w=new r.Vector(u.getFloat32(x,!0),u.getFloat32(x+8,!0),u.getFloat32(x+4,!0));t.vertices.push(w),p&&s.push(i,n,o)}var T=new r.Vector(y,g,v);t.vertexNormals.push(T,T,T),t.faces.push([3*d,3*d+1,3*d+2])}}(t,e);else{var i=new DataView(e);if(!("TextDecoder"in window))return console.warn("Sorry, ASCII STL loading only works in browsers that support TextDecoder (https://caniuse.com/#feat=textencoder)");!function(t,e){for(var i,n,o="",s=[],a=0;a<e.length;++a){for(var h=e[a].trim(),l=h.split(" "),u=0;u<l.length;++u)""===l[u]&&l.splice(u,1);if(0!==l.length)switch(o){case"":if("solid"!==l[0])return console.error(h),console.error('Invalid state "'+l[0]+'", should be "solid"');o="solid";break;case"solid":if("facet"!==l[0]||"normal"!==l[1])return console.error(h),console.error('Invalid state "'+l[0]+'", should be "facet normal"');i=new r.Vector(parseFloat(l[2]),parseFloat(l[3]),parseFloat(l[4])),t.vertexNormals.push(i,i,i),o="facet normal";break;case"facet normal":if("outer"!==l[0]||"loop"!==l[1])return console.error(h),console.error('Invalid state "'+l[0]+'", should be "outer loop"');o="vertex";break;case"vertex":if("vertex"===l[0])n=new r.Vector(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])),t.vertices.push(n),s.push(t.vertices.indexOf(n));else{if("endloop"!==l[0])return console.error(h),console.error('Invalid state "'+l[0]+'", should be "vertex" or "endloop"');t.faces.push(s),s=[],o="endloop"}break;case"endloop":if("endfacet"!==l[0])return console.error(h),console.error('Invalid state "'+l[0]+'", should be "endfacet"');o="endfacet";break;case"endfacet":if("endsolid"===l[0]);else{if("facet"!==l[0]||"normal"!==l[1])return console.error(h),console.error('Invalid state "'+l[0]+'", should be "endsolid" or "facet normal"');i=new r.Vector(parseFloat(l[2]),parseFloat(l[3]),parseFloat(l[4])),t.vertexNormals.push(i,i,i),o="facet normal"}break;default:console.error('Invalid state "'+o+'"')}}}(t,new TextDecoder("utf-8").decode(i).split("\n"))}}(a,t),e&&a.normalize(),h._decrementPreload(),"function"==typeof i&&i(a)}).bind(this),o):".obj"===s?this.loadStrings(t,(function(t){!function(t,e){for(var i={v:[],vt:[],vn:[]},n={},o=0;o<e.length;++o){var s=e[o].trim().split(/\b\s+/);if(0<s.length)if("v"===s[0]||"vn"===s[0]){var a=new r.Vector(parseFloat(s[1]),parseFloat(s[2]),parseFloat(s[3]));i[s[0]].push(a)}else if("vt"===s[0]){var h=[parseFloat(s[1]),parseFloat(s[2])];i[s[0]].push(h)}else if("f"===s[0])for(var l=3;l<s.length;++l){for(var u=[],c=[1,l-1,l],p=0;p<c.length;++p){var f=s[c[p]],d=0;if(void 0!==n[f])d=n[f];else{for(var m=f.split("/"),y=0;y<m.length;y++)m[y]=parseInt(m[y])-1;d=n[f]=t.vertices.length,t.vertices.push(i.v[m[0]].copy()),t.uvs.push(i.vt[m[1]]?i.vt[m[1]].slice():[0,0]),i.vn[m[2]]&&t.vertexNormals.push(i.vn[m[2]].copy())}u.push(d)}u[0]!==u[1]&&u[0]!==u[2]&&u[1]!==u[2]&&t.faces.push(u)}}0===t.vertexNormals.length&&t.computeNormals()}(a,t),e&&a.normalize(),h._decrementPreload(),"function"==typeof i&&i(a)}).bind(this),o):(r._friendlyFileLoadError(3,t),o?o():console.error("Sorry, the file type is invalid. Only OBJ and STL files are supported.")),a},r.prototype.model=function(t){this._assert3d("model"),r._validateParameters("model",arguments),0<t.vertices.length&&(this._renderer.geometryInHash(t.gid)||(t._makeTriangleEdges()._edgesToVertices(),this._renderer.createBuffers(t.gid,t)),this._renderer.drawBuffers(t.gid))},e.exports=r},{"../core/main":23,"./p5.Geometry":70}],68:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");t("./p5.Texture"),r.prototype.loadShader=function(t,e,i,n){r._validateParameters("loadShader",arguments),n||(n=console.error);var o=new r.Shader,s=this,a=!1,h=!1,l=function(){s._decrementPreload(),i&&i(o)};return this.loadStrings(t,function(t){o._vertSrc=t.join("\n"),h=!0,a&&l(
1)},n),this.loadStrings(e,function(t){o._fragSrc=t.join("\n"),a=!0,h&&l()},n),o},r.prototype.createShader=function(t,e){return this._assert3d("createShader"),r._validateParameters("createShader",arguments),new r.Shader(this._renderer,t,e)},r.prototype.shader=function(t){return this._assert3d("shader"),r._validateParameters("shader",arguments),void 0===t._renderer&&(t._renderer=this._renderer),t.isStrokeShader()?this._renderer.userStrokeShader=t:(this._renderer.userFillShader=t,this._renderer._useNormalMaterial=!1),t.init(),this},r.prototype.resetShader=function(){return this._renderer.userFillShader=this._renderer.userStrokeShader=null,this},r.prototype.normalMaterial=function(){return this._assert3d("normalMaterial"),r._validateParameters("normalMaterial",arguments),this._renderer.drawMode=n.FILL,this._renderer._useSpecularMaterial=!1,this._renderer._useNormalMaterial=!0,this._renderer.curFillColor=[1,1,1,1],this._renderer._setProperty("_doFill",!0),this.noStroke(),this},r.prototype.texture=function(t){return this._assert3d("texture"),r._validateParameters("texture",arguments),this._renderer.drawMode=n.TEXTURE,this._renderer._useSpecularMaterial=!1,this._renderer._useNormalMaterial=!1,this._renderer._tex=t,this._renderer._setProperty("_doFill",!0),this},r.prototype.textureMode=function(t){t!==n.IMAGE&&t!==n.NORMAL?console.warn("You tried to set "+t+" textureMode only supports IMAGE & NORMAL "):this._renderer.textureMode=t},r.prototype.textureWrap=function(t,e){e=e||t,this._renderer.textureWrapX=t,this._renderer.textureWrapY=e;for(var i=this._renderer.textures,r=0;r<i.length;r++)i[r].setWrapMode(t,e)},r.prototype.ambientMaterial=function(t,e,i,n){this._assert3d("ambientMaterial"),r._validateParameters("ambientMaterial",arguments);var o=r.prototype.color.apply(this,arguments);return this._renderer.curFillColor=o._array,this._renderer._useSpecularMaterial=!1,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._tex=null,this},r.prototype.specularMaterial=function(t,e,i,n){this._assert3d("specularMaterial"),r._validateParameters("specularMaterial",arguments);var o=r.prototype.color.apply(this,arguments);return this._renderer.curFillColor=o._array,this._renderer._useSpecularMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._tex=null,this},r.prototype.shininess=function(t){return this._assert3d("shininess"),r._validateParameters("shininess",arguments),t<1&&(t=1),this._renderer._useShininess=t,this},r.RendererGL.prototype._applyColorBlend=function(t){var e=this.GL,i=this.drawMode===n.TEXTURE;return i||t[t.length-1]<1?(e.depthMask(i),e.enable(e.BLEND),this._applyBlendMode()):(e.depthMask(!0),e.disable(e.BLEND)),t},r.RendererGL.prototype._applyBlendMode=function(){var t=this.GL;switch(this.curBlendMode){case n.BLEND:case n.ADD:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA);break;case n.MULTIPLY:t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ONE,t.ONE);break;case n.SCREEN:t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE_MINUS_DST_COLOR,t.ONE,t.ONE,t.ONE);break;case n.EXCLUSION:t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE_MINUS_DST_COLOR,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE);break;case n.REPLACE:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO);break;case n.SUBTRACT:t.blendEquationSeparate(t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE,t.ONE,t.ONE);break;case n.DARKEST:this.blendExt?(t.blendEquationSeparate(this.blendExt.MIN_EXT,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):console.warn("blendMode(DARKEST) does not work in your browser in WEBGL mode.");break;case n.LIGHTEST:this.blendExt?(t.blendEquationSeparate(this.blendExt.MAX_EXT,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):console.warn("blendMode(LIGHTEST) does not work in your browser in WEBGL mode.");break;default:console.error("Oops! Somehow RendererGL set curBlendMode to an unsupported mode.")}},e.exports=r},{"../core/constants":17,"../core/main":23,"./p5.Texture":76}
1],69:[function(t,e,i){"use strict";var r=t("../core/main");r.prototype.camera=function(){return this._assert3d("camera"),r._validateParameters("camera",arguments),this._renderer._curCamera.camera.apply(this._renderer._curCamera,arguments),this},r.prototype.perspective=function(){return this._assert3d("perspective"),r._validateParameters("perspective",arguments),this._renderer._curCamera.perspective.apply(this._renderer._curCamera,arguments),this},r.prototype.ortho=function(){return this._assert3d("ortho"),r._validateParameters("ortho",arguments),this._renderer._curCamera.ortho.apply(this._renderer._curCamera,arguments),this},r.prototype.createCamera=function(){this._assert3d("createCamera");var t=new r.Camera(this._renderer);return t._computeCameraDefaultSettings(),t._setDefaultCamera(),this._renderer._curCamera=t},r.Camera=function(t){this._renderer=t,this.cameraType="default",this.cameraMatrix=new r.Matrix,this.projMatrix=new r.Matrix},r.Camera.prototype.perspective=function(t,e,i,n){this.cameraFOV=void 0===t?t=this.defaultCameraFOV:this._renderer._pInst._toRadians(t),void 0===e&&(e=this.defaultAspectRatio),void 0===i&&(i=this.defaultCameraNear),void 0===n&&(n=this.defaultCameraFar),i<=1e-4&&(i=.01,console.log("Avoid perspective near plane values close to or below 0. Setting value to 0.01.")),n<i&&console.log("Perspective far plane value is less than near plane value. Nothing will be shown."),this.aspectRatio=e,this.cameraNear=i,this.cameraFar=n,this.projMatrix=r.Matrix.identity();var o=1/Math.tan(this.cameraFOV/2),s=1/(this.cameraNear-this.cameraFar);this.projMatrix.set(o/e,0,0,0,0,-o,0,0,0,0,(n+i)*s,-1,0,0,2*n*i*s,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15]),this.cameraType="custom"},r.Camera.prototype.ortho=function(t,e,i,n,o,s){void 0===t&&(t=-this._renderer.width/2),void 0===e&&(e=+this._renderer.width/2),void 0===i&&(i=-this._renderer.height/2),void 0===n&&(n=+this._renderer.height/2),void 0===o&&(o=0),void 0===s&&(s=Math.max(this._renderer.width,this._renderer.height));var a=e-t,h=n-i,l=s-o,u=2/a,c=2/h,p=-2/l,f=-(e+t)/a,d=-(n+i)/h,m=-(s+o)/l;this.projMatrix=r.Matrix.identity(),this.projMatrix.set(u,0,0,0,0,-c,0,0,0,0,p,0,f,d,m,1),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15]),this.cameraType="custom"},r.Camera.prototype._rotateView=function(t,e,i,n){var o=this.centerX,s=this.centerY,a=this.centerZ;o-=this.eyeX,s-=this.eyeY,a-=this.eyeZ;var h=r.Matrix.identity(this._renderer._pInst);h.rotate(this._renderer._pInst._toRadians(t),e,i,n);var l=[o*h.mat4[0]+s*h.mat4[4]+a*h.mat4[8],o*h.mat4[1]+s*h.mat4[5]+a*h.mat4[9],o*h.mat4[2]+s*h.mat4[6]+a*h.mat4[10]];l[0]+=this.eyeX,l[1]+=this.eyeY,l[2]+=this.eyeZ,this.camera(this.eyeX,this.eyeY,this.eyeZ,l[0],l[1],l[2],this.upX,this.upY,this.upZ)},r.Camera.prototype.pan=function(t){var e=this._getLocalAxes();this._rotateView(t,e.y[0],e.y[1],e.y[2])},r.Camera.prototype.tilt=function(t){var e=this._getLocalAxes();this._rotateView(t,e.x[0],e.x[1],e.x[2])},r.Camera.prototype.lookAt=function(t,e,i){this.camera(this.eyeX,this.eyeY,this.eyeZ,t,e,i,this.upX,this.upY,this.upZ)},r.Camera.prototype.camera=function(t,e,i,r,n,o,s,a,h){void 0===t&&(i=this.defaultEyeZ,r=t=this.defaultEyeX,n=e=this.defaultEyeY,a=1,h=s=o=0),this.eyeX=t,this.eyeY=e,this.eyeZ=i,this.centerX=r,this.centerY=n,this.centerZ=o,this.upX=s,this.upY=a,this.upZ=h;var l=this._getLocalAxes();return this.cameraMatrix.set(l.x[0],l.y[0],l.z[0],0,l.x[1],l.y[1],l.z[1],0,l.x[2],l.y[2],l.z[2],0,0,0,0,1),this.cameraMatrix.translate([-t,-e,-i]),this._isActive()&&this._renderer.uMVMatrix.set(this.cameraMatrix.mat4[0],this.cameraMatrix.mat4[1],this.cameraMatrix.mat4[2],this.cameraMatrix.mat4[3],this.cameraMatrix.mat4[4],this.cameraMatrix.mat4[5],this.cameraMatrix.mat4[6],this.cameraMatrix.mat4[7],this.cameraMatrix.mat4[8],this.cameraMatrix.mat4[9],this.cameraMatrix.mat4[10],this.cameraMatrix.mat4[11],this.cameraMatrix.mat4[12],this.cameraMatrix.mat4[13],this.cameraMatrix.mat4[14],this.cameraMatrix.mat4[15]),this}
1,r.Camera.prototype.move=function(t,e,i){var r=this._getLocalAxes(),n=[r.x[0]*t,r.x[1]*t,r.x[2]*t],o=[r.y[0]*e,r.y[1]*e,r.y[2]*e],s=[r.z[0]*i,r.z[1]*i,r.z[2]*i];this.camera(this.eyeX+n[0]+o[0]+s[0],this.eyeY+n[1]+o[1]+s[1],this.eyeZ+n[2]+o[2]+s[2],this.centerX+n[0]+o[0]+s[0],this.centerY+n[1]+o[1]+s[1],this.centerZ+n[2]+o[2]+s[2],0,1,0)},r.Camera.prototype.setPosition=function(t,e,i){this.camera(t,e,i,this.centerX+(t-this.eyeX),this.centerY+(e-this.eyeY),this.centerZ+(i-this.eyeZ),0,1,0)},r.Camera.prototype._computeCameraDefaultSettings=function(){this.defaultCameraFOV=60/180*Math.PI,this.defaultAspectRatio=this._renderer.width/this._renderer.height,this.defaultEyeX=0,this.defaultEyeY=0,this.defaultEyeZ=this._renderer.height/2/Math.tan(this.defaultCameraFOV/2),this.defaultCenterX=0,this.defaultCenterY=0,this.defaultCenterZ=0,this.defaultCameraNear=.1*this.defaultEyeZ,this.defaultCameraFar=10*this.defaultEyeZ},r.Camera.prototype._setDefaultCamera=function(){this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.eyeX=this.defaultEyeX,this.eyeY=this.defaultEyeY,this.eyeZ=this.defaultEyeZ,this.centerX=this.defaultCenterX,this.centerY=this.defaultCenterY,this.centerZ=this.defaultCenterZ,this.upX=0,this.upY=1,this.upZ=0,this.cameraNear=this.defaultCameraNear,this.cameraFar=this.defaultCameraFar,this.perspective(),this.camera(),this.cameraType="default"},r.Camera.prototype._resize=function(){"default"===this.cameraType?(this._computeCameraDefaultSettings(),this._setDefaultCamera()):this.perspective(this.cameraFOV,this._renderer.width/this._renderer.height)},r.Camera.prototype.copy=function(){var t=new r.Camera(this._renderer);return t.cameraFOV=this.cameraFOV,t.aspectRatio=this.aspectRatio,t.eyeX=this.eyeX,t.eyeY=this.eyeY,t.eyeZ=this.eyeZ,t.centerX=this.centerX,t.centerY=this.centerY,t.centerZ=this.centerZ,t.cameraNear=this.cameraNear,t.cameraFar=this.cameraFar,t.cameraType=this.cameraType,t.cameraMatrix=this.cameraMatrix.copy(),t.projMatrix=this.projMatrix.copy(),t},r.Camera.prototype._getLocalAxes=function(){var t=this.eyeX-this.centerX,e=this.eyeY-this.centerY,i=this.eyeZ-this.centerZ,r=Math.sqrt(t*t+e*e+i*i);0!==r&&(t/=r,e/=r,i/=r);var n=this.upX,o=this.upY,s=this.upZ,a=o*i-s*e,h=-n*i+s*t,l=n*e-o*t;n=e*l-i*h,o=-t*l+i*a,s=t*h-e*a;var u=Math.sqrt(a*a+h*h+l*l);0!==u&&(a/=u,h/=u,l/=u);var c=Math.sqrt(n*n+o*o+s*s);return 0!==c&&(n/=c,o/=c,s/=c),{x:[a,h,l],y:[n,o,s],z:[t,e,i]}},r.Camera.prototype._orbit=function(t,e,i){var r=this.eyeX-this.centerX,n=this.eyeY-this.centerY,o=this.eyeZ-this.centerZ,s=Math.sqrt(r*r+n*n+o*o),a=Math.atan2(r,o),h=Math.acos(Math.max(-1,Math.min(1,n/s)));a+=t,(s+=i)<0&&(s=.1),(h+=e)>Math.PI?h=Math.PI:h<=0&&(h=.001);var l=Math.sin(h)*s*Math.sin(a),u=Math.cos(h)*s,c=Math.sin(h)*s*Math.cos(a);this.camera(l+this.centerX,u+this.centerY,c+this.centerZ,this.centerX,this.centerY,this.centerZ,0,1,0)},r.Camera.prototype._isActive=function(){return this===this._renderer._curCamera},r.prototype.setCamera=function(t){this._renderer._curCamera=t,this._renderer.uPMatrix.set(t.projMatrix.mat4[0],t.projMatrix.mat4[1],t.projMatrix.mat4[2],t.projMatrix.mat4[3],t.projMatrix.mat4[4],t.projMatrix.mat4[5],t.projMatrix.mat4[6],t.projMatrix.mat4[7],t.projMatrix.mat4[8],t.projMatrix.mat4[9],t.projMatrix.mat4[10],t.projMatrix.mat4[11],t.projMatrix.mat4[12],t.projMatrix.mat4[13],t.projMatrix.mat4[14],t.projMatrix.mat4[15])},e.exports=r.Camera},{"../core/main":23}],70:[function(t,e,i){"use strict";var r=t("../core/main");r.Geometry=function(t,e,i){return this.vertices=[],this.lineVertices=[],this.lineNormals=[],this.vertexNormals=[],this.faces=[],this.uvs=[],this.edges=[],this.detailX=void 0!==t?t:1,this.detailY=void 0!==e?e:1,this.dirtyFlags={},i instanceof Function&&i.call(this),this},r.Geometry.prototype.reset=function(){this.lineVertices.length=0,this.lineNormals.length=0,this.vertices.length=0,this.edges.length=0,this.vertexColors.length=0,this.vertexNormals.length=0,this.uvs.length=0,this.dirtyFlags={}},r.Geometry.prototype.computeFaces=function(){this.faces.length=0;for(var t,e,i,r,n=this.detailX+1,o=0;o<this.detailY;o++)for(var s=0;s<this.detailX;s++)e=(t=o*n+s)+1,i=(o+1)*n+s+1,this.faces.push([t,e,r=(o+1)*n+s]),this.faces.push([r,e,i]);return this}
1,r.Geometry.prototype._getFaceNormal=function(t){var e=this.faces[t],i=this.vertices[e[0]],n=this.vertices[e[2]],o=r.Vector.sub(this.vertices[e[1]],i),s=r.Vector.sub(n,i),a=r.Vector.cross(o,s),h=r.Vector.mag(a),l=h/(r.Vector.mag(o)*r.Vector.mag(s));return 0===l||isNaN(l)?(console.warn("p5.Geometry.prototype._getFaceNormal:","face has colinear sides or a repeated vertex"),a):(1<l&&(l=1),a.mult(Math.asin(l)/h))},r.Geometry.prototype.computeNormals=function(){var t,e=this.vertexNormals,i=this.vertices,n=this.faces;for(t=e.length=0;t<i.length;++t)e.push(new r.Vector);for(var o=0;o<n.length;++o)for(var s=n[o],a=this._getFaceNormal(o),h=0;h<3;++h)e[s[h]].add(a);for(t=0;t<i.length;++t)e[t].normalize();return this},r.Geometry.prototype.averageNormals=function(){for(var t=0;t<=this.detailY;t++){var e=this.detailX+1,i=r.Vector.add(this.vertexNormals[t*e],this.vertexNormals[t*e+this.detailX]);i=r.Vector.div(i,2),this.vertexNormals[t*e]=i,this.vertexNormals[t*e+this.detailX]=i}return this},r.Geometry.prototype.averagePoleNormals=function(){for(var t=new r.Vector(0,0,0),e=0;e<this.detailX;e++)t.add(this.vertexNormals[e]);for(t=r.Vector.div(t,this.detailX),e=0;e<this.detailX;e++)this.vertexNormals[e]=t;for(t=new r.Vector(0,0,0),e=this.vertices.length-1;e>this.vertices.length-1-this.detailX;e--)t.add(this.vertexNormals[e]);for(t=r.Vector.div(t,this.detailX),e=this.vertices.length-1;e>this.vertices.length-1-this.detailX;e--)this.vertexNormals[e]=t;return this},r.Geometry.prototype._makeTriangleEdges=function(){if(this.edges.length=0,Array.isArray(this.strokeIndices))for(var t=0,e=this.strokeIndices.length;t<e;t++)this.edges.push(this.strokeIndices[t]);else for(var i=0;i<this.faces.length;i++)this.edges.push([this.faces[i][0],this.faces[i][1]]),this.edges.push([this.faces[i][1],this.faces[i][2]]),this.edges.push([this.faces[i][2],this.faces[i][0]]);return this},r.Geometry.prototype._edgesToVertices=function(){this.lineVertices.length=0;for(var t=this.lineNormals.length=0;t<this.edges.length;t++){var e=this.vertices[this.edges[t][0]],i=this.vertices[this.edges[t][1]],r=i.copy().sub(e).normalize(),n=e.array(),o=e.array(),s=i.array(),a=i.array(),h=r.array(),l=r.array();h.push(1),l.push(-1),this.lineNormals.push(h,l,h,h,l,l),this.lineVertices.push(n,o,s,s,o,a)}return this},r.Geometry.prototype.normalize=function(){if(0<this.vertices.length){for(var t=this.vertices[0].copy(),e=this.vertices[0].copy(),i=0;i<this.vertices.length;i++)t.x=Math.max(t.x,this.vertices[i].x),e.x=Math.min(e.x,this.vertices[i].x),t.y=Math.max(t.y,this.vertices[i].y),e.y=Math.min(e.y,this.vertices[i].y),t.z=Math.max(t.z,this.vertices[i].z),e.z=Math.min(e.z,this.vertices[i].z);var n=r.Vector.lerp(t,e,.5),o=r.Vector.sub(t,e),s=200/Math.max(Math.max(o.x,o.y),o.z);for(i=0;i<this.vertices.length;i++)this.vertices[i].sub(n),this.vertices[i].mult(s)}return this},e.exports=r.Geometry},{"../core/main":23}],71:[function(t,e,i){"use strict";var r=t("../core/main"),n=Array,o=function(t){return t instanceof Array};"undefined"!=typeof Float32Array&&(n=Float32Array,o=function(t){return t instanceof Array||t instanceof Float32Array}),r.Matrix=function(){for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];return t.length&&t[t.length-1]instanceof r&&(this.p5=t[t.length-1]),"mat3"===t[0]?this.mat3=Array.isArray(t[1])?t[1]:new n([1,0,0,0,1,0,0,0,1]):this.mat4=Array.isArray(t[0])?t[0]:new n([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},r.Matrix.prototype.set=function(t){return t instanceof r.Matrix?this.mat4=t.mat4:o(t)?this.mat4=t:16===arguments.length&&(this.mat4[0]=t,this.mat4[1]=arguments[1],this.mat4[2]=arguments[2],this.mat4[3]=arguments[3],this.mat4[4]=arguments[4],this.mat4[5]=arguments[5],this.mat4[6]=arguments[6],this.mat4[7]=arguments[7],this.mat4[8]=arguments[8],this.mat4[9]=arguments[9],this.mat4[10]=arguments[10],this.mat4[11]=arguments[11],this.mat4[12]=arguments[12],this.mat4[13]=arguments[13],this.mat4[14]=arguments[14],this.mat4[15]=arguments[15]),this},r.Matrix.prototype.get=function(){return new r.Matrix(this.mat4,this.p5)},r.Matrix.prototype.copy=function(){var t=new r.Matrix(this.p5);return t.mat4[0]=this.mat4[0],t.mat4[1]=this.mat4[1],t.mat4[2]=this.mat4[2],t.mat4[3]=this.mat4[3],t.mat4[4]=this.mat4[4],t.mat4[5]=this.mat4[5],t.mat4[6]=this.mat4[6],t.mat4[7]=this.mat4[7],t.mat4[8]=this.mat4[8],t.mat4[9]=this.mat4[9],t.mat4[10]=this.mat4[10],t.mat4[11]=this.mat4[11],t.mat4[12]=this.mat4[12],t.mat4[13]=this.mat4[13],t.mat4[14]=this.mat4[14],t.mat4[15]=this.mat4[15],t},r.Matrix.identity=function(t){return new r.Matrix(t)},r.Matrix.prototype.transpose=function(t){var e,i,n,s,a,h;return t instanceof r.Matrix?(e=t.mat4[1],i=t.mat4[2],n=t.mat4[3],s=t.mat4[6],a=t.mat4[7],h=t.mat4[11],this.mat4[0]=t.mat4[0],this.mat4[1]=t.mat4[4],this.mat4[2]=t.mat4[8],this.mat4[3]=t.mat4[12],this.mat4[4]=e,this.mat4[5]=t.mat4[5],this.mat4[6]=t.mat4[9],this.mat4[7]=t.mat4[13],this.mat4[8]=i,this.mat4[9]=s,this.mat4[10]=t.mat4[10],this.mat4[11]=t.mat4[14],this.mat4[12]=n,this.mat4[13]=a,this.mat4[14]=h,this.mat4[15]=t.mat4[15]):o(t)&&(e=t[1],i=t[2],n=t[3],s=t[6],a=t[7],h=t[11],this.mat4[0]=t[0],this.mat4[1]=t[4],this.mat4[2]=t[8],this.mat4[3]=t[12],this.mat4[4]=e,this.mat4[5]=t[5],this.mat4[6]=t[9],this.mat4[7]=t[13],this.mat4[8]=i,this.mat4[9]=s,this.mat4[10]=t[10],this.mat4[11]=t[14],this.mat4[12]=n,this.mat4[13]=a,this.mat4[14]=h,this.mat4[15]=t[15]),this},r.Matrix.prototype.invert=function(t){var e,i,n,s,a,h,l,u,c,p,f,d,m,y,g,v;t instanceof r.Matrix?(e=t.mat4[0],i=t.mat4[1],n=t.mat4[2],s=t.mat4[3],a=t.mat4[4],h=t.mat4[5],l=t.mat4[6],u=t.mat4[7],c=t.mat4[8],p=t.mat4[9],f=t.mat4[10],d=t.mat4[11],m=t.mat4[12],y=t.mat4[13],g=t.mat4[14],v=t.mat4[15]):o(t)&&(e=t[0],i=t[1],n=t[2],s=t[3],a=t[4],h=t[5],l=t[6],u=t[7],c=t[8],p=t[9],f=t[10],d=t[11],m=t[12],y=t[13],g=t[14],v=t[15]);var _=e*h-i*a,b=e*l-n*a,x=e*u-s*a,w=i*l-n*h,T=i*u-s*h,S=n*u-s*l,M=c*y-p*m,E=c*g-f*m,C=c*v-d*m,A=p*g-f*y,P=p*v-d*y,k=f*v-d*g,R=_*k-b*P+x*A+w*C-T*E+S*M;return R?(this.mat4[0]=(h*k-l*P+u*A)*(R=1/R),this.mat4[1]=(n*P-i*k-s*A)*R,this.mat4[2]=(y*S-g*T+v*w)*R,this.mat4[3]=(f*T-p*S-d*w)*R,this.mat4[4]=(l*C-a*k-u*E)*R,this.mat4[5]=(e*k-n*C+s*E)*R,this.mat4[6]=(g*x-m*S-v*b)*R,this.mat4[7]=(c*S-f*x+d*b)*R,this.mat4[8]=(a*P-h*C+u*M)*R,this.mat4[9]=(i*C-e*P-s*M)*R,this.mat4[10]=(m*T-y*x+v*_)*R,this.mat4[11]=(p*x-c*T-d*_)*R,this.mat4[12]=(h*E-a*A-l*M)*R,this.mat4[13]=(e*A-i*E+n*M)*R,this.mat4[14]=(y*b-m*w-g*_)*R,this.mat4[15]=(c*w-p*b+f*_)*R,this):null},r.Matrix.prototype.invert3x3=function(){var t=this.mat3[0],e=this.mat3[1],i=this.mat3[2],r=this.mat3[3],n=this.mat3[4],o=this.mat3[5],s=this.mat3[6],a=this.mat3[7],h=this.mat3[8],l=h*n-o*a,u=-h*r+o*s,c=a*r-n*s,p=t*l+e*u+i*c;return p?(this.mat3[0]=l*(p=1/p),this.mat3[1]=(-h*e+i*a)*p,this.mat3[2]=(o*e-i*n)*p,this.mat3[3]=u*p,this.mat3[4]=(h*t-i*s)*p,this.mat3[5]=(-o*t+i*r)*p,this.mat3[6]=c*p,this.mat3[7]=(-a*t+e*s)*p,this.mat3[8]=(n*t-e*r)*p,this):null},r.Matrix.prototype.transpose3x3=function(t){var e=t[1],i=t[2],r=t[5];return this.mat3[1]=t[3],this.mat3[2]=t[6],this.mat3[3]=e,this.mat3[5]=t[7],this.mat3[6]=i,this.mat3[7]=r,this},r.Matrix.prototype.inverseTranspose=function(t){void 0===this.mat3?console.error("sorry, this function only works with mat3"):(this.mat3[0]=t.mat4[0],this.mat3[1]=t.mat4[1],this.mat3[2]=t.mat4[2],this.mat3[3]=t.mat4[4],this.mat3[4]=t.mat4[5],this.mat3[5]=t.mat4[6],this.mat3[6]=t.mat4[8],this.mat3[7]=t.mat4[9],this.mat3[8]=t.mat4[10]);var e=this.invert3x3();if(e)e.transpose3x3(this.mat3);else for(var i=0;i<9;i++)this.mat3[i]=0;return this},r.Matrix.prototype.determinant=function(){return(this.mat4[0]*this.mat4[5]-this.mat4[1]*this.mat4[4])*(this.mat4[10]*this.mat4[15]-this.mat4[11]*this.mat4[14])-(this.mat4[0]*this.mat4[6]-this.mat4[2]*this.mat4[4])*(this.mat4[9]*this.mat4[15]-this.mat4[11]*this.mat4[13])+(this.mat4[0]*this.mat4[7]-this.mat4[3]*this.mat4[4])*(this.mat4[9]*this.mat4[14]-this.mat4[10]*this.mat4[13])+(this.mat4[1]*this.mat4[6]-this.mat4[2]*this.mat4[5])*(this.mat4[8]*this.mat4[15]-this.mat4[11]*this.mat4[12])-(this.mat4[1]*this.mat4[7]-this.mat4[3]*this.mat4[5])*(this.mat4[8]*this.mat4[14]-this.mat4[10]*this.mat4[12])+(this.mat4[2]*this.mat4[7]-this.mat4[3]*this.mat4[6])*(this.mat4[8]*this.mat4[13]-this.mat4[9]*this.mat4[12])},r.Matrix.prototype.mult=function(t){var e;if(t===this||t===this.mat4)e=this.copy().mat4;else if(t instanceof r.Matrix)e=t.mat4;else if(o(t))e=t;else{if(16!==arguments.length)return;e=arguments}var i=this.mat4[0],n=this.mat4[1],s=this.mat4[2],a=this.mat4[3];return this.mat4[0]=i*e[0]+n*e[4]+s*e[8]+a*e[12],this.mat4[1]=i*e[1]+n*e[5]+s*e[9]+a*e[13],this.mat4[2]=i*e[2]+n*e[6]+s*e[10]+a*e[14],this.mat4[3]=i*e[3]+n*e[7]+s*e[11]+a*e[15],this.mat4[4]=(i=this.mat4[4])*e[0]+(n=this.mat4[5])*e[4]+(s=this.mat4[6])*e[8]+(a=this.mat4[7])*e[12],this.mat4[5]=i*e[1]+n*e[5]+s*e[9]+a*e[13],this.mat4[6]=i*e[2]+n*e[6]+s*e[10]+a*e[14],this.mat4[7]=i*e[3]+n*e[7]+s*e[11]+a*e[15],this.mat4[8]=(i=this.mat4[8])*e[0]+(n=this.mat4[9])*e[4]+(s=this.mat4[10])*e[8]+(a=this.mat4[11])*e[12],this.mat4[9]=i*e[1]+n*e[5]+s*e[9]+a*e[13],this.mat4[10]=i*e[2]+n*e[6]+s*e[10]+a*e[14],this.mat4[11]=i*e[3]+n*e[7]+s*e[11]+a*e[15],this.mat4[12]=(i=this.mat4[12])*e[0]+(n=this.mat4[13])*e[4]+(s=this.mat4[14])*e[8]+(a=this.mat4[15])*e[12],this.mat4[13]=i*e[1]+n*e[5]+s*e[9]+a*e[13],this.mat4[14]=i*e[2]+n*e[6]+s*e[10]+a*e[14],this.mat4[15]=i*e[3]+n*e[7]+s*e[11]+a*e[15],this},r.Matrix.prototype.apply=function(t){var e;if(t===this||t===this.mat4)e=this.copy().mat4;else if(t instanceof r.Matrix)e=t.mat4;else if(o(t))e=t;else{if(16!==arguments.length)return;e=arguments}var i=this.mat4,n=i[0],s=i[4],a=i[8],h=i[12];i[0]=e[0]*n+e[1]*s+e[2]*a+e[3]*h,i[4]=e[4]*n+e[5]*s+e[6]*a+e[7]*h,i[8]=e[8]*n+e[9]*s+e[10]*a+e[11]*h,i[12]=e[12]*n+e[13]*s+e[14]*a+e[15]*h;var l=i[1],u=i[5],c=i[9],p=i[13];i[1]=e[0]*l+e[1]*u+e[2]*c+e[3]*p,i[5]=e[4]*l+e[5]*u+e[6]*c+e[7]*p,i[9]=e[8]*l+e[9]*u+e[10]*c+e[11]*p,i[13]=e[12]*l+e[13]*u+e[14]*c+e[15]*p;var f=i[2],d=i[6],m=i[10],y=i[14];i[2]=e[0]*f+e[1]*d+e[2]*m+e[3]*y,i[6]=e[4]*f+e[5]*d+e[6]*m+e[7]*y,i[10]=e[8]*f+e[9]*d+e[10]*m+e[11]*y,i[14]=e[12]*f+e[13]*d+e[14]*m+e[15]*y;var g=i[3],v=i[7],_=i[11],b=i[15];return i[3]=e[0]*g+e[1]*v+e[2]*_+e[3]*b,i[7]=e[4]*g+e[5]*v+e[6]*_+e[7]*b,i[11]=e[8]*g+e[9]*v+e[10]*_+e[11]*b,i[15]=e[12]*g+e[13]*v+e[14]*_+e[15]*b,this}
1,r.Matrix.prototype.scale=function(t,e,i){return t instanceof r.Vector?(e=t.y,i=t.z,t=t.x):t instanceof Array&&(e=t[1],i=t[2],t=t[0]),this.mat4[0]*=t,this.mat4[1]*=t,this.mat4[2]*=t,this.mat4[3]*=t,this.mat4[4]*=e,this.mat4[5]*=e,this.mat4[6]*=e,this.mat4[7]*=e,this.mat4[8]*=i,this.mat4[9]*=i,this.mat4[10]*=i,this.mat4[11]*=i,this},r.Matrix.prototype.rotate=function(t,e,i,n){e instanceof r.Vector?(i=e.y,n=e.z,e=e.x):e instanceof Array&&(i=e[1],n=e[2],e=e[0]);var o=Math.sqrt(e*e+i*i+n*n);e*=1/o,i*=1/o,n*=1/o;var s=this.mat4[0],a=this.mat4[1],h=this.mat4[2],l=this.mat4[3],u=this.mat4[4],c=this.mat4[5],p=this.mat4[6],f=this.mat4[7],d=this.mat4[8],m=this.mat4[9],y=this.mat4[10],g=this.mat4[11],v=Math.sin(t),_=Math.cos(t),b=1-_,x=e*e*b+_,w=i*e*b+n*v,T=n*e*b-i*v,S=e*i*b-n*v,M=i*i*b+_,E=n*i*b+e*v,C=e*n*b+i*v,A=i*n*b-e*v,P=n*n*b+_;return this.mat4[0]=s*x+u*w+d*T,this.mat4[1]=a*x+c*w+m*T,this.mat4[2]=h*x+p*w+y*T,this.mat4[3]=l*x+f*w+g*T,this.mat4[4]=s*S+u*M+d*E,this.mat4[5]=a*S+c*M+m*E,this.mat4[6]=h*S+p*M+y*E,this.mat4[7]=l*S+f*M+g*E,this.mat4[8]=s*C+u*A+d*P,this.mat4[9]=a*C+c*A+m*P,this.mat4[10]=h*C+p*A+y*P,this.mat4[11]=l*C+f*A+g*P,this},r.Matrix.prototype.translate=function(t){var e=t[0],i=t[1],r=t[2]||0;this.mat4[12]+=this.mat4[0]*e+this.mat4[4]*i+this.mat4[8]*r,this.mat4[13]+=this.mat4[1]*e+this.mat4[5]*i+this.mat4[9]*r,this.mat4[14]+=this.mat4[2]*e+this.mat4[6]*i+this.mat4[10]*r,this.mat4[15]+=this.mat4[3]*e+this.mat4[7]*i+this.mat4[11]*r},r.Matrix.prototype.rotateX=function(t){this.rotate(t,1,0,0)},r.Matrix.prototype.rotateY=function(t){this.rotate(t,0,1,0)},r.Matrix.prototype.rotateZ=function(t){this.rotate(t,0,0,1)},r.Matrix.prototype.perspective=function(t,e,i,r){var n=1/Math.tan(t/2),o=1/(i-r);return this.mat4[0]=n/e,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=n,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=(r+i)*o,this.mat4[11]=-1,this.mat4[12]=0,this.mat4[13]=0,this.mat4[14]=2*r*i*o,this.mat4[15]=0,this},r.Matrix.prototype.ortho=function(t,e,i,r,n,o){var s=1/(t-e),a=1/(i-r),h=1/(n-o);return this.mat4[0]=-2*s,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=-2*a,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=2*h,this.mat4[11]=0,this.mat4[12]=(t+e)*s,this.mat4[13]=(r+i)*a,this.mat4[14]=(o+n)*h,this.mat4[15]=1,this},e.exports=r.Matrix},{"../core/main":23}],72:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");r.RendererGL.prototype.beginShape=function(t){return this.immediateMode.shapeMode=void 0!==t?t:n.LINE_STRIP,void 0===this.immediateMode.vertices?(this.immediateMode.vertices=[],this.immediateMode.edges=[],this.immediateMode.lineVertices=[],this.immediateMode.vertexColors=[],this.immediateMode.lineNormals=[],this.immediateMode.uvCoords=[],this.immediateMode.vertexBuffer=this.GL.createBuffer(),this.immediateMode.colorBuffer=this.GL.createBuffer(),this.immediateMode.uvBuffer=this.GL.createBuffer(),this.immediateMode.lineVertexBuffer=this.GL.createBuffer(),this.immediateMode.lineNormalBuffer=this.GL.createBuffer(),this.immediateMode.pointVertexBuffer=this.GL.createBuffer(),this.immediateMode._bezierVertex=[],this.immediateMode._quadraticVertex=[],this.immediateMode._curveVertex=[],this.immediateMode._isCoplanar=!0,this.immediateMode._testIfCoplanar=null):(this.immediateMode.vertices.length=0,this.immediateMode.edges.length=0,this.immediateMode.lineVertices.length=0,this.immediateMode.lineNormals.length=0,this.immediateMode.vertexColors.length=0,this.immediateMode.uvCoords.length=0),this.isImmediateDrawing=!0,this},r.RendererGL.prototype.vertex=function(t,e){var i,o,s;i=o=s=0,3===arguments.length?i=arguments[2]:4===arguments.length?(o=arguments[2],s=arguments[3]):5===arguments.length&&(i=arguments[2],o=arguments[3],s=arguments[4]),null==this.immediateMode._testIfCoplanar?this.immediateMode._testIfCoplanar=i:this.immediateMode._testIfCoplanar!==i&&(this.immediateMode._isCoplanar=!1);var a=new r.Vector(t,e,i);this.immediateMode.vertices.push(a);var h=this.curFillColor||[.5,.5,.5,1];return this.immediateMode.vertexColors.push(h[0],h[1],h[2],h[3]),this.textureMode===n.IMAGE&&(null!==this._tex?0<this._tex.width&&0<this._tex.height&&(o/=this._tex.width,s/=this._tex.height):null===this._tex&&4<=arguments.length&&console.warn("You must first call texture() before using vertex() with image based u and v coordinates")),this.immediateMode.uvCoords.push(o,s),this.immediateMode._bezierVertex[0]=t,this.immediateMode._bezierVertex[1]=e,this.immediateMode._bezierVertex[2]=i,this.immediateMode._quadraticVertex[0]=t,this.immediateMode._quadraticVertex[1]=e,this.immediateMode._quadraticVertex[2]=i,this}
1,r.RendererGL.prototype.endShape=function(t,e,i,o,s,a){if(this.immediateMode.shapeMode===n.POINTS)this._drawPoints(this.immediateMode.vertices,this.immediateMode.pointVertexBuffer);else if(1<this.immediateMode.vertices.length){if(this._doStroke&&this.drawMode!==n.TEXTURE){if(this.immediateMode.shapeMode===n.TRIANGLE_STRIP){var h;for(h=0;h<this.immediateMode.vertices.length-2;h++)this.immediateMode.edges.push([h,h+1]),this.immediateMode.edges.push([h,h+2]);this.immediateMode.edges.push([h,h+1])}else if(this.immediateMode.shapeMode===n.TRIANGLES)for(h=0;h<this.immediateMode.vertices.length-2;h+=3)this.immediateMode.edges.push([h,h+1]),this.immediateMode.edges.push([h+1,h+2]),this.immediateMode.edges.push([h+2,h]);else if(this.immediateMode.shapeMode===n.LINES)for(h=0;h<this.immediateMode.vertices.length-1;h+=2)this.immediateMode.edges.push([h,h+1]);else for(h=0;h<this.immediateMode.vertices.length-1;h++)this.immediateMode.edges.push([h,h+1]);t===n.CLOSE&&this.immediateMode.edges.push([this.immediateMode.vertices.length-1,0]),r.Geometry.prototype._edgesToVertices.call(this.immediateMode),this._drawStrokeImmediateMode()}if(this._doFill&&this.immediateMode.shapeMode!==n.LINES){if(this.isBezier||this.isQuadratic||this.isCurve||this.immediateMode.shapeMode===n.LINE_STRIP&&this.drawMode===n.FILL&&!0===this.immediateMode._isCoplanar){this.immediateMode.shapeMode=n.TRIANGLES;var l=[new Float32Array(this._vToNArray(this.immediateMode.vertices))],u=this._triangulate(l);this.immediateMode.vertices=[];for(var c=0,p=u.length;c<p;c+=3)this.vertex(u[c],u[c+1],u[c+2])}0<this.immediateMode.vertices.length&&this._drawFillImmediateMode(t,e,i,o,s,a)}}return this.immediateMode.vertices.length=0,this.immediateMode.vertexColors.length=0,this.immediateMode.uvCoords.length=0,this.isImmediateDrawing=!1,this.isBezier=!1,this.isQuadratic=!1,this.isCurve=!1,this.immediateMode._bezierVertex.length=0,this.immediateMode._quadraticVertex.length=0,this.immediateMode._curveVertex.length=0,this.immediateMode._isCoplanar=!0,this.immediateMode._testIfCoplanar=null,this},r.RendererGL.prototype._drawFillImmediateMode=function(t,e,i,r,o,s){var a=this.GL,h=this._getImmediateFillShader();if(this._setFillUniforms(h),h.attributes.aPosition&&(this._bindBuffer(this.immediateMode.vertexBuffer,a.ARRAY_BUFFER,this._vToNArray(this.immediateMode.vertices),Float32Array,a.DYNAMIC_DRAW),h.enableAttrib(h.attributes.aPosition,3)),this.drawMode===n.FILL&&h.attributes.aVertexColor&&(this._bindBuffer(this.immediateMode.colorBuffer,a.ARRAY_BUFFER,this.immediateMode.vertexColors,Float32Array,a.DYNAMIC_DRAW),h.enableAttrib(h.attributes.aVertexColor,4)),this.drawMode===n.TEXTURE&&h.attributes.aTexCoord&&(this._bindBuffer(this.immediateMode.uvBuffer,a.ARRAY_BUFFER,this.immediateMode.uvCoords,Float32Array,a.DYNAMIC_DRAW),h.enableAttrib(h.attributes.aTexCoord,2)),this.drawMode===n.FILL||this.drawMode===n.TEXTURE)switch(this.immediateMode.shapeMode){case n.LINE_STRIP:case n.LINES:this.immediateMode.shapeMode=n.TRIANGLE_FAN}else switch(this.immediateMode.shapeMode){case n.LINE_STRIP:case n.LINES:this.immediateMode.shapeMode=n.LINE_LOOP}if(this.immediateMode.shapeMode===n.QUADS||this.immediateMode.shapeMode===n.QUAD_STRIP)throw new Error("sorry, "+this.immediateMode.shapeMode+" not yet implemented in webgl mode.");this._applyColorBlend(this.curFillColor),a.enable(a.BLEND),a.drawArrays(this.immediateMode.shapeMode,0,this.immediateMode.vertices.length),this._pixelsState._pixelsDirty=!0,h.unbindShader()},r.RendererGL.prototype._drawStrokeImmediateMode=function(){var t=this.GL,e=this._getImmediateStrokeShader();this._setStrokeUniforms(e),e.attributes.aPosition&&(this._bindBuffer(this.immediateMode.lineVertexBuffer,t.ARRAY_BUFFER,this._flatten(this.immediateMode.lineVertices),Float32Array,t.STATIC_DRAW),e.enableAttrib(e.attributes.aPosition,3)),e.attributes.aDirection&&(this._bindBuffer(this.immediateMode.lineNormalBuffer,t.ARRAY_BUFFER,this._flatten(this.immediateMode.lineNormals),Float32Array,t.STATIC_DRAW),e.enableAttrib(e.attributes.aDirection,4)),this._applyColorBlend(this.curStrokeColor),t.drawArrays(t.TRIANGLES,0,this.immediateMode.lineVertices.length),this._pixelsState._pixelsDirty=!0,e.unbindShader()},e.exports=r.RendererGL},{"../core/constants":17,"../core/main":23}
1],73:[function(t,e,i){"use strict";var r=t("../core/main");function n(t,e,i,r,n){this.size=t,this.src=e,this.dst=i,this.attr=r,this.map=n}t("./p5.RendererGL");var o=r.RendererGL.prototype._flatten,s=r.RendererGL.prototype._vToNArray,a=[new n(3,"lineVertices","lineVertexBuffer","aPosition",o),new n(4,"lineNormals","lineNormalBuffer","aDirection",o)],h=[new n(3,"vertices","vertexBuffer","aPosition",s),new n(3,"vertexNormals","normalBuffer","aNormal",s),new n(4,"vertexColors","colorBuffer","aMaterialColor"),new n(3,"vertexAmbients","ambientBuffer","aAmbientColor"),new n(2,"uvs","uvBuffer","aTexCoord",o)];r.RendererGL._textBuffers=[new n(3,"vertices","vertexBuffer","aPosition",s),new n(2,"uvs","uvBuffer","aTexCoord",o)];var l=0;r.RendererGL.prototype._initBufferDefaults=function(t){if(this._freeBuffers(t),1e3<++l){var e=Object.keys(this.gHash)[0];delete this.gHash[e],l--}return this.gHash[t]={}},r.RendererGL.prototype._freeBuffers=function(t){var e=this.gHash[t];if(e){delete this.gHash[t],l--;var i=this.GL;e.indexBuffer&&i.deleteBuffer(e.indexBuffer),r(a),r(h)}function r(t){for(var r=0;r<t.length;r++){var n=t[r];e[n.dst]&&(i.deleteBuffer(e[n.dst]),e[n.dst]=null)}}},r.RendererGL.prototype._prepareBuffers=function(t,e,i){for(var r=t.model,n=e.attributes,o=this.GL,s=0;s<i.length;s++){var a=i[s],h=n[a.attr];if(h){var l=t[a.dst],u=r[a.src];if(u){var c=!l;if(c&&(t[a.dst]=l=o.createBuffer()),o.bindBuffer(o.ARRAY_BUFFER,l),c||!1!==r.dirtyFlags[a.src]){var p=a.map,f=p?p(u):u;this._bindBuffer(l,o.ARRAY_BUFFER,f),r.dirtyFlags[a.src]=!1}e.enableAttrib(h,a.size)}else l&&(o.deleteBuffer(l),t[a.dst]=null),o.disableVertexAttribArray(h.index)}}},r.RendererGL.prototype.createBuffers=function(t,e){var i=this.GL,n=this._initBufferDefaults(t);n.model=e;var o=n.indexBuffer;if(e.faces.length){o||(o=n.indexBuffer=i.createBuffer());var s=r.RendererGL.prototype._flatten(e.faces);this._bindBuffer(o,i.ELEMENT_ARRAY_BUFFER,s,Uint16Array),n.vertexCount=3*e.faces.length}else o&&(i.deleteBuffer(o),n.indexBuffer=null),n.vertexCount=e.vertices?e.vertices.length:0;return n.lineVertexCount=e.lineVertices?e.lineVertices.length:0,n},r.RendererGL.prototype.drawBuffers=function(t){var e=this.GL,i=this.gHash[t];if(this._doStroke&&0<i.lineVertexCount){var r=this._getRetainedStrokeShader();this._setStrokeUniforms(r),this._prepareBuffers(i,r,a),this._applyColorBlend(this.curStrokeColor),this._drawArrays(e.TRIANGLES,t),r.unbindShader()}if(this._doFill){var n=this._getRetainedFillShader();this._setFillUniforms(n),this._prepareBuffers(i,n,h),i.indexBuffer&&this._bindBuffer(i.indexBuffer,e.ELEMENT_ARRAY_BUFFER),this._applyColorBlend(this.curFillColor),this._drawElements(e.TRIANGLES,t),n.unbindShader()}return this},r.RendererGL.prototype.drawBuffersScaled=function(t,e,i,r){var n=this.uMVMatrix.copy();try{this.uMVMatrix.scale(e,i,r),this.drawBuffers(t)}finally{this.uMVMatrix=n}},r.RendererGL.prototype._drawArrays=function(t,e){return this.GL.drawArrays(t,0,this.gHash[e].lineVertexCount),this._pixelsState._pixelsDirty=!0,this},r.RendererGL.prototype._drawElements=function(t,e){var i=this.gHash[e],r=this.GL;i.indexBuffer?r.drawElements(r.TRIANGLES,i.vertexCount,r.UNSIGNED_SHORT,0):r.drawArrays(t||r.TRIANGLES,0,i.vertexCount),this._pixelsState._pixelsDirty=!0},r.RendererGL.prototype._drawPoints=function(t,e){var i=this.GL,r=this._getImmediatePointShader();this._setPointUniforms(r),this._bindBuffer(e,i.ARRAY_BUFFER,this._vToNArray(t),Float32Array,i.STATIC_DRAW),r.enableAttrib(r.attributes.aPosition,3),i.drawArrays(i.Points,0,t.length),r.unbindShader(),this._pixelsState._pixelsDirty=!0},e.exports=r.RendererGL},{"../core/main":23,"./p5.RendererGL":74}],74:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants"),o=t("libtess");t("./p5.Shader"),t("./p5.Camera"),t("../core/p5.Renderer"),t("./p5.Matrix");var s="precision mediump float;\n\nuniform mat4 uViewMatrix;\n\nuniform bool uUseLighting;\n\nuniform int uAmbientLightCount;\nuniform vec3 uAmbientColor[8];\n\nuniform int uDirectionalLightCount;\nuniform vec3 uLightingDirection[8];\nuniform vec3 uDirectionalColor[8];\n\nuniform int uPointLightCount;\nuniform vec3 uPointLightLocation[8];\nuniform vec3 uPointLightColor[8];\n\nuniform bool uSpecular;\nuniform float uShininess;\n\nuniform float uConstantAttenuation;\nuniform float uLinearAttenuation;\nuniform float uQuadraticAttenuation;\n\nconst float specularFactor = 2.0;\nconst float diffuseFactor = 0.73;\n\nstruct LightResult {\n  float specular;\n  float diffuse;\n};\n\nfloat _phongSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float shininess) {\
1n\n  vec3 R = reflect(lightDirection, surfaceNormal);\n  return pow(max(0.0, dot(R, viewDirection)), shininess);\n}\n\nfloat _lambertDiffuse(vec3 lightDirection, vec3 surfaceNormal) {\n  return max(0.0, dot(-lightDirection, surfaceNormal));\n}\n\nLightResult _light(vec3 viewDirection, vec3 normal, vec3 lightVector) {\n\n  vec3 lightDir = normalize(lightVector);\n\n  //compute our diffuse & specular terms\n  LightResult lr;\n  if (uSpecular)\n    lr.specular = _phongSpecular(lightDir, viewDirection, normal, uShininess);\n  lr.diffuse = _lambertDiffuse(lightDir, normal);\n  return lr;\n}\n\nvoid totalLight(\n  vec3 modelPosition,\n  vec3 normal,\n  out vec3 totalDiffuse,\n  out vec3 totalSpecular\n) {\n\n  totalSpecular = vec3(0.0);\n\n  if (!uUseLighting) {\n    totalDiffuse = vec3(1.0);\n    return;\n  }\n\n  totalDiffuse = vec3(0.0);\n\n  vec3 viewDirection = normalize(-modelPosition);\n\n  for (int j = 0; j < 8; j++) {\n    if (j < uDirectionalLightCount) {\n      vec3 lightVector = (uViewMatrix * vec4(uLightingDirection[j], 0.0)).xyz;\n      vec3 lightColor = uDirectionalColor[j];\n      LightResult result = _light(viewDirection, normal, lightVector);\n      totalDiffuse += result.diffuse * lightColor;\n      totalSpecular += result.specular * lightColor;\n    }\n\n    if (j < uPointLightCount) {\n      vec3 lightPosition = (uViewMatrix * vec4(uPointLightLocation[j], 1.0)).xyz;\n      vec3 lightVector = modelPosition - lightPosition;\n    \n      //calculate attenuation\n      float lightDistance = length(lightVector);\n      float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n      vec3 lightColor = lightFalloff * uPointLightColor[j];\n\n      LightResult result = _light(viewDirection, normal, lightVector);\n      totalDiffuse += result.diffuse * lightColor;\n      totalSpecular += result.specular * lightColor;\n    }\n  }\n\n  totalDiffuse *= diffuseFactor;\n  totalSpecular *= specularFactor;\n}\n",a={immediateVert:"attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\nuniform float uPointSize;\n\nvarying vec4 vColor;
1\nvoid main(void) {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vColor = aVertexColor;\n  gl_PointSize = uPointSize;\n}\n",vertexColorVert:"attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vColor = aVertexColor;\n}\n",vertexColorFrag:"precision mediump float;\nvarying vec4 vColor;\nvoid main(void) {\n  gl_FragColor = vColor;\n}",normalVert:"attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvarying vec3 vVertexNormal;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vVertexNormal = normalize(vec3( uNormalMatrix * aNormal ));\n  vVertTexCoord = aTexCoord;\n}\n",normalFrag:"precision mediump float;\nvarying vec3 vVertexNormal;\nvoid main(void) {\n  gl_FragColor = vec4(vVertexNormal, 1.0);\n}",basicFrag:"precision mediump float;\nuniform vec4 uMaterialColor;\nvoid main(void) {\n  gl_FragColor = uMaterialColor;\n}",lightVert:s+"// include lighting.glgl\n\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvarying highp vec2 vVertTexCoord;\nvarying vec3 vDiffuseColor;\nvarying vec3 vSpecularColor;\n\nvoid main(void) {\n\n  vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0
1);\n  gl_Position = uProjectionMatrix * viewModelPosition;\n\n  vec3 vertexNormal = normalize(uNormalMatrix * aNormal);\n  vVertTexCoord = aTexCoord;\n\n  totalLight(viewModelPosition.xyz, vertexNormal, vDiffuseColor, vSpecularColor);\n\n  for (int i = 0; i < 8; i++) {\n    if (i < uAmbientLightCount) {\n      vDiffuseColor += uAmbientColor[i];\n    }\n  }\n}\n",lightTextureFrag:"precision mediump float;\n\nuniform vec4 uMaterialColor;\nuniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\n\nvarying highp vec2 vVertTexCoord;\nvarying vec3 vDiffuseColor;\nvarying vec3 vSpecularColor;\n\nvoid main(void) {\n  gl_FragColor = isTexture ? texture2D(uSampler, vVertTexCoord) * (uTint / vec4(255, 255, 255, 255)) : uMaterialColor;\n  gl_FragColor.rgb = gl_FragColor.rgb * vDiffuseColor + vSpecularColor;\n}",phongVert:"precision mediump float;\nprecision mediump int;\n\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform vec3 uAmbientColor[8];\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\nuniform int uAmbientLightCount;\n\nvarying vec3 vNormal;\nvarying vec2 vTexCoord;\nvarying vec3 vViewPosition;\nvarying vec3 vAmbientColor;\n\nvoid main(void) {\n\n  vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0
1);\n\n  // Pass varyings to fragment shader\n  vViewPosition = viewModelPosition.xyz;\n  gl_Position = uProjectionMatrix * viewModelPosition;  \n\n  vNormal = uNormalMatrix * aNormal;\n  vTexCoord = aTexCoord;\n\n  // TODO: this should be a uniform\n  vAmbientColor = vec3(0.0);\n  for (int i = 0; i < 8; i++) {\n    if (i < uAmbientLightCount) {\n      vAmbientColor += uAmbientColor[i];\n    }\n  }\n}\n",phongFrag:s+"// include lighting.glgl\n\nuniform vec4 uMaterialColor;\nuniform sampler2D uSampler;\nuniform bool isTexture;\n\nvarying vec3 vNormal;\nvarying vec2 vTexCoord;\nvarying vec3 vViewPosition;\nvarying vec3 vAmbientColor;\n\nvoid main(void) {\n\n  vec3 diffuse;\n  vec3 specular;\n  totalLight(vViewPosition, normalize(vNormal), diffuse, specular);\n\n  gl_FragColor = isTexture ? texture2D(uSampler, vTexCoord) : uMaterialColor;\n  gl_FragColor.rgb = gl_FragColor.rgb * (diffuse + vAmbientColor) + specular;\n}",fontVert:"precision mediump float;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nuniform vec4 uGlyphRect;\nuniform float uGlyphOffset;\n\nvarying vec2 vTexCoord;\nvarying float w;
1\n\nvoid main() {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n\n  // scale by the size of the glyph's rectangle\n  positionVec4.xy *= uGlyphRect.zw - uGlyphRect.xy;\n\n  // move to the corner of the glyph\n  positionVec4.xy += uGlyphRect.xy;\n\n  // move to the letter's line offset\n  positionVec4.x += uGlyphOffset;\n  \n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vTexCoord = aTexCoord;\n  w = gl_Position.w;\n}\n",fontFrag:"#extension GL_OES_standard_derivatives : enable\nprecision mediump float;\n\n#if 0\n  // simulate integer math using floats\n\t#define int float\n\t#define ivec2 vec2\n\t#define INT(x) float(x)\n\n\tint ifloor(float v) { return floor(v); }\n\tivec2 ifloor(vec2 v) { return floor(v); }\n\n#else\n  // use native integer math\n\tprecision highp int;\n\t#define INT(x) x\n\n\tint ifloor(float v) { return int(v); }\n\tint ifloor(int v) { return v; }\n\tivec2 ifloor(vec2 v) { return ivec2(v); }\n\n#endif\n\nuniform sampler2D uSamplerStrokes;\nuniform sampler2D uSamplerRowStrokes;\nuniform sampler2D uSamplerRows;\nuniform sampler2D uSamplerColStrokes;\nuniform sampler2D uSamplerCols;\n\nuniform ivec2 uStrokeImageSize;\nuniform ivec2 uCellsImageSize;\nuniform ivec2 uGridImageSize;\n\nuniform ivec2 uGridOffset;\nuniform ivec2 uGridSize;\nuniform vec4 uMaterialColor;\n\nvarying vec2 vTexCoord;\n\n// some helper functions\nint round(float v) { return ifloor(v + 0.5); }\nivec2 round(vec2 v) { return ifloor(v + 0.5); }\nfloat saturate(float v) { return clamp(v, 0.0, 1.0); }\nvec2 saturate(vec2 v) { return clamp(v, 0.0, 1.0); }\n\nint mul(float v1, int v2) {\n  return ifloor(v1 * float(v2));\n}\n\nivec2 mul(vec2 v1, ivec2 v2) {\n  return ifloor(v1 * vec2(v2) + 0.5);\n}\n\n// unpack a 16-bit integer from a float vec2\nint getInt16(vec2 v) {\n  ivec2 iv = round(v * 255.0);\n  return iv.x * INT(128) + iv.y;\n}\n\nvec2 pixelScale;\nvec2 coverage = vec2(0.0);\nvec2 weight = vec2(0.5);\nconst float minDistance = 1.0/8192.0;\nconst float hardness = 1.05; // amount of antialias\n\n// the maximum number of curves in a glyph\nconst int N = INT(250);\n\n// retrieves an indexed pixel from a sampler\nvec4 getTexel(sampler2D sampler, int pos, ivec2 size) {\n  int width = size.x;\n  int y = ifloor(pos / width);\n  int x = pos - y * width;  // pos % width\n\n  return texture2D(sampler, (vec2(x, y) + 0.5) / vec2(size));\n}\n\nvoid calulateCrossings(vec2 p0, vec2 p1, vec2 p2, out vec2 C1, out vec2 C2) {\n\n  // get the coefficients of the quadratic in t\n  vec2 a = p0 - p1 * 2.0 + p2;\n  vec2 b = p0 - p1;\n  vec2 c = p0 - vTexCoord;\n\n  // found out which values of 't' it crosses the axes\n  vec2 surd = sqrt(max(vec2(0.0), b * b - a * c));\n  vec2 t1 = ((b - surd) / a).yx;\n  vec2 t2 = ((b + surd) / a).yx;\n\n  // approximate straight lines to avoid rounding errors\n  if (abs(a.y) < 0.001)\n    t1.x = t2.x = c.y / (2.0 * b.y);\n\n  if (abs(a.x) < 0.001)\n    t1.y = t2.y = c.x / (2.0 * b.x);\n\n  // plug into quadratic formula to find the corrdinates of the crossings\n  C1 = ((a * t1 - b * 2.0) * t1 + c) * pixelScale;\n  C2 = ((a * t2 - b * 2.0) * t2 + c) * pixelScale;\n}\n\nvoid coverageX(vec2 p0, vec2 p1, vec2 p2) {\n\n  vec2 C1, C2;\n  calulateCrossings(p0, p1, p2, C1, C2);\n\n  // determine on which side of the x-axis the points lie\n  bool y0 = p0.y > vTexCoord.y;\n  bool y1 = p1.y > vTexCoord.y;\n  bool y2 = p2.y > vTexCoord.y;\n\n  // could web be under the curve (after t1)?\n  if (y1 ? !y2 : y0) {\n    // add the coverage for t1\n    coverage.x += saturate(C1.x + 0.5);\n    // calculate the anti-aliasing for t1\n    weight.x = min(weight.x, abs(C1.x));\n  }\n\n  // are we outside the curve (after t2)?\n  if (y1 ? !y0 : y2) {\n    // subtract the coverage for t2\n    coverage.x -= saturate(C2.x + 0.5);\n    // calculate the anti-aliasing for t2\n    weight.x = min(weight.x, abs(C2.x));\n  }\n}\n\n// this is essentially the same as coverageX, but with the axes swapped\nvoid coverageY(vec2 p0, vec2 p1, vec2 p2) {\n\n  vec2 C1, C2;\n  calulateCrossings(p0, p1, p2, C1, C2);\n\n  bool x0 = p0.x > vTexCoord.x;\n  bool x1 = p1.x > vTexCoord.x;\n  bool x2 = p2.x > vTexCoord.x;
1\n\n  if (x1 ? !x2 : x0) {\n    coverage.y -= saturate(C1.y + 0.5);\n    weight.y = min(weight.y, abs(C1.y));\n  }\n\n  if (x1 ? !x0 : x2) {\n    coverage.y += saturate(C2.y + 0.5);\n    weight.y = min(weight.y, abs(C2.y));\n  }\n}\n\nvoid main() {\n\n  // calculate the pixel scale based on screen-coordinates\n  pixelScale = hardness / fwidth(vTexCoord);\n\n  // which grid cell is this pixel in?\n  ivec2 gridCoord = ifloor(vTexCoord * vec2(uGridSize));\n\n  // intersect curves in this row\n  {\n    // the index into the row info bitmap\n    int rowIndex = gridCoord.y + uGridOffset.y;\n    // fetch the info texel\n    vec4 rowInfo = getTexel(uSamplerRows, rowIndex, uGridImageSize);\n    // unpack the rowInfo\n    int rowStrokeIndex = getInt16(rowInfo.xy);\n    int rowStrokeCount = getInt16(rowInfo.zw);\n\n    for (int iRowStroke = INT(0); iRowStroke < N; iRowStroke++) {\n      if (iRowStroke >= rowStrokeCount)\n        break;\n\n      // each stroke is made up of 3 points: the start and control point\n      // and the start of the next curve.\n      // fetch the indices of this pair of strokes:\n      vec4 strokeIndices = getTexel(uSamplerRowStrokes, rowStrokeIndex++, uCellsImageSize);\n\n      // unpack the stroke index\n      int strokePos = getInt16(strokeIndices.xy);\n\n      // fetch the two strokes\n      vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n      vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n\n      // calculate the coverage\n      coverageX(stroke0.xy, stroke0.zw, stroke1.xy);\n    }\n  }\n\n  // intersect curves in this column\n  {\n    int colIndex = gridCoord.x + uGridOffset.x;\n    vec4 colInfo = getTexel(uSamplerCols, colIndex, uGridImageSize);\n    int colStrokeIndex = getInt16(colInfo.xy);\n    int colStrokeCount = getInt16(colInfo.zw);\n    \n    for (int iColStroke = INT(0); iColStroke < N; iColStroke++) {\n      if (iColStroke >= colStrokeCount)\n        break;\n\n      vec4 strokeIndices = getTexel(uSamplerColStrokes, colStrokeIndex++, uCellsImageSize);\n\n      int strokePos = getInt16(strokeIndices.xy);\n      vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n      vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n      coverageY(stroke0.xy, stroke0.zw, stroke1.xy);\n    }\n  }\n\n  weight = saturate(1.0 - weight * 2.0);\n  float distance = max(weight.x + weight.y, minDistance); // manhattan approx.\n  float antialias = abs(dot(coverage, weight) / distance);\n  float cover = min(abs(coverage.x), abs(coverage.y));\n  gl_FragColor = uMaterialColor;\n  gl_FragColor.a *= saturate(max(antialias, cover));\n}",lineVert:"/*\n  Part of the Processing project - http://processing.org\n  Copyright (c) 2012-15 The Processing Foundation\n  Copyright (c) 2004-12 Ben Fry and Casey Reas\n  Copyright (c) 2001-04 Massachusetts Institute of Technology\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation, version 2.1.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General\n  Public License along with this library; if not, write to the\n  Free Software Foundation, Inc., 59 Temple Place, Suite 330,\n  Boston, MA  02111-1307  USA\n*/\n\n#define PROCESSING_LINE_SHADER\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uStrokeWeight;\n\nuniform vec4 uViewport;\n\nattribute vec4 aPosition;\nattribute vec4 aDirection;\n  \nvoid main() {\n  // using a scale <1 moves the lines towards the camera\n  // in order to prevent popping effects due to half of\n  // the line disappearing behind the geometry faces.\n  vec3 scale = vec3(0.9995);\n\n  vec4 posp = uModelViewMatrix * aPosition;\n  vec4 posq = uModelViewMatrix * (aPosition + vec4(aDirection.xyz, 0));\n\n  // Moving vertices slightly toward the camera\n  // to avoid depth-fighting with the fill triangles.\n  // Discussed here:\n  // http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=252848  \n  posp.xyz = posp.xyz * scale;\n  posq.xyz = posq.xyz * scale;\n\n  vec4 p = uProjectionMatrix * posp;\n  vec4 q = uProjectionMatrix * posq;\n\n  // formula to convert from clip space (range -1..1) to screen space (range 0..[width or height])\n  // screen_p = (p.xy/p.w + <1,1>) * 0.5 * uViewport.zw\n\n  // prevent division by W by transforming the tangent formula (div by 0 causes\n  // the line to disappear, see https://github.com/processing/processing/issues/5183)\n  // t = screen_q - screen_p\n  //\n  // tangent is normalized and we don't care which aDirection it points to (+-)\n  // t = +- normalize( screen_q - screen_p )\n  // t = +- normalize( (q.xy/q.w+<1,1>)*0.5*uViewport.zw - (p.xy/p.w+<1,1>)*0.5*uViewport.zw )\n  //\n  // extract common factor, <1,1> - <1,1> cancels out\n  // t = +- normalize( (q.xy/q.w - p.xy/p.w) * 0.5 * uViewport.zw )\n  //\n  // convert to common divisor\n  // t = +- normalize( ((q.xy*p.w - p.xy*q.w) / (p.w*q.w)) * 0.5 * uViewport.zw )\n  //\n  // remove the common scalar divisor/factor, not needed due to normalize and +-\n  // (keep uViewport - can't remove because it has different c
1omponents for x and y\n  //  and corrects for aspect ratio, see https://github.com/processing/processing/issues/5181)\n  // t = +- normalize( (q.xy*p.w - p.xy*q.w) * uViewport.zw )\n\n  vec2 tangent = normalize((q.xy*p.w - p.xy*q.w) * uViewport.zw);\n\n  // flip tangent to normal (it's already normalized)\n  vec2 normal = vec2(-tangent.y, tangent.x);\n\n  float thickness = aDirection.w * uStrokeWeight;\n  vec2 offset = normal * thickness / 2.0;\n\n  // Perspective ---\n  // convert from world to clip by multiplying with projection scaling factor\n  // to get the right thickness (see https://github.com/processing/processing/issues/5182)\n  // invert Y, projections in Processing invert Y\n  vec2 perspScale = (uProjectionMatrix * vec4(1, -1, 0, 0)).xy;\n\n  // No Perspective ---\n  // multiply by W (to cancel out division by W later in the pipeline) and\n  // convert from screen to clip (derived from clip to screen above)\n  vec2 noPerspScale = p.w / (0.5 * uViewport.zw);\n\n  //gl_Position.xy = p.xy + offset.xy * mix(noPerspScale, perspScale, float(perspective > 0));\n  gl_Position.xy = p.xy + offset.xy * perspScale;\n  gl_Position.zw = p.zw;\n}\n",lineFrag:"precision mediump float;\nprecision mediump int;\n\nuniform vec4 uMaterialColor;\n\nvoid main() {\n  gl_FragColor = uMaterialColor;\n}",pointVert:"attribute vec3 aPosition;\nuniform float uPointSize;\nvarying float vStrokeWeight;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;
1\nvoid main() {\n\tvec4 positionVec4 =  vec4(aPosition, 1.0);\n\tgl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n\tgl_PointSize = uPointSize;\n\tvStrokeWeight = uPointSize;\n}",pointFrag:"precision mediump float;\nprecision mediump int;\nuniform vec4 uMaterialColor;\nvarying float vStrokeWeight;\n\nvoid main(){\n\tfloat mask = 0.0;\n\n\t// make a circular mask using the gl_PointCoord (goes from 0 - 1 on a point)\n    // might be able to get a nicer edge on big strokeweights with smoothstep but slightly less performant\n\n\tmask = step(0.98, length(gl_PointCoord * 2.0 - 1.0));\n\n\t// if strokeWeight is 1 or less lets just draw a square\n\t// this prevents weird artifacting from carving circles when our points are really small\n\t// if strokeWeight is larger than 1, we just use it as is\n\n\tmask = mix(0.0, mask, clamp(floor(vStrokeWeight - 0.5),0.0,1.0));\n\n\t// throw away the borders of the mask\n    // otherwise we get weird alpha blending issues\n\n\tif(mask > 0.98){\n      discard;\n  \t}\n\n  \tgl_FragColor = vec4(uMaterialColor.rgb * (1.0 - mask), uMaterialColor.a) ;\n}"};r.RendererGL=function(t,e,i,o){return r.Renderer.call(this,t,e,i),this._setAttributeDefaults(e),this._initContext(),this.isP3D=!0,this.GL=this.drawingContext,this._enableLighting=!1,this.ambientLightColors=[],this.directionalLightDirections=[],this.directionalLightColors=[],this.pointLightPositions=[],this.pointLightColors=[],this.drawMode=n.FILL,this.curFillColor=[1,1,1,1],this.curStrokeColor=[0,0,0,1],this.curBlendMode=n.BLEND,this.blendExt=this.GL.getExtension("EXT_blend_minmax"),this._useSpecularMaterial=!1,this._useNormalMaterial=!1,this._useShininess=1,this._tint=[255,255,255,255],this.constantAttenuation=1,this.linearAttenuation=0,this.quadraticAttenuation=0,this.uMVMatrix=new r.Matrix,this.uPMatrix=new r.Matrix,this.uNMatrix=new r.Matrix("mat3"),this._curCamera=new r.Camera(this),this._curCamera._computeCameraDefaultSettings(),this._curCamera._setDefaultCamera(),this.gHash={},this._defaultLightShader=void 0,this._defaultImmediateModeShader=void 0,this._defaultNormalShader=void 0,this._defaultColorShader=void 0,this._defaultPointShader=void 0,this._pointVertexBuffer=this.GL.createBuffer(),this.userFillShader=void 0,this.userStrokeShader=void 0,this.userPointShader=void 0,this.isImmediateDrawing=!1,this.immediateMode={},this.pointSize=5,this.curStrokeWeight=1,this.textures=[],this.textureMode=n.IMAGE,this.textureWrapX=n.CLAMP,this.textureWrapY=n.CLAMP,this._tex=null,this._curveTightness=6,this._lookUpTableBezier=[],this._lookUpTableQuadratic=[],this._lutBezierDetail=0,this._lutQuadraticDetail=0,this._tessy=this._initTessy(),this.fontInfos={},this},r.RendererGL.prototype=Object.create(r.Renderer.prototype),r.RendererGL.prototype._setAttributeDefaults=function(t){var e={alpha:!0,depth:!0,stencil:!0,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!0,perPixelLighting:!1};t._glAttributes=null===t._glAttributes?e:Object.assign(e,t._glAttributes)},r.RendererGL.prototype._initContext=function(){try{if(this.drawingContext=this.canvas.getContext("webgl",this._pInst._glAttributes)||this.canvas.getContext("experimental-webgl",this._pInst._glAttributes),null===this.drawingContext)throw new Error("Error creating webgl context");var t=this.drawingContext;t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),this._viewport=this.drawingContext.getParameter(this.drawingContext.VIEWPORT)}catch(t){throw t}},r.RendererGL.prototype._resetContext=function(t,e){var i=this.width,n=this.height,o=this.canvas.id,s=this._pInst instanceof r.Graphics;if(s){var a=this._pInst;a.canvas.parentNode.removeChild(a.canvas),a.canvas=document.createElement("canvas"),(a._pInst._userNode||document.body).appendChild(a.canvas),r.Element.call(a,a.canvas,a._pInst),a.width=i,a.height=n}else{var h=this.canvas;h&&h.parentNode.removeChild(h),(h=document.createElement("canvas")).id=o,this._pInst._userNode?this._pInst._userNode.appendChild(h):document.body.appendChild(h),this._pInst.canvas=h}var l=new r.RendererGL(this._pInst.canvas,this._pInst,!s);this._pInst._setProperty("_renderer",l),l.resize(i,n),l._applyDefaults(),s||this._pInst._elements.push(l),"function"==typeof e&&setTimeout(function(){e.apply(window._renderer,t)},0)},r.prototype.setAttributes=function(t,e){if(void 0!==this._glAttributes){var i=!0;if(void 0!==e?(null===this._glAttributes&&(this._glAttributes={}),this._glAttributes[t]!==e&&(this._glAttributes[t]=e,i=!1)):t instanceof Object&&this._glAttributes!==t&&(this._glAttributes=t,i=!1),this._renderer.isP3D&&!i){if(!this._setupDone)for(var r in this._renderer.gHash)if(this._renderer.gHash.hasOwnProperty(r))return void console.error("Sorry, Could not set the attributes, you need to call setAttributes() before calling the other drawing methods in setup()");this.push(),this._renderer._resetContext(),this.pop(),this._renderer._curCamera&&(this._renderer._curCamera._renderer=this._renderer)}}else console.log("You are trying to use setAttributes on a p5.Graphics object that does not use a WEBGL renderer.")},r.RendererGL.prototype._update=function(){this.uMVMatrix.set(this._curCamera.cameraMatrix.mat4[0],this._curCamera.cameraMatrix.mat4[1],this._curCamera.cameraMatrix.mat4[2],this._curCamera.cameraMatrix.mat4[3],this._curCamera.cameraMatrix.mat4[4],this._curCamera.cameraMatrix.mat4[5],this._curCamera.cameraMatrix.mat4[6],this._curCamera.cameraMatrix.mat4[7],this._curCamera.cameraMatrix.mat4[8],this._curCamera.cameraMatrix.mat4[9],this._curCamera.cameraMatrix.mat4[10],this._curCamera.cameraMatrix.mat4[11],this._curCamera.cameraMatrix.mat4[12],this._curCamera.cameraMatrix.mat4[13],this._curCamera.cameraMatrix.mat4[14],this._curCamera.cameraMatrix.mat4[15]),this.ambientLightColors.length=0,this.directionalLightDirections.length=0,this.directionalLightColors.length=0,this.pointLightPositions.length=0,this.pointLightColors.length=0,this._enableLighting=!1,this._tint=[255,255,255,255]},r.RendererGL.prototype.background=function(){var t=this._pInst.color.apply(this._pInst,arguments);this.GL.clearColor(t.levels[0]/255,t.levels[1]/255,t.levels[2]/255,t.levels[3]/255),this.GL.depthMask(!0),this.GL.clear(this.GL.COLOR_BUFFER_BIT|this.GL.DEPTH_BUFFER_BIT),this._pixelsState._pixelsDirty=!0}
1,r.RendererGL.prototype.fill=function(t,e,i,o){var s=r.prototype.color.apply(this._pInst,arguments);this.curFillColor=s._array,this.drawMode=n.FILL,this._useNormalMaterial=!1,this._tex=null},r.RendererGL.prototype.stroke=function(t,e,i,n){n=255;var o=r.prototype.color.apply(this._pInst,arguments);this.curStrokeColor=o._array},r.RendererGL.prototype.strokeCap=function(t){console.error("Sorry, strokeCap() is not yet implemented in WEBGL mode")},r.RendererGL.prototype.blendMode=function(t){t===n.DARKEST||t===n.LIGHTEST||t===n.ADD||t===n.BLEND||t===n.SUBTRACT||t===n.SCREEN||t===n.EXCLUSION||t===n.REPLACE||t===n.MULTIPLY?this.curBlendMode=t:t!==n.BURN&&t!==n.OVERLAY&&t!==n.HARD_LIGHT&&t!==n.SOFT_LIGHT&&t!==n.DODGE||console.warn("BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only work for blendMode in 2D mode.")},r.RendererGL.prototype.strokeWeight=function(t){this.curStrokeWeight!==t&&(this.pointSize=t,this.curStrokeWeight=t)},r.RendererGL.prototype._getPixel=function(t,e){var i,r,n=this._pixelsState;return r=n._pixelsDirty?(i=new Uint8Array(4),this.drawingContext.readPixels(t,e,1,1,this.drawingContext.RGBA,this.drawingContext.UNSIGNED_BYTE,i),0):(i=n.pixels,4*(Math.floor(t)+Math.floor(e)*this.canvas.width)),[i[r+0],i[r+1],i[r+2],i[r+3]]},r.RendererGL.prototype.loadPixels=function(){var t=this._pixelsState;if(t._pixelsDirty)if(!(t._pixelsDirty=!1)===this._pInst._glAttributes.preserveDrawingBuffer){var e=t.pixels,i=this.GL.drawingBufferWidth*this.GL.drawingBufferHeight*4;e instanceof Uint8Array&&e.length===i||(e=new Uint8Array(i),this._pixelsState._setProperty("pixels",e));var r=this._pInst._pixelDensity;this.GL.readPixels(0,0,this.width*r,this.height*r,this.GL.RGBA,this.GL.UNSIGNED_BYTE,e)}else console.log("loadPixels only works in WebGL when preserveDrawingBuffer is true.")},r.RendererGL.prototype.geometryInHash=function(t){return void 0!==this.gHash[t]},r.RendererGL.prototype.resize=function(t,e){r.Renderer.prototype.resize.call(this,t,e),this.GL.viewport(0,0,this.GL.drawingBufferWidth,this.GL.drawingBufferHeight),this._viewport=this.GL.getParameter(this.GL.VIEWPORT),this._curCamera._resize();var i=this._pixelsState;i._pixelsDirty=!0,void 0!==i.pixels&&i._setProperty("pixels",new Uint8Array(this.GL.drawingBufferWidth*this.GL.drawingBufferHeight*4))},r.RendererGL.prototype.clear=function(){this.GL.clearColor(arguments[0]||0,arguments[1]||0,arguments[2]||0,arguments[3]||0),this.GL.clear(this.GL.COLOR_BUFFER_BIT|this.GL.DEPTH_BUFFER_BIT),this._pixelsState._pixelsDirty=!0},r.RendererGL.prototype.applyMatrix=function(t,e,i,n,o,s){16===arguments.length?r.Matrix.prototype.apply.apply(this.uMVMatrix,arguments):this.uMVMatrix.apply([t,e,0,0,i,n,0,0,0,0,1,0,o,s,0,1])},r.RendererGL.prototype.translate=function(t,e,i){return t instanceof r.Vector&&(i=t.z,e=t.y,t=t.x),this.uMVMatrix.translate([t,e,i]),this},r.RendererGL.prototype.scale=function(t,e,i){return this.uMVMatrix.scale(t,e,i),this},r.RendererGL.prototype.rotate=function(t,e){return void 0===e?this.rotateZ(t):(r.Matr
1ix.prototype.rotate.apply(this.uMVMatrix,arguments),this)},r.RendererGL.prototype.rotateX=function(t){return this.rotate(t,1,0,0),this},r.RendererGL.prototype.rotateY=function(t){return this.rotate(t,0,1,0),this},r.RendererGL.prototype.rotateZ=function(t){return this.rotate(t,0,0,1),this},r.RendererGL.prototype.push=function(){var t=r.Renderer.prototype.push.apply(this),e=t.properties;return e.uMVMatrix=this.uMVMatrix.copy(),e.uPMatrix=this.uPMatrix.copy(),e._curCamera=this._curCamera,this._curCamera=this._curCamera.copy(),e.ambientLightColors=this.ambientLightColors.slice(),e.directionalLightDirections=this.directionalLightDirections.slice(),e.directionalLightColors=this.directionalLightColors.slice(),e.pointLightPositions=this.pointLightPositions.slice(),e.pointLightColors=this.pointLightColors.slice(),e.userFillShader=this.userFillShader,e.userStrokeShader=this.userStrokeShader,e.userPointShader=this.userPointShader,e.pointSize=this.pointSize,e.curStrokeWeight=this.curStrokeWeight,e.curStrokeColor=this.curStrokeColor,e.curFillColor=this.curFillColor,e._useSpecularMaterial=this._useSpecularMaterial,e._useShininess=this._useShininess,e.constantAttenuation=this.constantAttenuation,e.linearAttenuation=this.linearAttenuation,e.quadraticAttenuation=this.quadraticAttenuation,e._enableLighting=this._enableLighting,e._useNormalMaterial=this._useNormalMaterial,e._tex=this._tex,e.drawMode=this.drawMode,t},r.RendererGL.prototype.resetMatrix=function(){return this.uMVMatrix=r.Matrix.identity(this._pInst),this},r.RendererGL.prototype._getImmediateStrokeShader=function(){var t=this.userStrokeShader;return t&&t.isStrokeShader()?t:this._getLineShader()},r.RendererGL.prototype._getRetainedStrokeShader=r.RendererGL.prototype._getImmediateStrokeShader,r.RendererGL.prototype._getImmediateFillShader=function(){if(this._useNormalMaterial)return console.log("Sorry, normalMaterial() does not currently work with custom WebGL geometry created with beginShape(). Falling back to standard fill material."),this._getImmediateModeShader();var t=this.userFillShader;if(this._enableLighting){if(!t||!t.isLightShader())return this._getLightShader()}else if(this._tex){if(!t||!t.isTextureShader())return this._getLightShader()}else if(!t)return this._getImmediateModeShader();return t},r.RendererGL.prototype._getRetainedFillShader=function(){if(this._useNormalMaterial)return this._getNormalShader();var t=this.userFillShader;if(this._enableLighting){if(!t||!t.isLightShader())return this._getLightShader()}else if(this._tex){if(!t||!t.isTextureShader())return this._getLightShader()}else if(!t)return this._getColorShader();return t},r.RendererGL.prototype._getImmediatePointShader=function(){var t=this.userPointShader;return t&&t.isPointShader()?t:this._getPointShader()},r.RendererGL.prototype._getRetainedLineShader=r.RendererGL.prototype._getImmediateLineShader,r.RendererGL.prototype._getLightShader=function(){return this._defaultLightShader||(this._defaultLightShader=this._pInst._glAttributes.perPixelLighting?new r.Shader(this,a.phongVert,a.phongFrag):new r.Shader(this,a.lightVert,a.lightTextureFrag)),this._defaultLightShader},r.RendererGL.prototype._getImmediateModeShader=function(){return this._defaultImmediateModeShader||(this._defaultImmediateModeShader=new r.Shader(this,a.immediateVert,a.vertexColorFrag)),this._defaultImmediateModeShader},r.RendererGL.prototype._getNormalShader=function(){return this._defaultNormalShader||(this._defaultNormalShader=new r.Shader(this,a.normalVert,a.normalFrag)),this._defaultNormalShader},r.RendererGL.prototype._getColorShader=function(){return this._defaultColorShader||(this._defaultColorShader=new r.Shader(this,a.normalVert,a.basicFrag)),this._defaultColorShader},r.RendererGL.prototype._getPointShader=function(){return this._defaultPointShader||(this._defaultPointShader=new r.Shader(this,a.pointVert,a.pointFrag)),this._defaultPointShader},r.RendererGL.prototype._getLineShader=function(){return this._defaultLineShader||(this._defaultLineShader=new r.Shader(this,a.lineVert,a.lineFrag)),this._defaultLineShader},r.RendererGL.prototype._getFontShader=function(){return this._defaultFontShader||(this.GL.getExtension("OES_standard_derivatives"),this._defaultFontShader=new r.Shader(this,a.fontVert,a.fontFrag)),this._defaultFontShader},r.RendererGL.prototype._getEmptyTexture=function(){if(!this._emptyTexture){var t=new r.Image(1,1);t.set(0,0,255),this._emptyTexture=new r.Texture(this,t)}return this._emptyTexture},r.RendererGL.prototype.getTexture=function(t){for(var e=this.textures,i=0;i<e.length;++i){var n=e[i];if(n.src===t)return n}var o=new r.Texture(this,t);return e.push(o),o},r.RendererGL.prototype._setStrokeUniforms=function(t){t.bindShader(),t.setUniform("uMaterialColor",this.curStrokeColor),t.setUniform("uStrokeWeight",this.curStrokeWeight)},r.RendererGL.prototype._setFillUniforms=function(t){t.bindShader(),t.setUniform("uMaterialColor",this.curFillColor),t.setUniform("isTexture",!!this._tex),this._tex&&t.setUniform("uSampler",this._tex),t.setUniform("uTint",this._tint),t.setUniform("uSpecular",this._useSpecularMaterial),t.setUniform("uShininess",this._useShininess),t.setUniform("uUseLighting",this._enableLighting),t.setUniform("uPointLightCount",this.pointLightColors.length/3),t.setUniform("uPointLightLocation",this.pointLightPositions),t.setUniform("uPointLightColor",this.pointLightColors),t.setUniform("uDirectionalLightCount",this.directionalLightColors.length/3),t.setUniform("uLightingDirection",this.directionalLightDirections),t.setUniform("uDirectionalColor",this.directionalLightColors),t.setUniform("uAmbientLightCount",this.ambientLightColors.length/3),t.setUniform("uAmbientColor",this.ambientLightColors),t.setUniform("uConstantAttenuation",this.constantAttenuation),t.setUniform("uLinearAttenuation",this.linearAttenuation),t.setUniform("uQuadraticAttenuation",this.quadraticAttenuation),t.bindTextures()},r.RendererGL.prototype._setPointUniforms=function(t){t.bindShader(),t.setUniform("uMaterialColor",this.curStrokeColor),t.setUniform("uPointSize",this.pointSize)}
1,r.RendererGL.prototype._bindBuffer=function(t,e,i,r,n){if(e||(e=this.GL.ARRAY_BUFFER),this.GL.bindBuffer(e,t),void 0!==i){var o=new(r||Float32Array)(i);this.GL.bufferData(e,o,n||this.GL.STATIC_DRAW)}},r.RendererGL.prototype._flatten=function(t){if(0===t.length)return[];if(2e4<t.length){var e,i=Object.prototype.toString,r=[],n=t.slice();for(e=n.pop();"[object Array]"===i.call(e)?n.push.apply(n,e):r.push(e),n.length&&void 0!==(e=n.pop()););return r.reverse(),r}return[].concat.apply([],t)},r.RendererGL.prototype._vToNArray=function(t){for(var e=[],i=0;i<t.length;i++){var r=t[i];e.push(r.x,r.y,r.z)}return e},r.prototype._assert3d=function(t){if(!this._renderer.isP3D)throw new Error(t+"() is only supported in WEBGL mode. If you'd like to use 3D graphics and WebGL, see  https://p5js.org/examples/form-3d-primitives.html for more information.")},r.RendererGL.prototype._initTessy=function(){var t=new o.GluTesselator;return t.gluTessCallback(o.gluEnum.GLU_TESS_VERTEX_DATA,function(t,e){e[e.length]=t[0],e[e.length]=t[1],e[e.length]=t[2]}),t.gluTessCallback(o.gluEnum.GLU_TESS_BEGIN,function(t){t!==o.primitiveType.GL_TRIANGLES&&console.log("expected TRIANGLES but got type: "+t)}),t.gluTessCallback(o.gluEnum.GLU_TESS_ERROR,function(t){console.log("error callback"),console.log("error number: "+t)}),t.gluTessCallback(o.gluEnum.GLU_TESS_COMBINE,function(t,e,i){return[t[0],t[1],t[2]]}),t.gluTessCallback(o.gluEnum.GLU_TESS_EDGE_FLAG,function(t){}),t},r.RendererGL.prototype._triangulate=function(t){this._tessy.gluTessNormal(0,0,1);var e=[];this._tessy.gluTessBeginPolygon(e);for(var i=0;i<t.length;i++){this._tessy.gluTessBeginContour();for(var r=t[i],n=0;n<r.length;n+=3){var o=[r[n],r[n+1],r[n+2]];this._tessy.gluTessVertex(o,o)}this._tessy.gluTessEndContour()}return this._tessy.gluTessEndPolygon(),e},r.RendererGL.prototype._bezierCoefficients=function(t){var e=t*t,i=1-t,r=i*i;return[r*i,3*r*t,3*i*e,e*t]},r.RendererGL.prototype._quadraticCoefficients=function(t){var e=1-t;return[e*e,2*e*t,t*t]},r.RendererGL.prototype._bezierToCatmull=function(t){return[t[1],t[1]+(t[2]-t[0])/this._curveTightness,t[2]-(t[3]-t[1])/this._curveTightness,t[2]]},e.exports=r.RendererGL},{"../core/constants":17,"../core/main":23,"../core/p5.Renderer":26,"./p5.Camera":69,"./p5.Matrix":71,"./p5.Shader":75,libtess:8}],75:[function(t,e,i){"use strict";var r=t("../core/main");r.Shader=function(t,e,i){this._renderer=t,this._vertSrc=e,this._fragSrc=i,this._vertShader=-1,this._fragShader=-1,this._glProgram=0,this._loadedAttributes=!1,this.attributes={},this._loadedUniforms=!1,this.uniforms={},this._bound=!1,this.samplers=[]},r.Shader.prototype.init=function(){if(0===this._glProgram){var t=this._renderer.GL;if(this._vertShader=t.createShader(t.VERTEX_SHADER),t.shaderSource(this._vertShader,this._vertSrc),t.compileShader(this._vertShader),!t.getShaderParameter(this._vertShader,t.COMPILE_STATUS))return console.error("Yikes! An error occurred compiling the vertex shader:"+t.getShaderInfoLog(this._vertShader)),null;if(this._fragShader=t.createShader(t.FRAGMENT_SHADER),t.shaderSource(this._fragShader,this._fragSrc),t.compileShader(this._fragShader),!t.getShaderParameter(this._fragShader,t.COMPILE_STATUS))return console.error("Darn! An error occurred compiling the fragment shader:"+t.getShaderInfoLog(this._fragShader)),null;this._glProgram=t.createProgram(),t.attachShader(this._glProgram,this._vertShader),t.attachShader(this._glProgram,this._fragShader),t.linkProgram(this._glProgram),t.getProgramParameter(this._glProgram,t.LINK_STATUS)||console.error("Snap! Error linking shader program: "+t.getProgramInfoLog(this._glProgram)),this._loadAttributes(),this._loadUniforms()}return this},r.Shader.prototype._loadAttributes=function(){if(!this._loadedAttributes){this.attributes={};for(var t=this._renderer.GL,e=t.getProgramParameter(this._glProgram,t.ACTIVE_ATTRIBUTES),i=0;i<e;++i){var r=t.getActiveAttrib(this._glProgram,i),n=r.name,o=t.getAttribLocation(this._glProgram,n),s={};s.name=n,s.location=o,s.index=i,s.type=r.type,s.size=r.size,this.attributes[n]=s}this._loadedAttributes=!0}},r.Shader.prototype._loadUniforms=function(){if(!this._loadedUniforms){for(var t=this._renderer.GL,e=t.getProgramParameter(this._glProgram,t.ACTIVE_UNIFORMS),i=0,r=0;r<e;++r){var n=t.getActiveUniform(this._glProgram,r),o={};o.location=t.getUniformLocation(this._glProgram,n.name),o.size=n.size;var s=n.name;1<n.size&&(s=s.substring(0,s.indexOf("[0]"))),o.name=s,o.type=n.type,o.type===t.SAMPLER_2D&&(o.samplerIndex=i,i++,this.samplers.push(o)),this.uniforms[s]=o}this._loadedUniforms=!0}},r.Shader.prototype.compile=function(){},r.Shader.prototype.bindShader=function(){this.init(),this._bound||(this.useProgram(),this._bound=!0,this._setMatrixUniforms(),this.setUniform("uViewport",this._renderer._viewport))},r.Shader.prototype.unbindShader=function(){return this._bound&&(this.unbindTextures(),this._bound=!1),this},r.Shader.prototype.bindTextures=function(){for(var t=this._renderer.GL,e=0;e<this.samplers.length;e++){var i=this.samplers[e],r=i.texture;void 0===r&&(r=this._renderer._getEmptyTexture()),t.activeTexture(t.TEXTURE0+i.samplerIndex),r.bindTexture(),r.update(
1),t.uniform1i(i.location,i.samplerIndex)}},r.Shader.prototype.updateTextures=function(){for(var t=0;t<this.samplers.length;t++){var e=this.samplers[t].texture;e&&e.update()}},r.Shader.prototype.unbindTextures=function(){},r.Shader.prototype._setMatrixUniforms=function(){this.setUniform("uProjectionMatrix",this._renderer.uPMatrix.mat4),this.setUniform("uModelViewMatrix",this._renderer.uMVMatrix.mat4),this.setUniform("uViewMatrix",this._renderer._curCamera.cameraMatrix.mat4),this.uniforms.uNormalMatrix&&(this._renderer.uNMatrix.inverseTranspose(this._renderer.uMVMatrix),this.setUniform("uNormalMatrix",this._renderer.uNMatrix.mat3))},r.Shader.prototype.useProgram=function(){return this._renderer.GL.useProgram(this._glProgram),this},r.Shader.prototype.setUniform=function(t,e){var i=this.uniforms[t];if(i){var r=i.location,n=this._renderer.GL;switch(this.useProgram(),i.type){case n.BOOL:n.uniform1i(r,!0===e?1:0);break;case n.INT:1<i.size?e.length&&n.uniform1iv(r,e):n.uniform1i(r,e);break;case n.FLOAT:1<i.size?e.length&&n.uniform1fv(r,e):n.uniform1f(r,e);break;case n.FLOAT_MAT3:n.uniformMatrix3fv(r,!1,e);break;case n.FLOAT_MAT4:n.uniformMatrix4fv(r,!1,e);break;case n.FLOAT_VEC2:1<i.size?e.length&&n.uniform2fv(r,e):n.uniform2f(r,e[0],e[1]);break;case n.FLOAT_VEC3:1<i.size?e.length&&n.uniform3fv(r,e):n.uniform3f(r,e[0],e[1],e[2]);break;case n.FLOAT_VEC4:1<i.size?e.length&&n.uniform4fv(r,e):n.uniform4f(r,e[0],e[1],e[2],e[3]);break;case n.INT_VEC2:1<i.size?e.length&&n.uniform2iv(r,e):n.uniform2i(r,e[0],e[1]);break;case n.INT_VEC3:1<i.size?e.length&&n.uniform3iv(r,e):n.uniform3i(r,e[0],e[1],e[2]);break;case n.INT_VEC4:1<i.size?e.length&&n.uniform4iv(r,e):n.uniform4i(r,e[0],e[1],e[2],e[3]);break;case n.SAMPLER_2D:n.activeTexture(n.TEXTURE0+i.samplerIndex),i.texture=this._renderer.getTexture(e),n.uniform1i(i.location,i.samplerIndex)}return this}},r.Shader.prototype.isLightShader=function(){return void 0!==this.attributes.aNormal||void 0!==this.uniforms.uUseLighting||void 0!==this.uniforms.uAmbientLightCount||void 0!==this.uniforms.uDirectionalLightCount||void 0!==this.uniforms.uPointLightCount||void 0!==this.uniforms.uAmbientColor||void 0!==this.uniforms.uDirectionalColor||void 0!==this.uniforms.uPointLightLocation||void 0!==this.uniforms.uPointLightColor||void 0!==this.uniforms.uLightingDirection||void 0!==this.uniforms.uSpecular},r.Shader.prototype.isTextureShader=function(){return 0<this.samplerIndex},r.Shader.prototype.isColorShader=function(){return void 0!==this.attributes.aVertexColor||void 0!==this.uniforms.uMaterialColor},r.Shader.prototype.isTexLightShader=function(){return this.isLightShader()&&this.isTextureShader()},r.Shader.prototype.isStrokeShader=function(){return void 0!==this.uniforms.uStrokeWeight},r.Shader.prototype.enableAttrib=function(t,e,i,r,n,o){if(t){var s=t.location;if(-1!==s){var a=this._renderer.GL;a.enableVertexAttribArray(s),a.vertexAttribPointer(s,e,i||a.FLOAT,r||!1,n||0,o||0)}}return this},e.exports=r.Shader},{"../core/main":23}],76:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");r.Texture=function(t,e){this._renderer=t;var i=this._renderer.GL;this.src=e,this.glTex=void 0,this.glTarget=i.TEXTURE_2D,this.glFormat=i.RGBA,this.mipmaps=!1,this.glMinFilter=i.LINEAR,this.glMagFilter=i.LINEAR,this.glWrapS=i.CLAMP_TO_EDGE,this.glWrapT=i.CLAMP_TO_EDGE,this.isSrcMediaElement=void 0!==r.MediaElement&&e instanceof r.MediaElement,this._videoPrevUpdateTime=0,this.isSrcHTMLElement=void 0!==r.Element&&e instanceof r.Element&&!(e instanceof r.Graphics),this.isSrcP5Image=e instanceof r.Image,this.isSrcP5Graphics=e instanceof r.Graphics,this.isImageData="undefined"!=typeof ImageData&&e instanceof ImageData;var n=this._getTextureDataFromSource();return this.width=n.width,this.height=n.height,this.init(n),this},r.Texture.prototype._getTextureDataFromSource=function(){var t;return this.isSrcP5Image?t=this.src.canvas:this.isSrcMediaElement||this.isSrcP5Graphics||this.isSrcHTMLElement?t=this.src.elt:this.isImageData&&(t=this.src),t},r.Texture.prototype.init=function(t){var e=this._renderer.GL;if(this.glTex=e.createTexture(),this.glWrapS=this._renderer.textureWrapX,this.glWrapT=this._renderer.textureWrapY,this.setWrapMode(this.glWrapS,this.glWrapT),this.bindTexture(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,this.glMagFilter),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,this.glMinFilter),0===this.width||0===this.height||this.isSrcMediaElement&&!this.src.loadedmetadata){var i=new Uint8Array([1,1,1,1]);e.texImage2D(this.glTarget,0,e.RGBA,1,1,0,this.glFormat,e.UNSIGNED_BYTE,i)}else e.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,e.UNSIGNED_BYTE,t)},r.Texture.prototype.update=function(){var t=this.src;if(0===t.width||0===t.height)return!1;var e=this._getTextureDataFromSource(),i=!1,r=this._renderer.GL;return e.width!==this.width||e.height!==this.height?(i=!0,this.width=e.width,this.height=e.height,this.isSrcP5Image?t.setModified(!1):(this.isSrcMediaElement||this.isSrcHTMLElement)&&t.setModified(!0)):this.isSrcP5Image?t.isModified()&&(i=!0,t.setModified(!1)):this.isSrcMediaElement?t.isModified()?(i=!0,t.setModified(!1)):t.loadedmetadata&&this._videoPrevUpdateTime!==t.time()&&(this._videoPrevUpdateTime=t.time(),i=!0):this.isImageData?t._dirty&&(i=!(t._dirty=!1)):i=!0,i&&(this.bindTexture(),r.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,r.UNSIGNED_BYTE,e)),i},r.Texture.prototype.bindTexture=function(){return this._renderer.GL.bindTexture(this.glTarget,this.glTex),this},r.Texture.prototype.unbindTexture=function(){this._renderer.GL.bindTexture(this.glTarget,null)},r.Texture.prototype.setInterpolation=function(t,e){var i=this._renderer.GL;this.glMinFilter=t===n.NEAREST?i.NEAREST:i.LINEAR,this.glMagFilter=e===n.NEAREST?i.NEAREST:i.LINEAR,this.bindTexture(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,this.glMinFilter),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,this.glMagFilter),this.unbindTexture()},r.Texture.prototype.setWrapMode=function(t,e){var i=this._renderer.GL,r=function(t){return 0==(t&t-1)},o=r(this.width),s=r(this.height);this.glWrapS=t===n.REPEAT?o&&s?i.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),i.CLAMP_TO_EDGE):t===n.MIRROR?o&&s?i.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),i.CLAMP_TO_EDGE):i.CLAMP_TO_EDGE,this.glWrapT=e===n.REPEAT?o&&s?i.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),i.CLAMP_TO_EDGE):e===n.MIRROR?o&&s?i.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),i.CLAMP_TO_EDGE):i.CLAMP_TO_EDGE,this.bindTexture(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,this.glWrapS),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,this.glWrapT),this.unbindTexture()},e.exports=r.Texture},{"../core/constants":17,"../core/main":23}
1],77:[function(t,e,i){"use strict";var r=t("../core/main"),n=t("../core/constants");function o(t,e){this.width=t,this.height=e,this.infos=[],this.findImage=function(t){var e,i,r=this.width*this.height;if(r<t)throw new Error("font is too complex to render in 3D");for(var n=this.infos.length-1;0<=n;--n){var o=this.infos[n];if(o.index+t<r){i=(e=o).imageData;break}}if(!e){try{i=new ImageData(this.width,this.height)}catch(t){var s=document.getElementsByTagName("canvas")[0],a=!s;s||((s=document.createElement("canvas")).style.display="none",document.body.appendChild(s));var h=s.getContext("2d");h&&(i=h.createImageData(this.width,this.height)),a&&document.body.removeChild(s)}this.infos.push(e={index:0,imageData:i})}var l=e.index;return e.index+=t,i._dirty=!0,{imageData:i,index:l}}}function s(t,e,i,r,n){var o=t.imageData.data,s=4*t.index++;o[s++]=e,o[s++]=i,o[s++]=r,o[s++]=n}t("./p5.Shader"),t("./p5.RendererGL.Retained"),r.RendererGL.prototype._applyTextProperties=function(){},r.RendererGL.prototype.textWidth=function(t){return this._isOpenType()?this._textFont._textWidth(t,this._textSize):0};var a=Math.sqrt(3),h=function(t){this.font=t,this.strokeImageInfos=new o(64,64),this.colDimImageInfos=new o(64,64),this.rowDimImageInfos=new o(64,64),this.colCellImageInfos=new o(64,64),this.rowCellImageInfos=new o(64,64),this.glyphInfos={},this.getGlyphInfo=function(t){var e=this.glyphInfos[t.index];if(e)return e;var i,n=t.getBoundingBox(),o=n.x1,h=n.y1,l=n.x2-o,u=n.y2-h,c=t.path.commands;if(0===l||0===u||!c.length)return this.glyphInfos[t.index]={};var p,f,d,m,y=[],g=[],v=[];for(i=8;0<=i;--i)v.push([]);for(i=8;0<=i;--i)g.push([]);function _(t,e,i){var r=y.length;function n(t,e,i){for(var r=t.length;0<r--;){var n=t[r];n<e&&(e=n),i<n&&(i=n)}return{min:e,max:i}}y.push(i);for(var o=n(t,1,0),s=Math.max(Math.floor(9*o.min),0),a=Math.min(Math.ceil(9*o.max),9),h=s;h<a;++h)v[h].push(r);for(var l=n(e,1,0),u=Math.max(Math.floor(9*l.min),0),c=Math.min(Math.ceil(9*l.max),9),p=u;p<c;++p)g[p].push(r)}function b(t){return(e=255*t)<0?0:255<e?255:e;var e}function x(t,e,i,n){this.p0=t,this.c0=e,this.c1=i,this.p1=n,this.toQuadratic=function(){return{x:this.p0.x,y:this.p0.y,x1:this.p1.x,y1:this.p1.y,cx:(3*(this.c0.x+this.c1.x)-(this.p0.x+this.p1.x))/4,cy:(3*(this.c0.y+this.c1.y)-(this.p0.y+this.p1.y))/4}},this.quadError=function(){return r.Vector.sub(r.Vector.sub(this.p1,this.p0),r.Vector.mult(r.Vector.sub(this.c1,this.c0),3)).mag()/2},this.split=function(t){var e=r.Vector.lerp(this.p0,this.c0,t),i=r.Vector.lerp(this.c0,this.c1,t),n=r.Vector.lerp(e,i,t);this.c1=r.Vector.lerp(this.c1,this.p1,t),this.c0=r.Vector.lerp(i,this.c1,t);var o=r.Vector.lerp(n,this.c0,t),s=new x(this.p0,e,n,o);return this.p0=o,s},this.splitInflections=function(){var t=r.Vector.sub(this.c0,this.p0),e=r.Vector.sub(r.Vector.sub(this.c1,this.c0),t),i=r.Vector.sub(r.Vector.sub(r.Vector.sub(this.p1,this.c1),t),r.Vector.mult(e,2)),n=[],o=e.x*i.y-e.y*i.x;if(0!==o){var s=t.x*i.y-t.y*i.x,a=t.x*e.y-t.y*e.x,h=s*s-4*o*a;if(0<=h){o<0&&(o=-o,s=-s,a=-a);var l=Math.sqrt(h),u=(-s-l)/(2*o),c=(-s+l)/(2*o);0<u&&u<1&&(n.push(this.split(u)),c=1-(1-c)/(1-u)),0<c&&c<1&&n.push(this.split(c))}}return n.push(this),n}}function w(t,e,i,n,o,s,h,l){for(var u=new x(new r.Vector(t,e),new r.Vector(i,n),new r.Vector(o,s),new r.Vector(h,l)).splitInflections(),c=[],p=30/a,f=0;f<u.length;f++){for(var d,m=u[f],y=[];!(.125<=(d=p/m.quadError()));){var g=Math.pow(d,1/3),v=m.split(g),_=m.split(1-g/(1-g));c.push(v),y.push(m),m=_}d<1&&c.push(m.split(.5)),c.push(m),Array.prototype.push.apply(c,y.reverse())}return c}function T(t,e,i,r){_([t,i],[e,r],{x:t,y:e,cx:(t+i)/2,cy:(e+r)/2})}function S(t,e,i,r){return Math.abs(i-t)<1e-5&&Math.abs(r-e)<1e-5}for(var M=0;M<c.length;++M){var E=c[M],C=(E.x-o)/l,A=(E.y-h)/u;if(!S(p,f,C,A)){switch(E.type){case"M":d=C,m=A;break;case"L":T(p,f,C,A);break;case"Q":var P=(E.x1-o)/l,k=(E.y1-h)/u;_([p,C,P],[f,A,k],{x:p,y:f,cx:P,cy:k});break;case"Z":S(p,f,d,m)?y.push({x:p,y:f}):(T(p,f,d,m),y.push({x:d,y:m}));break;case"C":for(var R=w(p,f,(E.x1-o)/l,(E.y1-h)/u,(E.x2-o)/l,(E.y2-h)/u,C,A),D=0;D<R.length;D++){var O=R[D].toQuadratic();_([O.x,O.x1,O.cx],[O.y,O.y1,O.cy],O)}break;default:throw new Error("unknown command type: "+E.type)}p=C,f=A}}for(var L=y.length,I=this.strokeImageInfos.findImage(L),N=I.index,F=0;F<L;++F){var U=y[F];
1s(I,b(U.x),b(U.y),b(U.cx),b(U.cy))}function B(t,e,i){for(var r=t.length,n=e.findImage(r),o=n.index,a=0,h=0;h<r;++h)a+=t[h].length;for(var l=i.findImage(a),u=0;u<r;++u){var c=t[u],p=c.length,f=l.index;s(n,f>>7,127&f,p>>7,127&p);for(var d=0;d<p;++d){var m=c[d]+N;s(l,m>>7,127&m,0,0)}}return{cellImageInfo:l,dimOffset:o,dimImageInfo:n}}return(e=this.glyphInfos[t.index]={glyph:t,uGlyphRect:[n.x1,-n.y1,n.x2,-n.y2],strokeImageInfo:I,strokes:y,colInfo:B(v,this.colDimImageInfos,this.colCellImageInfos),rowInfo:B(g,this.rowDimImageInfos,this.rowCellImageInfos)}).uGridOffset=[e.colInfo.dimOffset,e.rowInfo.dimOffset],e}};r.RendererGL.prototype._renderText=function(t,e,i,o,s){if(this._textFont&&"string"!=typeof this._textFont){if(!(s<=o)&&this._doFill){if(!this._isOpenType())return console.log("WEBGL: only opentype fonts are supported"),t;t.push();var a=this._doStroke,l=this.drawMode;this._doStroke=!1,this.drawMode=n.TEXTURE;var u=this._textFont.font,c=this._textFont._fontInfo;c||(c=this._textFont._fontInfo=new h(u));var p=this._textFont._handleAlignment(this,e,i,o),f=this._textSize/u.unitsPerEm;this.translate(p.x,p.y,0),this.scale(f,f,1);var d=this.GL,m=!this._defaultFontShader,y=this._getFontShader();y.init(),y.bindShader(),m&&(y.setUniform("uGridImageSize",[64,64]),y.setUniform("uCellsImageSize",[64,64]),y.setUniform("uStrokeImageSize",[64,64]),y.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor);var g=this.gHash.glyph;if(!g){var v=this._textGeom=new r.Geometry(1,1,function(){for(var t=0;t<=1;t++)for(var e=0;e<=1;e++)this.vertices.push(new r.Vector(e,t,0)),this.uvs.push(e,t)});v.computeFaces().computeNormals(),g=this.createBuffers("glyph",v)}this._prepareBuffers(g,y,r.RendererGL._textBuffers),this._bindBuffer(g.indexBuffer,d.ELEMENT_ARRAY_BUFFER),y.setUniform("uMaterialColor",this.curFillColor);try{for(var _=0,b=null,x=u.stringToGlyphs(e),w=0;w<x.length;++w){var T=x[w];b&&(_+=u.getKerningValue(b,T));var S=c.getGlyphInfo(T);if(S.uGlyphRect){var M=S.rowInfo,E=S.colInfo;y.setUniform("uSamplerStrokes",S.strokeImageInfo.imageData),y.setUniform("uSamplerRowStrokes",M.cellImageInfo.imageData),y.setUniform("uSamplerRows",M.dimImageInfo.imageData),y.setUniform("uSamplerColStrokes",E.cellImageInfo.imageData),y.setUniform("uSamplerCols",E.dimImageInfo.imageData),y.setUniform("uGridOffset",S.uGridOffset),y.setUniform("uGlyphRect",S.uGlyphRect),y.setUniform("uGlyphOffset",_),y.bindTextures(),d.drawElements(d.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)}_+=T.advanceWidth,b=T}}finally{y.unbindShader(),this._doStroke=a,this.drawMode=l,t.pop()}return this._pixelsState._pixelsDirty=!0,t}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":17,"../core/main":23,"./p5.RendererGL.Retained":73,"./p5.Shader":75}]},{},[12])(12)}),function(t,e){"function"==typeof define&&define.amd?define("p5.sound",["p5"],function(t){e(t)}):"object"==typeof exports?e(require("../p5")):e(t.p5)}(this,function(t){var e,i,r,n,o,s,a,h,l,u,c,p,f,d,m,y,g,v,_,b,x,w,T,S,M;(function(){!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=window.webkitAudioContext,"function"!=typeof AudioContext.prototype.createGain&&(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),"function"!=typeof AudioContext.prototype.createDelay&&(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),"function"!=typeof AudioContext.prototype.createScriptProcessor&&(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),"function"!=typeof AudioContext.prototype.createPeriodicWave&&(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,r){void 0!==r?e.internal_start(t||0,i,r):e.internal_start(t||0,i||0)}
1):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},"function"!=typeof AudioContext.prototype.createOscillator&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=window.webkitOfflineAudioContext)}(window),navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var e=document.createElement("audio");t.prototype.isSupported=function(){return!!e.canPlayType},t.prototype.isFileSupported=function(t){switch(t.toLowerCase()){case"mp3":return!!e.canPlayType&&e.canPlayType("audio/mpeg;");case"wav":return!!e.canPlayType&&e.canPlayType('audio/wav; codecs="1"');case"ogg":return!!e.canPlayType&&e.canPlayType('audio/ogg; codecs="vorbis"');case"aac":case"m4a":case"mp4":return!!e.canPlayType&&(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;"));case"aif":case"aiff":return!!e.canPlayType&&e.canPlayType("audio/x-aiff;");default:return!1}}})(),e=function(){var t=function(t,e){this._dragged=!1,this._element=t,this._bindedMove=this._moved.bind(this),this._bindedEnd=this._ended.bind(this,e),t.addEventListener("touchstart",this._bindedEnd),t.addEventListener("touchmove",this._bindedMove),t.addEventListener("touchend",this._bindedEnd),t.addEventListener("mouseup",this._bindedEnd)};function e(t){return"running"===t.state}return t.prototype._moved=function(t){this._dragged=!0},t.prototype._ended=function(t){this._dragged||function(t){var e=t.createBuffer(1,1,t.sampleRate),i=t.createBufferSource();i.buffer=e,i.connect(t.destination),i.start(0),t.resume&&t.resume()}(t),this._dragged=!1},t.prototype.dispose=function(){this._element.removeEventListener("touchstart",this._bindedEnd),this._element.removeEventListener("touchmove",this._bindedMove),this._element.removeEventListener("touchend",this._bindedEnd),this._element.removeEventListener("mouseup",this._bindedEnd),this._bindedMove=null,this._bindedEnd=null,this._element=null},function(i,r,n){var o=new Promise(function(t){!function(t,i){e(t)?i():function r(){e(t)?i():(requestAnimationFrame(r),t.resume&&t.resume())}()}(i,t)}),s=[];return r||(r=document.body),function e(i,r,n){if(Array.isArray(i)||NodeList&&i instanceof NodeList)for(var o=0;o<i.length;o++)e(i[o],r,n);else if("string"==typeof i)e(document.querySelectorAll(i),r,n);else if(i.jquery&&"function"==typeof i.toArray)e(i.toArray(),r,n);else if(Element&&i instanceof Element){var s=new t(i,n);r.push(s)}}(r,s,i),o.then(function(){for(var t=0;t<s.length;t++)s[t].dispose();s=null,n&&n()}),o}}(),function(t){"use strict";t.Emitter=function(){this._events={}},t.extend(t.Emitter),t.Emitter.prototype.on=function(t,e){for(var i=t.split(/\W+/),r=0;r<i.length;r++){var n=i[r];this._events.hasOwnProperty(n)||(this._events[n]=[]),this._events[n].push(e)}return this},t.Emitter.prototype.off=function(e,i){for(var r=e.split(/\W+/),n=0;n<r.length;n++)if(this._events.hasOwnProperty(e=r[n]))if(t.prototype.isUndef(i))this._events[e]=[];else for(var o=this._events[e],s=0;s<o.length;s++)o[s]===i&&o.splice(s,1);return this},t.Emitter.prototype.emit=function(t){if(this._events){var e=Array.apply(null,arguments).slice(1);if(this._events.hasOwnProperty(t))for(var i=this._events[t],r=0,n=i.length;r<n;r++)i[r].apply(this,e)}return this},t.Emitter.mixin=function(e){var i=["on","off","emit"];e._events={};for(var r=0;r<i.length;r++){var n=i[r];e[n]=t.Emitter.prototype[n]}},t.Emitter.prototype.dispose=function(){return t.prototype.dispose.call(this),this._events=null,this}}(i=function(){"use strict";var t,e=function(t,e){this.isUndef(t)||1===t?this.input=this.context.createGain():t>1&&(this.input=new Array(t)),this.isUndef(e)||1===e?this.output=this.context.createGain():e>1&&(this.output=new Array(t))};return e.prototype.set=function(t,i,r){if(this.isObject(t))r=i;else if(this.isString(t)){var n={};n[t]=i,t=n}
1t:for(var o in t){i=t[o];var s=this;if(-1!==o.indexOf(".")){for(var a=o.split("."),h=0;h<a.length-1;h++)if((s=s[a[h]])instanceof e){a.splice(0,h+1);var l=a.join(".");s.set(l,i);continue t}o=a[a.length-1]}var u=s[o];this.isUndef(u)||(e.Signal&&u instanceof e.Signal||e.Param&&u instanceof e.Param?u.value!==i&&(this.isUndef(r)?u.value=i:u.rampTo(i,r)):u instanceof AudioParam?u.value!==i&&(u.value=i):u instanceof e?u.set(i):u!==i&&(s[o]=i))}return this},e.prototype.get=function(t){this.isUndef(t)?t=this._collectDefaults(this.constructor):this.isString(t)&&(t=[t]);for(var i={},r=0;r<t.length;r++){var n=t[r],o=this,s=i;if(-1!==n.indexOf(".")){for(var a=n.split("."),h=0;h<a.length-1;h++){var l=a[h];s[l]=s[l]||{},s=s[l],o=o[l]}n=a[a.length-1]}var u=o[n];this.isObject(t[n])?s[n]=u.get():e.Signal&&u instanceof e.Signal?s[n]=u.value:e.Param&&u instanceof e.Param?s[n]=u.value:u instanceof AudioParam?s[n]=u.value:u instanceof e?s[n]=u.get():this.isFunction(u)||this.isUndef(u)||(s[n]=u)}return i},e.prototype._collectDefaults=function(t){var e=[];if(this.isUndef(t.defaults)||(e=Object.keys(t.defaults)),!this.isUndef(t._super))for(var i=this._collectDefaults(t._super),r=0;r<i.length;r++)-1===e.indexOf(i[r])&&e.push(i[r]);return e},e.prototype.toString=function(){for(var t in e){var i=t[0].match(/^[A-Z]$/),r=e[t]===this.constructor;if(this.isFunction(e[t])&&i&&r)return t}return"Tone"},Object.defineProperty(e.prototype,"numberOfInputs",{get:function(){return this.input?this.isArray(this.input)?this.input.length:1:0}}),Object.defineProperty(e.prototype,"numberOfOutputs",{get:function(){return this.output?this.isArray(this.output)?this.output.length:1:0}}),e.prototype.dispose=function(){return this.isUndef(this.input)||(this.input instanceof AudioNode&&this.input.disconnect(),this.input=null),this.isUndef(this.output)||(this.output instanceof AudioNode&&this.output.disconnect(),this.output=null),this},e.prototype.connect=function(t,e,i){return Array.isArray(this.output)?(e=this.defaultArg(e,0),this.output[e].connect(t,0,i)):this.output.connect(t,e,i),this},e.prototype.disconnect=function(t,e,i){this.isArray(this.output)?this.isNumber(t)?this.output[t].disconnect():(e=this.defaultArg(e,0),this.output[e].disconnect(t,0,i)):this.output.disconnect.apply(this.output,arguments)},e.prototype.connectSeries=function(){if(arguments.length>1)for(var t=arguments[0],e=1;e<arguments.length;e++){var i=arguments[e];t.connect(i),t=i}return this},e.prototype.chain=function(){if(arguments.length>0)for(var t=this,e=0;e<arguments.length;e++){var i=arguments[e];t.connect(i),t=i}return this},e.prototype.fan=function(){if(arguments.length>0)for(var t=0;t<arguments.length;t++)this.connect(arguments[t]);return this},AudioNode.prototype.chain=e.prototype.chain,AudioNode.prototype.fan=e.prototype.fan,e.prototype.defaultArg=function(t,e){if(this.isObject(t)&&this.isObject(e)){var i={};for(var r in t)i[r]=this.defaultArg(e[r],t[r]);for(var n in e)i[n]=this.defaultArg(t[n],e[n]);return i}return this.isUndef(t)?e:t},e.prototype.optionsObject=function(t,e,i){var r={};if(1===t.length&&this.isObject(t[0]))r=t[0];else for(var n=0;n<e.length;n++)r[e[n]]=t[n];return this.isUndef(i)?r:this.defaultArg(r,i)},e.prototype.isUndef=function(t){return void 0===t},e.prototype.isFunction=function(t){return"function"==typeof t},e.prototype.isNumber=function(t){return"number"==typeof t},e.prototype.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object},e.prototype.isBoolean=function(t){return"boolean"==typeof t},e.prototype.isArray=function(t){return Array.isArray(t)},e.prototype.isString=function(t){return"string"==typeof t},e.noOp=function(){},e.prototype._readOnly=function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this._readOnly(t[e]);else Object.defineProperty(this,t,{writable:!1,enumerable:!0})},e.prototype._writable=function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this._writable(t[e]);else Object.defineProperty(this,t,{writable:!0})},e.State={Started:"started",Stopped:"stopped",Paused:"paused"},e.prototype.equalPowerScale=function(t){var e=.5*Math.PI;return Math.sin(t*e)},e.prototype.dbToGain=function(t){return Math.pow(2,t/6)},e.prototype.gainToDb=function(t){return Math.log(t)/Math.LN10*20},e.prototype.intervalToFrequencyRatio=function(t){return Math.pow(2,t/12)},e.prototype.now=function(){return e.context.now()},e.now=function(){return e.context.now()},e.extend=function(t,i){function r(){}e.prototype.isUndef(i)&&(i=e),r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t,t._super=i},Object.defineProperty(e,"context",{get:function(){return t},set:function(i){t=e.Context&&i instanceof e.Context?i:new e.Context(i),e.Context&&e.Context.emit("init",t)}}),Object.defineProperty(e.prototype,"context",{get:function(){return e.context}}),e.setContext=function(t){e.context=t},Object.defineProperty(e.prototype,"blockTime",{get:function(){return 128/this.context.sampleRate}}),Object.defineProperty(e.prototype,"sampleTime",{get:function(){return 1/this.context.sampleRate}}),Object.defineProperty(e,"supported",{get:function(){var t=window.hasOwnProperty("AudioContext")||window.hasOwnProperty("webkitAudioContext"),e=window.hasOwnProperty("Promise"),i=window.hasOwnProperty("Worker");return t&&e&&i}}),e.version="r10",window,e}()),function(t){!window.hasOwnProperty("AudioContext")&&window.hasOwnProperty("webkitAudioContext")&&(window.AudioContext=window.webkitAudioContext),t.Context=function(e){for(var i in t.Emitter.call(this),e||(e=new window.AudioContext),this._context=e,this._context)this._defineProperty(this._context,i);this._latencyHint="interactive",this._lookAhead=.1,this._updateInterval=this._lookAhead/3,this._computedUpdateInterval=0,this._worker=this._createWorker(),this._constants={}},t.extend(t.Context,t.Emitter),t.Emitter.mixin(t.Context),t.Context.prototype._defineProperty=function(t,e){this.isUndef(this[e])&&Object.defineProperty(this,e,{get:function(){return"function"==typeof t[e]?t[e].bind(t):t[e]}
1,set:function(i){t[e]=i}})},t.Context.prototype.now=function(){return this._context.currentTime},t.Context.prototype._createWorker=function(){window.URL=window.URL||window.webkitURL;var t=new Blob(["var timeoutTime = "+(1e3*this._updateInterval).toFixed(1)+";self.onmessage = function(msg){\ttimeoutTime = parseInt(msg.data);};function tick(){\tsetTimeout(tick, timeoutTime);\tself.postMessage('tick');}tick();"]),e=URL.createObjectURL(t),i=new Worker(e);return i.addEventListener("message",(function(){this.emit("tick")}).bind(this)),i.addEventListener("message",(function(){var t=this.now();this.isNumber(this._lastUpdate)&&(this._computedUpdateInterval=Math.max(t-this._lastUpdate,.97*this._computedUpdateInterval)),this._lastUpdate=t}).bind(this)),i},t.Context.prototype.getConstant=function(t){if(this._constants[t])return this._constants[t];for(var e=this._context.createBuffer(1,128,this._context.sampleRate),i=e.getChannelData(0),r=0;r<i.length;r++)i[r]=t;var n=this._context.createBufferSource();return n.channelCount=1,n.channelCountMode="explicit",n.buffer=e,n.loop=!0,n.start(0),this._constants[t]=n,n},Object.defineProperty(t.Context.prototype,"lag",{get:function(){return Math.max(this._computedUpdateInterval-this._updateInterval,0)}}),Object.defineProperty(t.Context.prototype,"lookAhead",{get:function(){return this._lookAhead},set:function(t){this._lookAhead=t}}),Object.defineProperty(t.Context.prototype,"updateInterval",{get:function(){return this._updateInterval},set:function(e){this._updateInterval=Math.max(e,t.prototype.blockTime),this._worker.postMessage(Math.max(1e3*e,1))}}),Object.defineProperty(t.Context.prototype,"latencyHint",{get:function(){return this._latencyHint},set:function(t){var e=t;if(this._latencyHint=t,this.isString(t))switch(t){case"interactive":e=.1,this._context.latencyHint=t;break;case"playback":e=.8,this._context.latencyHint=t;break;case"balanced":e=.25,this._context.latencyHint=t;break;case"fastest":e=.01}this.lookAhead=e,this.updateInterval=e/3}}),t.supported?(function(){var e=AudioNode.prototype.connect,i=AudioNode.prototype.disconnect;function r(i,r,n){if(i.input)Array.isArray(i.input)?(t.prototype.isUndef(n)&&(n=0),this.connect(i.input[n])):this.connect(i.input,r,n);else try{i instanceof AudioNode?e.call(this,i,r,n):e.call(this,i,r)}catch(o){throw new Error("error connecting to node: "+i+"\n"+o)}}AudioNode.prototype.connect!==r&&(AudioNode.prototype.connect=r,AudioNode.prototype.disconnect=function(e,r,n){if(e&&e.input&&Array.isArray(e.input))t.prototype.isUndef(n)&&(n=0),this.disconnect(e.input[n],r,n);else if(e&&e.input)this.disconnect(e.input,r,n);else try{i.apply(this,arguments)}catch(o){throw new Error("error disconnecting node: "+e+"\n"+o)}})}(),t.context=new t.Context):console.warn("This browser does not support Tone.js")}(i),r=function(e,i,r){const n=new window.AudioContext;return r.context.dispose(),r.setContext(n),t.prototype.getAudioContext=function(){return n},t.prototype.userStartAudio=function(i,r){var o=i;return i instanceof t.Element?o=i.elt:i instanceof Array&&i[0]instanceof t.Element&&(o=i.map(function(t){return t.elt})),e(n,o,r)},n}(e,0,i),n=function(e){var i=new function(){this.input=e.createGain(),this.output=e.createGain(),this.limiter=e.createDynamicsCompressor(),this.limiter.threshold.value=-3,this.limiter.ratio.value=20,this.limiter.knee.value=1,this.audiocontext=e,this.output.disconnect(),this.input.connect(this.limiter),this.limiter.connect(this.output),this.meter=e.createGain(),this.fftMeter=e.createGain(),this.output.connect(this.meter),this.output.connect(this.fftMeter),this.output.connect(this.audiocontext.destination),this.soundArray=[],this.parts=[],this.extensions=[]};return t.prototype.getMasterVolume=function(){return i.output.gain.value},t.prototype.masterVolume=function(t,e,r){if("number"==typeof t){e=e||0;var n=i.audiocontext.currentTime,o=i.output.gain.value;i.output.gain.cancelScheduledValues(n+(r=r||0)),i.output.gain.linearRampToValueAtTime(o,n+r),i.output.gain.linearRampToValueAtTime(t,n+r+e)}else{if(!t)return i.output.gain;t.connect(i.output.gain)}},t.prototype.soundOut=t.soundOut=i,t.soundOut._silentNode=i.audiocontext.createGain(),t.soundOut._silentNode.gain.value=0,t.soundOut._silentNode.connect(i.audiocontext.destination),i}(r),o=function(){var e=n;t.prototype.sampleRate=function(){return e.audiocontext.sampleRate},t.prototype.freqToMidi=function(t){var e=Math.log(t/440)/Math.log(2);return Math.round(12*e)+69};var i=t.prototype.midiToFreq=function(t){return 440*Math.pow(2,(t-69)/12)};function r(t,e,i){for(var r=i.length,n=0;n<r;
1n++)t.setUint8(e+n,i.charCodeAt(n))}return t.prototype.soundFormats=function(){e.extensions=[];for(var t=0;t<arguments.length;t++){if(arguments[t]=arguments[t].toLowerCase(),!(["mp3","wav","ogg","m4a","aac"].indexOf(arguments[t])>-1))throw arguments[t]+" is not a valid sound format!";e.extensions.push(arguments[t])}},t.prototype.disposeSound=function(){for(var t=0;t<e.soundArray.length;t++)e.soundArray[t].dispose()},t.prototype.registerMethod("remove",t.prototype.disposeSound),t.prototype._checkFileFormats=function(i){var r;if("string"==typeof i){var n=(r=i).split(".").pop();if(["mp3","wav","ogg","m4a","aac"].indexOf(n)>-1){if(t.prototype.isFileSupported(n))r=r;else for(var o=r.split("."),s=o[o.length-1],a=0;a<e.extensions.length;a++)if(t.prototype.isFileSupported(h=e.extensions[a])){for(s="",2===o.length&&(s+=o[0]),a=1;a<=o.length-2;a++)s+="."+o[a];r=s+=".",r=r+=h;break}}else for(a=0;a<e.extensions.length;a++)if(t.prototype.isFileSupported(h=e.extensions[a])){r=r+"."+h;break}}else if("object"==typeof i)for(a=0;a<i.length;a++){var h=i[a].split(".").pop();if(t.prototype.isFileSupported(h)){r=i[a];break}}return r},t.prototype._mathChain=function(t,e,i,r,n){for(var o in t.mathOps)t.mathOps[o]instanceof n&&(t.mathOps[o].dispose(),(i=o)<t.mathOps.length-1&&(r=t.mathOps[o+1]));return t.mathOps[i-1].disconnect(),t.mathOps[i-1].connect(e),e.connect(r),t.mathOps[i]=e,t},{convertToWav:function(t){var i,n=function(t,e){for(var i=t.length+e.length,r=new Float32Array(i),n=0,o=0;o<i;)r[o++]=t[n],r[o++]=e[n],n++;return r}(i=t.getChannelData(0),t.numberOfChannels>1?t.getChannelData(1):i),o=new window.ArrayBuffer(44+2*n.length),s=new window.DataView(o);r(s,0,"RIFF"),s.setUint32(4,36+2*n.length,!0),r(s,8,"WAVE"),r(s,12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,2,!0),s.setUint32(24,e.audiocontext.sampleRate,!0),s.setUint32(28,4*e.audiocontext.sampleRate,!0),s.setUint16(32,4,!0),s.setUint16(34,16,!0),r(s,36,"data"),s.setUint32(40,2*n.length,!0);for(var a=n.length,h=44,l=0;l<a;l++)s.setInt16(h,32767*n[l],!0),h+=2;return s},midiToFreq:i,noteToFreq:function(t){if("string"!=typeof t)return t;var e={A:21,B:23,C:24,D:26,E:28,F:29,G:31}[t[0].toUpperCase()];switch(e+=12*(~~t.slice(-1)-1),t[1]){case"#":e+=1;break;case"b":e-=1}return i(e)}}}(),s=function(t,e,i){var r,n,o=new Error;return o.name=t,o.originalStack=o.stack+e,r=o.stack+e,o.failedPath=i,n=(n=r.split("\n")).filter(function(t){return!t.match(/(p5.|native code|globalInit)/g)}),o.stack=n.join("\n"),o},void 0!==(a=n.audiocontext).createStereoPanner?(t.Panner=function(t,e){this.stereoPanner=this.input=a.createStereoPanner(),t.connect(this.stereoPanner),this.stereoPanner.connect(e)},t.Panner.prototype.pan=function(t,e){this.stereoPanner.pan.linearRampToValueAtTime(t,a.currentTime+(e||0))},t.Panner.prototype.inputChannels=function(){},t.Panner.prototype.connect=function(t){this.stereoPanner.connect(t)},t.Panner.prototype.disconnect=function(){this.stereoPanner&&this.stereoPanner.disconnect()}):(t.Panner=function(t,e,i){this.input=a.createGain(),t.connect(this.input),this.left=a.createGain(),this.right=a.createGain(),this.left.channelInterpretation="discrete",this.right.channelInterpretation="discrete",i>1?(this.splitter=a.createChannelSplitter(2),this.input.connect(this.splitter),this.splitter.connect(this.left,1),this.splitter.connect(this.right,0)):(this.input.connect(this.left),this.input.connect(this.right)),this.output=a.createChannelMerger(2),this.left.connect(this.output,0,1),this.right.connect(this.output,0,0),this.output.connect(e)},t.Panner.prototype.pan=function(t,e){var i=a.currentTime+(e||0),r=(t+1)/2,n=Math.cos(r*Math.PI/2),o=Math.sin(r*Math.PI/2);this.left.gain.linearRampToValueAtTime(o,i),this.right.gain.linearRampToValueAtTime(n,i)},t.Panner.prototype.inputChannels=function(t){1===t?(this.input.disconnect(),this.input.connect(this.left),this.input.connect(this.right)):2===t&&(this.splitter=a.createChannelSplitter(2),this.input.disconnect(),this.input.connect(this.splitter),this.splitter.connect(this.left,1),this.splitter.connect(this.right,0))},t.Panner.prototype.connect=function(t){this.output.connect(t)},t.Panner.prototype.disconnect=function(){this.output&&this.output.disconnect()}),function(){var e=s,i=n,r=i.audiocontext,a=o.midiToFreq,h=o.convertToWav;t.SoundFile=function(e,r,n,o){if(void 0!==e){if("string"==typeof e||"string"==typeof e[0]){var s=t.prototype._checkFileFormats(e);this.url=s}else if("object"==typeof e&&!(window.File&&window.FileReader&&window.FileList&&window.Blob))throw"Unable to load file because the File API is not supported";e.file&&(e=e.file),this.file=e}this._onended=function(){},this._looping=!1,this._playing=!1,this._paused=!1,this._pauseTime=0,this._cues=[],this._cueIDCounter=0,this._lastPos=0,this._counterNode=null,this._scopeNode=null,this.bufferSourceNodes=[],this.bufferSourceNode=null,this.buffer=null,this.playbackRate=1,this.input=i.audiocontext.createGain(),this.output=i.audiocontext.createGain(),this.reversed=!1,this.startTime=0,this.endTime=null,this.pauseTime=0,this.mode="sustain",this.startMillis=null,this.panPosition=0,this.panner=new t.Panner(this.output,i.input,2),(this.url||this.file)&&this.load(r,n),i.soundArray.push(this),this._whileLoading="function"==typeof o?o:function(){},this._onAudioProcess=(function(t){var e=t.inputBuffer.getChannelData(0);this._lastPos=e[e.length-1]||0,this._onTimeUpdate(self._lastPos)}).bind(this),this._clearOnEnd=(function(t){const e=t.target,i=this;e._playing=!1,e.removeEventListener("ended",i._clearOnEnd),i._onended(i),i.bufferSourceNodes.forEac
1h(function(t,e){!1===t._playing&&i.bufferSourceNodes.splice(e)}),0===i.bufferSourceNodes.length&&(i._playing=!1)}).bind(this)},t.prototype.registerPreloadMethod("loadSound",t.prototype),t.prototype.loadSound=function(e,i,r,n){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&window.alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS");var o=this;return new t.SoundFile(e,function(){"function"==typeof i&&i.apply(o,arguments),"function"==typeof o._decrementPreload&&o._decrementPreload()},r,n)},t.SoundFile.prototype.load=function(t,i){var n=this,o=(new Error).stack;if(void 0!==this.url&&""!==this.url){var s=new XMLHttpRequest;s.addEventListener("progress",function(t){n._updateProgress(t)},!1),s.open("GET",this.url,!0),s.responseType="arraybuffer",s.onload=function(){if(200===s.status){if(!n.panner)return;r.decodeAudioData(s.response,function(e){n.panner&&(n.buffer=e,n.panner.inputChannels(e.numberOfChannels),t&&t(n))},function(){if(n.panner){var t=new e("decodeAudioData",o,n.url),r="AudioContext error at decodeAudioData for "+n.url;i?(t.msg=r,i(t)):console.error(r+"\n The error stack trace includes: \n"+t.stack)}})}else{if(!n.panner)return;var a=new e("loadSound",o,n.url),h="Unable to load "+n.url+". The request status was: "+s.status+" ("+s.statusText+")";i?(a.message=h,i(a)):console.error(h+"\n The error stack trace includes: \n"+a.stack)}},s.onerror=function(){var t=new e("loadSound",o,n.url),r="There was no response from the server at "+n.url+". Check the url and internet connectivity.";i?(t.message=r,i(t)):console.error(r+"\n The error stack trace includes: \n"+t.stack)},s.send()}else if(void 0!==this.file){var a=new FileReader;a.onload=function(){n.panner&&r.decodeAudioData(a.result,function(e){n.panner&&(n.buffer=e,n.panner.inputChannels(e.numberOfChannels),t&&t(n))})},a.onerror=function(t){n.panner&&onerror&&onerror(t)},a.readAsArrayBuffer(this.file)}},t.SoundFile.prototype._updateProgress=function(t){t.lengthComputable?this._whileLoading(t.loaded/t.total*.99,t):this._whileLoading("size unknown")},t.SoundFile.prototype.isLoaded=function(){return!!this.buffer},t.SoundFile.prototype.play=function(t,e,r,n,o){if(this.output){var s,a,h=t||0;if(h<0&&(h=0),h+=i.audiocontext.currentTime,void 0!==e&&this.rate(e),void 0!==r&&this.setVolume(r),!this.buffer)throw"not ready to play file, buffer has yet to load. Try preload()";if(this._pauseTime=0,"restart"===this.mode&&this.buffer&&this.bufferSourceNode&&(this.bufferSourceNode.stop(h),this._counterNode.stop(h)),"untildone"!==this.mode||!this.isPlaying()){if(this.bufferSourceNode=this._initSourceNode(),delete this._counterNode,this._counterNode=this._initCounterNode(),n){if(!(n>=0&&n<this.buffer.duration))throw"start time out of range";s=n}else s=0;o&&(o=o<=this.buffer.duration-s?o:this.buffer.duration),this._paused?(this.bufferSourceNode.start(h,this.pauseTime,o),this._counterNode.start(h,this.pauseTime,o)):(this.bufferSourceNode.start(h,s,o),this._counterNode.start(h,s,o)),this._playing=!0,this._paused=!1,this.bufferSourceNodes.push(this.bufferSourceNode),this.bufferSourceNode._arrayIndex=this.bufferSourceNodes.length-1,this.bufferSourceNode.addEventListener("ended",this._clearOnEnd),this.bufferSourceNode.loop=this._looping,this._counterNode.loop=this._looping,!0===this._looping&&(a=o||s-1e-15,this.bufferSourceNode.loopStart=s,this.bufferSourceNode.loopEnd=a,this._counterNode.loopStart=s,this._counterNode.loopEnd=a)}}else console.warn("SoundFile.play() called after dispose")},t.SoundFile.prototype.playMode=function(t){var e=t.toLowerCase();if("restart"===e&&this.buffer&&this.bufferSourceNode)for(var r=0;r<this.bufferSourceNodes.length-1;r++)this.bufferSourceNodes[r].stop(i.audiocontext.currentTime);if("restart"!==e&&"sustain"!==e&&"untildone"!==e)throw'Invalid play mode. Must be either "restart" or "sustain"';this.mode=e},t.SoundFile.prototype.pause=function(t){var e=(t||0)+i.audiocontext.currentTime;this.isPlaying()&&this.buffer&&this.bufferSourceNode?(this.pauseTime=this.currentTime(),this.bufferSourceNode.stop(e),this._counterNode.stop(e),this._paused=!0,this._playing=!1,this._pauseTime=this.currentTime()):this._pauseTime=0}
1,t.SoundFile.prototype.loop=function(t,e,i,r,n){this._looping=!0,this.play(t,e,i,r,n)},t.SoundFile.prototype.setLoop=function(t){if(!0===t)this._looping=!0;else{if(!1!==t)throw"Error: setLoop accepts either true or false";this._looping=!1}this.bufferSourceNode&&(this.bufferSourceNode.loop=this._looping,this._counterNode.loop=this._looping)},t.SoundFile.prototype.isLooping=function(){return!!this.bufferSourceNode&&!0===this._looping&&!0===this.isPlaying()},t.SoundFile.prototype.isPlaying=function(){return this._playing},t.SoundFile.prototype.isPaused=function(){return this._paused},t.SoundFile.prototype.stop=function(t){var e=t||0;if("sustain"===this.mode||"untildone"===this.mode)this.stopAll(e),this._playing=!1,this.pauseTime=0,this._paused=!1;else if(this.buffer&&this.bufferSourceNode){var r=i.audiocontext.currentTime,n=e||0;this.pauseTime=0,this.bufferSourceNode.stop(r+n),this._counterNode.stop(r+n),this._playing=!1,this._paused=!1}},t.SoundFile.prototype.stopAll=function(t){var e=i.audiocontext.currentTime,r=t||0;if(this.buffer&&this.bufferSourceNode){for(var n in this.bufferSourceNodes){const t=this.bufferSourceNodes[n];if(t)try{t.stop(e+r)}catch(o){}}this._counterNode.stop(e+r),this._onended(this)}},t.SoundFile.prototype.setVolume=function(t,e,r){if("number"==typeof t){var n=e||0,o=r||0,s=i.audiocontext.currentTime,a=this.output.gain.value;this.output.gain.cancelScheduledValues(s+o),this.output.gain.linearRampToValueAtTime(a,s+o),this.output.gain.linearRampToValueAtTime(t,s+o+n)}else{if(!t)return this.output.gain;t.connect(this.output.gain)}},t.SoundFile.prototype.amp=t.SoundFile.prototype.setVolume,t.SoundFile.prototype.fade=t.SoundFile.prototype.setVolume,t.SoundFile.prototype.getVolume=function(){return this.output.gain.value},t.SoundFile.prototype.pan=function(t,e){this.panPosition=t,this.panner.pan(t,e)},t.SoundFile.prototype.getPan=function(){return this.panPosition},t.SoundFile.prototype.rate=function(t){var e=!1;if(void 0===t)return this.playbackRate;if(this.playbackRate=t,0===t?t=1e-13:t<0&&!this.reversed?(t=Math.abs(t),e=!0):t>0&&this.reversed&&(e=!0),this.bufferSourceNode){var r=i.audiocontext.currentTime;this.bufferSourceNode.playbackRate.cancelScheduledValues(r),this.bufferSourceNode.playbackRate.linearRampToValueAtTime(Math.abs(t),r),this._counterNode.playbackRate.cancelScheduledValues(r),this._counterNode.playbackRate.linearRampToValueAtTime(Math.abs(t),r)}return e&&this.reverseBuffer(),this.playbackRate},t.SoundFile.prototype.setPitch=function(t){var e=a(t)/a(60);this.rate(e)},t.SoundFile.prototype.getPlaybackRate=function(){return this.playbackRate},t.SoundFile.prototype.duration=function(){return this.buffer?this.buffer.duration:0},t.SoundFile.prototype.currentTime=function(){return this.reversed?Math.abs(this._lastPos-this.buffer.length)/r.sampleRate:this._lastPos/r.sampleRate},t.SoundFile.prototype.jump=function(t,e){if(t<0||t>this.buffer.duration)throw"jump time out of range";if(e>this.buffer.duration-t)throw"end time out of range";var i=t||0,r=e||void 0;this.isPlaying()&&this.stop(0),this.play(0,this.playbackRate,this.output.gain.value,i,r)},t.SoundFile.prototype.channels=function(){return this.buffer.numberOfChannels},t.SoundFile.prototype.sampleRate=function(){return this.buffer.sampleRate},t.SoundFile.prototype.frames=function(){return this.buffer.length},t.SoundFile.prototype.getPeaks=function(t){if(!this.buffer)throw"Cannot load peaks yet, buffer is not loaded";if(t||(t=5*window.width),this.buffer){for(var e=this.buffer,i=e.length/t,r=~~(i/10)||1,n=e.numberOfChannels,o=new Float32Array(Math.round(t)),s=0;s<n;s++)for(var a=e.getChannelData(s),h=0;h<t;h++){for(var l=~~(h*i),u=~~(l+i),c=0,p=l;p<u;p+=r){var f=a[p];f>c?c=f:-f>c&&(c=f)}(0===s||Math.abs(c)>o[h])&&(o[h]=c)}return o}},t.SoundFile.prototype.reverseBuffer=function(){if(!this.buffer)throw"SoundFile is not done loading";{var t=this._lastPos/r.sampleRate,e=this.getVolume();this.setVolume(0,.001);const n=this.buffer.numberOfChannels;for(var i=0;i<n;i++)this.buffer.getChannelData(i).reverse();this.reversed=!this.reversed,t&&this.jump(this.duration()-t),this.setVolume(e,.001)}},t.SoundFile.prototype.onended=function(t){return this._onended=t,this},t.SoundFile.prototype.add=function(){},t.SoundFile.prototype.dispose=function(){var t=i.audiocontext.currentTime,e=i.soundArray.indexOf(this);if(i.soundArray.splice(e,1),this.stop(t),this.buffer&&this.bufferSourceNode){for(var r=0;r<this.bufferSourceNodes.length-1;r++)if(null!==this.bufferSourceNodes[r]){this.bufferSourceNodes[r].disconnect();try{this.bufferSourceNodes[r].stop(t)}catch(n){console.warning("no buffer source node to dispose")}this.bufferSourceNodes[r]=null}if(this.isPlaying()){try{this._counterNode.stop(t)}catch(n){console.log(n)}this._counterNode=null}}this.output&&(this.output.disconnect(),this.output=null),this.panner&&(this.panner.disconnect(),this.panner=null)},t.SoundFile.prototype.connect=function(t){t?t.hasOwnProperty("input")?this.panner.connect(t.input):this.panner.connect(t):this.panner.connect(i.input)},t.SoundFile.prototype.disconnect=function(){this.panner&&this.panner.disconnect()},t.SoundFile.prototype.getLevel=function(){console.warn("p5.SoundFile.getLevel has been removed from the library. Use p5.Amplitude instead")},t.SoundFile.prototype.setPath=function(e,i){var r=t.prototype._checkFileFormats(e);this.url=r,this.load(i)},t.SoundFile.prototype.setBuffer=function(t){var e=t.length,i=r.createBuffer(e,t[0].length,r.sampleRate);t[0]instanceof Float32Array||(t[0]=new Float32Array(t[0]));for(var n=0;n<e;n++)i.getChannelData(n).set(t[n]);this.buffer=i,this.panner.inputChannels(e)},t.SoundFile.prototype._initCounterNode=function(){var e=r.currentTime,i=r.createBufferSource();return this._scopeNode&&(this._scopeNode.disconnect(),this._scopeNode.removeEventListener("audioprocess",this._onAudioProcess),delete this._scopeNode),this._scopeNode=r.createScriptProcessor(256,1,1),i.buffer=function(t){const e=t.length,i=r.createBuffer(1,t.length,r.sampleRate),n=i.getChannelData(0);for(var o=0;o<e;o++)n[o]=o;return i}(this.buffer),i.playbackRate.setValueAtTime(this.playbackRate,e),i.connect(this._scopeNode),this._scopeNode.connect(t.soundOut._silentNode),this._scopeNode.addEventListener("audioprocess",this._onAudioProcess),i},t.SoundFile.prototype._initSourceNode=function(){var t=r.createBufferSource();return t.buffer=this.buffer,t.playbackRate.value=this.playbackRate,t.connect(this.output),t}
1,t.SoundFile.prototype.processPeaks=function(t,e,i,r){var n=this.buffer,o=[],s=e||.9,a=i||.22,h=r||200,l=new window.OfflineAudioContext(1,this.buffer.length,this.buffer.sampleRate),p=l.createBufferSource();p.buffer=n;var f=l.createBiquadFilter();f.type="lowpass",p.connect(f),f.connect(l.destination),p.start(0),l.startRendering(),l.oncomplete=function(e){if(self.panner){var i=e.renderedBuffer,r=i.getChannelData(0);do{o=u(r,s),s-=.005}while(Object.keys(o).length<h&&s>=a);var n=function(t,i){var r=[];return t.forEach(function(t){try{var n=Math.abs(60/(t.interval/i));if(n=c(n),!r.some(function(e){if(e.tempo===n)return e.count+=t.count})){if(isNaN(n))return;r.push({tempo:Math.round(n),count:t.count})}}catch(e){throw e}}),r}(function(t){for(var e=[],i=Object.keys(t).sort(),r=0;r<i.length;r++)for(var n=0;n<10;n++){var o=t[i[r]],s=t[i[r+n]];if(o&&s){var a=s.sampleIndex-o.sampleIndex;a>0&&o.intervals.push(a),e.some(function(t){if(t.interval===a)return t.count++,t})||e.push({interval:a,count:1})}}return e}(o),i.sampleRate).sort(function(t,e){return e.count-t.count}).splice(0,5);this.tempo=n[0].tempo;var l=function(t,e,i,r){for(var n=[],o=Object.keys(t).sort(),s=0;s<o.length;s++)for(var a=t[o[s]],h=0;h<a.intervals.length;h++){var l=Math.round(Math.abs(60/(a.intervals[h]/i)));l=c(l),Math.abs(l-e)<5&&n.push(a.sampleIndex/i)}return n.filter(function(t,e,i){if(i[e+1]-t>.01)return!0})}(o,n[0].tempo,i.sampleRate);t(l)}}};var l=function(t,e){this.sampleIndex=e,this.amplitude=t,this.tempos=[],this.intervals=[]};function u(t,e){for(var i={},r=t.length,n=0;n<r;n++){if(t[n]>e){var o=new l(t[n],n);i[n]=o,n+=6e3}n++}return i}function c(t){if(isFinite(t)&&0!==t){for(;t<90;)t*=2;for(;t>180&&t>90;)t/=2;return t}}var p=function(t,e,i,r){this.callback=t,this.time=e,this.id=i,this.val=r};t.SoundFile.prototype.addCue=function(t,e,i){var r=this._cueIDCounter++,n=new p(e,t,r,i);return this._cues.push(n),r},t.SoundFile.prototype.removeCue=function(t){for(var e=this._cues.length,i=0;i<e;i++)if(this._cues[i].id===t){this._cues.splice(i,1);break}},t.SoundFile.prototype.clearCues=function(){this._cues=[]}
1,t.SoundFile.prototype._onTimeUpdate=function(t){for(var e=t/this.buffer.sampleRate,i=this._cues.length,r=0;r<i;r++){var n=this._cues[r],o=n.time;this._prevTime<o&&o<=e&&n.callback(n.val)}this._prevTime=e},t.SoundFile.prototype.save=function(e){const i=h(this.buffer);t.prototype.saveSound([i],e,"wav")},t.SoundFile.prototype.getBlob=function(){const t=h(this.buffer);return new Blob([t],{type:"audio/wav"})}}(),h=n,t.Amplitude=function(t){this.bufferSize=2048,this.audiocontext=h.audiocontext,this.processor=this.audiocontext.createScriptProcessor(this.bufferSize,2,1),this.input=this.processor,this.output=this.audiocontext.createGain(),this.smoothing=t||0,this.volume=0,this.average=0,this.stereoVol=[0,0],this.stereoAvg=[0,0],this.stereoVolNorm=[0,0],this.volMax=.001,this.normalize=!1,this.processor.onaudioprocess=this._audioProcess.bind(this),this.processor.connect(this.output),this.output.gain.value=0,this.output.connect(this.audiocontext.destination),h.meter.connect(this.processor),h.soundArray.push(this)},t.Amplitude.prototype.setInput=function(e,i){h.meter.disconnect(),i&&(this.smoothing=i),null==e?(console.log("Amplitude input source is not ready! Connecting to master output instead"),h.meter.connect(this.processor)):e instanceof t.Signal?e.output.connect(this.processor):e?(e.connect(this.processor),this.processor.disconnect(),this.processor.connect(this.output)):h.meter.connect(this.processor)},t.Amplitude.prototype.connect=function(t){t?t.hasOwnProperty("input")?this.output.connect(t.input):this.output.connect(t):this.output.connect(this.panner.connect(h.input))},t.Amplitude.prototype.disconnect=function(){this.output&&this.output.disconnect()},t.Amplitude.prototype._audioProcess=function(t){for(var e=0;e<t.inputBuffer.numberOfChannels;e++){for(var i,r=t.inputBuffer.getChannelData(e),n=r.length,o=0,s=0,a=0;a<n;a++)i=r[a],this.normalize?(o+=Math.max(Math.min(i/this.volMax,1),-1),s+=Math.max(Math.min(i/this.volMax,1),-1)*Math.max(Math.min(i/this.volMax,1),-1)):(o+=i,s+=i*i);var h=o/n,l=Math.sqrt(s/n);this.stereoVol[e]=Math.max(l,this.stereoVol[e]*this.smoothing),this.stereoAvg[e]=Math.max(h,this.stereoVol[e]*this.smoothing),this.volMax=Math.max(this.stereoVol[e],this.volMax)}var u=this,c=this.stereoVol.reduce(function(t,e,i){return u.stereoVolNorm[i-1]=Math.max(Math.min(u.stereoVol[i-1]/u.volMax,1),0),u.stereoVolNorm[i]=Math.max(Math.min(u.stereoVol[i]/u.volMax,1),0),t+e});this.volume=c/this.stereoVol.length,this.volNorm=Math.max(Math.min(this.volume/this.volMax,1),0)},t.Amplitude.prototype.getLevel=function(t){return void 0!==t?this.normalize?this.stereoVolNorm[t]:this.stereoVol[t]:this.normalize?this.volNorm:this.volume},t.Amplitude.prototype.toggleNormalize=function(t){this.normalize="boolean"==typeof t?t:!this.normalize},t.Amplitude.prototype.smooth=function(t){t>=0&&t<1?this.smoothing=t:console.log("Error: smoothing must be between 0 and 1")},t.Amplitude.prototype.dispose=function(){var t=h.soundArray.indexOf(this);h.soundArray.splice(t,1),this.input&&(this.input.disconnect(),delete this.input),this.output&&(this.output.disconnect(),delete this.output),delete this.processor},function(){var e=n;t.FFT=function(t,i){this.input=this.analyser=e.audiocontext.createAnalyser(),Object.defineProperties(this,{bins:{get:function(){return this.analyser.fftSize/2},set:function(t){this.analyser.fftSize=2*t},configurable:!0,enumerable:!0},smoothing:{get:function(){return this.analyser.smoothingTimeConstant},set:function(t){this.analyser.smoothingTimeConstant=t},configurable:!0,enumerable:!0}}),this.smooth(t),this.bins=i||1024,e.fftMeter.connect(this.analyser),this.freqDomain=new Uint8Array(this.analyser.frequencyBinCount),this.timeDomain=new Uint8Array(this.analyser.frequencyBinCount),this.bass=[20,140],this.lowMid=[140,400],this.mid=[400,2600],this.highMid=[2600,5200],this.treble=[5200,14e3],e.soundArray.push(this)},t.FFT.prototype.setInput=function(t){t?(t.output?t.output.connect(this.analyser):t.connect&&t.connect(this.analyser),e.fftMeter.disconnect()):e.fftMeter.connect(this.analyser)},t.FFT.prototype.waveform=function(){for(var e,i=0;i<arguments.length;i++)"number"==typeof arguments[i]&&(this.analyser.fftSize=2*arguments[i]),"string"==typeof arguments[i]&&(e=arguments[i]);if(e&&!t.prototype._isSafari())return o(this,this.timeDomain),this.analyser.getFloatTimeDomainData(this.timeDomain),this.timeDomain;s(this,this.timeDomain),this.analyser.getByteTimeDomainData(this.timeDomain);for(var r=new Array,n=0;n<this.timeDomain.length;n++){var a=t.prototype.map(this.timeDomain[n],0,255,-1,1);r.push(a)}return r}
1,t.FFT.prototype.analyze=function(){for(var t,e=0;e<arguments.length;e++)"number"==typeof arguments[e]&&(this.bins=arguments[e],this.analyser.fftSize=2*this.bins),"string"==typeof arguments[e]&&(t=arguments[e]);if(t&&"db"===t.toLowerCase())return i(this),this.analyser.getFloatFrequencyData(this.freqDomain),this.freqDomain;r(this,this.freqDomain),this.analyser.getByteFrequencyData(this.freqDomain);var n=Array.apply([],this.freqDomain);return Array,n},t.FFT.prototype.getEnergy=function(t,i){var r=e.audiocontext.sampleRate/2;if("bass"===t?(t=this.bass[0],i=this.bass[1]):"lowMid"===t?(t=this.lowMid[0],i=this.lowMid[1]):"mid"===t?(t=this.mid[0],i=this.mid[1]):"highMid"===t?(t=this.highMid[0],i=this.highMid[1]):"treble"===t&&(t=this.treble[0],i=this.treble[1]),"number"!=typeof t)throw"invalid input for getEnergy()";if(i){if(t&&i){if(t>i){var n=i;i=t,t=n}for(var o=Math.round(t/r*this.freqDomain.length),s=Math.round(i/r*this.freqDomain.length),a=0,h=0,l=o;l<=s;l++)a+=this.freqDomain[l],h+=1;return a/h}throw"invalid input for getEnergy()"}var u=Math.round(t/r*this.freqDomain.length);return this.freqDomain[u]},t.FFT.prototype.getFreq=function(t,e){return console.log("getFreq() is deprecated. Please use getEnergy() instead."),this.getEnergy(t,e)},t.FFT.prototype.getCentroid=function(){for(var t=e.audiocontext.sampleRate/2,i=0,r=0,n=0;n<this.freqDomain.length;n++)i+=n*this.freqDomain[n],r+=this.freqDomain[n];var o=0;return 0!==r&&(o=i/r),o*(t/this.freqDomain.length)},t.FFT.prototype.smooth=function(t){return void 0!==t&&(this.smoothing=t),this.smoothing},t.FFT.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.analyser&&(this.analyser.disconnect(),delete this.analyser)},t.FFT.prototype.linAverages=function(t){t=t||16;for(var e=this.freqDomain,i=e.length,r=Math.floor(i/t),n=new Array(t),o=0,s=0;s<i;s++)n[o]=void 0!==n[o]?(n[o]+e[s])/2:e[s],s%r==r-1&&o++;return n},t.FFT.prototype.logAverages=function(t){for(var i=e.audiocontext.sampleRate/2,r=this.freqDomain,n=r.length,o=new Array(t.length),s=0,a=0;a<n;a++)Math.round(a*i/this.freqDomain.length)>t[s].hi&&s++,o[s]=void 0!==o[s]?(o[s]+r[a])/2:r[a];return o},t.FFT.prototype.getOctaveBands=function(t,i){t=t||3;var r=[],n={lo:(i=i||15.625)/Math.pow(2,1/(2*t)),ctr:i,hi:i*Math.pow(2,1/(2*t))};r.push(n);for(var o=e.audiocontext.sampleRate/2;n.hi<o;){var s={};s.lo=n.hi,s.ctr=n.ctr*Math.pow(2,1/t),s.hi=s.ctr*Math.pow(2,1/(2*t)),r.push(s),n=s}return r};var i=function(t){t.freqDomain instanceof Float32Array==0&&(t.freqDomain=new Float32Array(t.analyser.frequencyBinCount))},r=function(t){t.freqDomain instanceof Uint8Array==0&&(t.freqDomain=new Uint8Array(t.analyser.frequencyBinCount))},o=function(t){t.timeDomain instanceof Float32Array==0&&(t.timeDomain=new Float32Array(t.analyser.frequencyBinCount))},s=function(t){t.timeDomain instanceof Uint8Array==0&&(t.timeDomain=new Uint8Array(t.analyser.frequencyBinCount))}}(),function(t){"use strict";t.SignalBase=function(){},t.extend(t.SignalBase),t.SignalBase.prototype.connect=function(e,i,r){return t.Signal&&t.Signal===e.constructor||t.Param&&t.Param===e.constructor||t.TimelineSignal&&t.TimelineSignal===e.constructor?(e._param.cancelScheduledValues(0),e._param.value=0,e.overridden=!0):e instanceof AudioParam&&(e.cancelScheduledValues(0),e.value=0),t.prototype.connect.call(this,e,i,r),this}}(i),function(t){"use strict";t.WaveShaper=function(t,e){this._shaper=this.input=this.output=this.context.createWaveShaper(),this._curve=null,Array.isArray(t)?this.curve=t:isFinite(t)||this.isUndef(t)?this._curve=new Float32Array(this.defaultArg(t,1024)):this.isFunction(t)&&(this._curve=new Float32Array(this.defaultArg(e,1024)),this.setMap(t))},t.extend(t.WaveShaper,t.SignalBase),t.WaveShaper.prototype.setMap=function(t){for(var e=0,i=this._curve.length;e<i;e++)this._curve[e]=t(e/(i-1)*2-1,e);return this._shaper.curve=this._curve,this},Object.defineProperty(t.WaveShaper.prototype,"curve",{get:function(){return this._shaper.curve},set:function(t){this._curve=new Float32Array(t),this._shaper.curve=this._curve}}),Object.defineProperty(t.WaveShaper.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){if(-1===["none","2x","4x"].indexOf(t))throw new RangeError("Tone.WaveShaper: oversampling must be either 'none', '2x', or '4x'");this._shaper.oversample=t}}),t.WaveShaper.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.disconnect(),this._shaper=null,this._curve=null,this}}(i),(l=i).TimeBase=function(t,e){if(!(this instanceof l.TimeBase))return new l.TimeBase(t,e);this._expr=this._noOp,t instanceof l.TimeBase?this.copy(t):!this.isUndef(e)||this.isNumber(t)?(e=this.defaultArg(e,this._defaultUnits),this._expr=this._primaryExpressions[e].method.bind(this,t)):this.isString(t)?this.set(t):this.isUndef(t)&&(this._expr=this._defaultExpr())},l.extend(l.TimeBase),l.TimeBase.prototype.set=function(t){return this._expr=this._parseExprString(t),this},l.TimeBase.prototype.clone=function(){var t=new this.constructor;return t.copy(this),t},l.TimeBase.prototype.copy=function(t){var e=t._expr();return this.set(e)},l.TimeBase.prototype._primaryExpressions={n:{regexp:/^(\d+)n/i,method:function(t){return t=parseInt(t),this._beatsToUnits(1===t?this._timeSignature():4/t)}},t:{regexp:/^(\d+)t/i,method:function(t){return t=parseInt(t),this._beatsToUnits(8/(3*parseInt(t)))}},m:{regexp:/^(\d+)m/i,method:function(t){return this._beatsToUnits(parseInt(t)*this._timeSignature())}},i:{regexp:/^(\d+)i/i,method:function(t){return this._ticksToUnits(parseInt(t))}},hz:{regexp:/^(\d+(?:\.\d+)?)hz/i,method:function(t){return this._frequencyToUnits(parseFloat(t))}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,
1i){var r=0;return t&&"0"!==t&&(r+=this._beatsToUnits(this._timeSignature()*parseFloat(t))),e&&"0"!==e&&(r+=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(r+=this._beatsToUnits(parseFloat(i)/4)),r}},s:{regexp:/^(\d+(?:\.\d+)?s)/,method:function(t){return this._secondsToUnits(parseFloat(t))}},samples:{regexp:/^(\d+)samples/,method:function(t){return parseInt(t)/this.context.sampleRate}},default:{regexp:/^(\d+(?:\.\d+)?)/,method:function(t){return this._primaryExpressions[this._defaultUnits].method.call(this,t)}}},l.TimeBase.prototype._binaryExpressions={"+":{regexp:/^\+/,precedence:2,method:function(t,e){return t()+e()}},"-":{regexp:/^\-/,precedence:2,method:function(t,e){return t()-e()}},"*":{regexp:/^\*/,precedence:1,method:function(t,e){return t()*e()}},"/":{regexp:/^\//,precedence:1,method:function(t,e){return t()/e()}}},l.TimeBase.prototype._unaryExpressions={neg:{regexp:/^\-/,method:function(t){return-t()}}},l.TimeBase.prototype._syntaxGlue={"(":{regexp:/^\(/},")":{regexp:/^\)/}},l.TimeBase.prototype._tokenize=function(t){for(var e=-1,i=[];t.length>0;){var r=n(t=t.trim(),this);i.push(r),t=t.substr(r.value.length)}function n(t,e){for(var i=["_binaryExpressions","_unaryExpressions","_primaryExpressions","_syntaxGlue"],r=0;r<i.length;r++){var n=e[i[r]];for(var o in n){var s=n[o],a=t.match(s.regexp);if(null!==a)return{method:s.method,precedence:s.precedence,regexp:s.regexp,value:a[0]}}}throw new SyntaxError("Tone.TimeBase: Unexpected token "+t)}return{next:function(){return i[++e]},peek:function(){return i[e+1]}}},l.TimeBase.prototype._matchGroup=function(t,e,i){if(!this.isUndef(t))for(var r in e){var n=e[r];if(n.regexp.test(t.value)){if(this.isUndef(i))return n;if(n.precedence===i)return n}}return!1},l.TimeBase.prototype._parseBinary=function(t,e){var i;this.isUndef(e)&&(e=2),i=e<0?this._parseUnary(t):this._parseBinary(t,e-1);for(var r=t.peek();r&&this._matchGroup(r,this._binaryExpressions,e);)i=(r=t.next()).method.bind(this,i,this._parseBinary(t,e-1)),r=t.peek();return i},l.TimeBase.prototype._parseUnary=function(t){var e,i;e=t.peek();var r=this._matchGroup(e,this._unaryExpressions);return r?(e=t.next(),i=this._parseUnary(t),r.method.bind(this,i)):this._parsePrimary(t)},l.TimeBase.prototype._parsePrimary=function(t){var e,i;if(e=t.peek(),this.isUndef(e))throw new SyntaxError("Tone.TimeBase: Unexpected end of expression");if(this._matchGroup(e,this._primaryExpressions)){var r=(e=t.next()).value.match(e.regexp);return e.method.bind(this,r[1],r[2],r[3])}if(e&&"("===e.value){if(t.next(),i=this._parseBinary(t),!(e=t.next())||")"!==e.value)throw new SyntaxError("Expected )");return i}throw new SyntaxError("Tone.TimeBase: Cannot process token "+e.value)},l.TimeBase.prototype._parseExprString=function(t){this.isString(t)||(t=t.toString());var e=this._tokenize(t);return this._parseBinary(e)},l.TimeBase.prototype._noOp=function(){return 0},l.TimeBase.prototype._defaultExpr=function(){return this._noOp},l.TimeBase.prototype._defaultUnits="s",l.TimeBase.prototype._frequencyToUnits=function(t){return 1/t},l.TimeBase.prototype._beatsToUnits=function(t){return 60/l.Transport.bpm.value*t},l.TimeBase.prototype._secondsToUnits=function(t){return t},l.TimeBase.prototype._ticksToUnits=function(t){return t*(this._beatsToUnits(1)/l.Transport.PPQ)},l.TimeBase.prototype._timeSignature=function(){return l.Transport.timeSignature},l.TimeBase.prototype._pushExpr=function(t,e,i){return t instanceof l.TimeBase||(t=new this.constructor(t,i)),this._expr=this._binaryExpressions[e].method.bind(this,this._expr,t._expr),this},l.TimeBase.prototype.add=function(t,e){return this._pushExpr(t,"+",e)},l.TimeBase.prototype.sub=function(t,e){return this._pushExpr(t,"-",e)},l.TimeBase.prototype.mult=function(t,e){return this._pushExpr(t,"*",e)},l.TimeBase.prototype.div=function(t,e){return this._pushExpr(t,"/",e)},l.TimeBase.prototype.valueOf=function(){return this._expr()},l.TimeBase.prototype.dispose=function(){this._expr=null},function(t){t.Time=function(e,i){if(!(this instanceof t.Time))return new t.Time(e,i);this._plusNow=!1,t.TimeBase.call(this,e,i)},t.extend(t.Time,t.TimeBase),t.Time.prototype._unaryExpressions=Object.create(t.TimeBase.prototype._unaryExpressions),t.Time.prototype._unaryExpressions.quantize={regexp:/^@/,method:function(e){return t.Transport.nextSubdivision(e())}},t.Time.prototype._unaryExpressions.now={regexp:/^\+/,method:function(t){return this._plusNow=!0,t()}},t.Time.prototype.quantize=function(t,e){return e=this.defaultArg(e,1),this._expr=(function(t,e,
1i){return t=t(),e=e.toSeconds(),t+(Math.round(t/e)*e-t)*i}).bind(this,this._expr,new this.constructor(t),e),this},t.Time.prototype.addNow=function(){return this._plusNow=!0,this},t.Time.prototype._defaultExpr=function(){return this._plusNow=!0,this._noOp},t.Time.prototype.copy=function(e){return t.TimeBase.prototype.copy.call(this,e),this._plusNow=e._plusNow,this},t.Time.prototype.toNotation=function(){var t=this.toSeconds(),e=this._toNotationHelper(t,["1m","2n","4n","8n","16n","32n","64n","128n"]),i=this._toNotationHelper(t,["1m","2n","2t","4n","4t","8n","8t","16n","16t","32n","32t","64n","64t","128n"]);return i.split("+").length<e.split("+").length?i:e},t.Time.prototype._toNotationHelper=function(t,e){for(var i=this._notationToUnits(e[e.length-1]),r="",n=0;n<e.length;n++){var o=this._notationToUnits(e[n]),s=t/o;if(1-s%1<1e-6&&(s+=1e-6),(s=Math.floor(s))>0){if(r+=1===s?e[n]:s.toString()+"*"+e[n],(t-=s*o)<i)break;r+=" + "}}return""===r&&(r="0"),r},t.Time.prototype._notationToUnits=function(t){for(var e=this._primaryExpressions,i=[e.n,e.t,e.m],r=0;r<i.length;r++){var n=i[r],o=t.match(n.regexp);if(o)return n.method.call(this,o[1])}},t.Time.prototype.toBarsBeatsSixteenths=function(){var t=this._beatsToUnits(1),e=this.toSeconds()/t,i=Math.floor(e/this._timeSignature()),r=e%1*4;return e=Math.floor(e)%this._timeSignature(),(r=r.toString()).length>3&&(r=parseFloat(r).toFixed(3)),[i,e,r].join(":")},t.Time.prototype.toTicks=function(){var e=this._beatsToUnits(1),i=this.valueOf()/e;return Math.floor(i*t.Transport.PPQ)},t.Time.prototype.toSamples=function(){return this.toSeconds()*this.context.sampleRate},t.Time.prototype.toFrequency=function(){return 1/this.toSeconds()},t.Time.prototype.toSeconds=function(){return this.valueOf()},t.Time.prototype.toMilliseconds=function(){return 1e3*this.toSeconds()},t.Time.prototype.valueOf=function(){return this._expr()+(this._plusNow?this.now():0)}}(i),function(t){t.Frequency=function(e,i){if(!(this instanceof t.Frequency))return new t.Frequency(e,i);t.TimeBase.call(this,e,i)},t.extend(t.Frequency,t.TimeBase),t.Frequency.prototype._primaryExpressions=Object.create(t.TimeBase.prototype._primaryExpressions),t.Frequency.prototype._primaryExpressions.midi={regexp:/^(\d+(?:\.\d+)?midi)/,method:function(t){return this.midiToFrequency(t)}},t.Frequency.prototype._primaryExpressions.note={regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method:function(t,i){var r=e[t.toLowerCase()]+12*(parseInt(i)+1);return this.midiToFrequency(r)}},t.Frequency.prototype._primaryExpressions.tr={regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,i){var r=1;return t&&"0"!==t&&(r*=this._beatsToUnits(this._timeSignature()*parseFloat(t))),e&&"0"!==e&&(r*=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(r*=this._beatsToUnits(parseFloat(i)/4)),r}},t.Frequency.prototype.transpose=function(t){return this._expr=(function(t,e){return t()*this.intervalToFrequencyRatio(e)}).bind(this,this._expr,t),this},t.Frequency.prototype.harmonize=function(t){return this._expr=(function(t,e){for(var i=t(),r=[],n=0;n<e.length;n++)r[n]=i*this.intervalToFrequencyRatio(e[n]);return r}).bind(this,this._expr,t),this},t.Frequency.prototype.toMidi=function(){return this.frequencyToMidi(this.valueOf())},t.Frequency.prototype.toNote=function(){var e=this.valueOf(),r=Math.log(e/t.Frequency.A4)/Math.LN2,n=Math.round(12*r)+57,o=Math.floor(n/12);return o<0&&(n+=-12*o),i[n%12]+o.toString()},t.Frequency.prototype.toSeconds=function(){return 1/this.valueOf()},t.Frequency.prototype.toFrequency=function(){return this.valueOf()},t.Frequency.prototype.toTicks=function(){var e=this._beatsToUnits(1),i=this.valueOf()/e;return Math.floor(i*t.Transport.PPQ)},t.Frequency.prototype._frequencyToUnits=function(t){return t},t.Frequency.prototype._ticksToUnits=function(e){return 1/(60*e/(t.Transport.bpm.value*t.Transport.PPQ))},t.Frequency.prototype._beatsToUnits=function(e){return 1/t.TimeBase.prototype._beatsToUnits.call(this,e)},t.Frequency.prototype._secondsToUnits=function(t){return 1/t},t.Frequency.prototype._defaultUnits="hz";var e={cbb:-2,cb:-1,c:0,"c#":1,cx:2,dbb:0,db:1,d:2,"d#":3,dx:4,ebb:2,eb:3,e:4,"e#":5,ex:6,fbb:3,fb:4,f:5,"f#":6,fx:7,gbb:5,gb:6,g:7,"g#":8,gx:9,abb:7,ab:8,a:9,"a#":10,ax:11,bbb:9,bb:10,b:11,"b#":12,bx:13},i=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];t.Frequency.A4=440,t.Frequency.prototype.midiToFrequency=function(e){return t.Frequency.A4*Math.pow(2,(e-69)/12)},t.Frequency.prototype.frequencyToMidi=function(e){return 69+12*Math.log(e/t.Frequency.A4)/Math.LN2}}(i),function(t){t.TransportTime=function(e,i){if(!(this instanceof t.TransportTime))return new t.TransportTime(e,i);t.Time.call(this,e,i)},t.extend(t.TransportTime,t.Time),t.TransportTime.prototype._unaryExpressions=Object.create(t.Time.prototype._unaryExpressions),t.TransportTime.prototype._unaryExpressions.quantize={regexp:/^@/,method:function(e){var i=this._secondsToTicks(e()),r=Math.ceil(t.Transport.ticks/i);return this._ticksToUnits(r*i)}},t.TransportTime.prototype._secondsToTicks=function(e){var i=this._beatsToUnits(1);return Math.round(e/i*t.Transport.PPQ)},t.TransportTime.prototype.valueOf=function(){return this._secondsToTicks(this._expr())+(this._plusNow?t.Transport.ticks:0)},t.TransportTime.prototype.toTicks=function(){return this.valueOf()},t.TransportTime.prototype.toSeconds=function(){return this._expr()+(this._plusNow?t.Transport.seconds:0)},t.TransportTime.prototype.toFrequency=function(){return 1/this.toSeconds()}}(i),function(t){t.Type={Default:"number",Time:"time",Frequency:"frequency",TransportTime:"transportTime",Ticks:"ticks",NormalRange:"normalRange",AudioRange:"audioRange",Decibels:"db",Interval:"interval",BPM:"bpm",Positive:"positive",Cents:"cents",Degrees:"degrees",MIDI:"midi",BarsBeatsSixteenths:"barsBeatsSixteenths",Samples:"samples",Hertz:"hertz",Note:"note",Milliseconds:"milliseconds",Seconds:"seconds",Notation:"notation"},t.prototype.toSeconds=function(e){return this.isNumber(e)?e:this.isUndef(e)?this.now():this.isString(e)?new t.Time(e).toSeconds():e instanceof t.TimeBase?e.toSeconds():void 0},t.prototype.toFrequency=function(e){return this.isNumber(e)?e:this.isString(e)||this.isUndef(e)?new t.Frequency(e).valueOf():e instanceof t.TimeBase?e.toFrequency():void 0},t.prototype.toTicks=function(e){return this.isNumber(e)||this.isString(e)?new t.TransportTime(e).toTicks():this.isUndef(e)?t.Transport.ticks:e instanceof t.TimeBase?e.toTicks():void 0}}(i),function(t){"use strict";t.Param=function(){var e=this.optionsObject(arguments,["param","units","convert"],t.Param.defaults);this._param=this.input=e.param,this.units=e.units,this.convert=e.convert,this.overridden=!1,this._lfo=null,this.isObject(e.lfo)?this.value=e.lfo:this.isUndef(e.value)||(this.value=e.value)},t.extend(t.Param),t.Param.defaults={units:t.Type.Default,convert:!0,param:void 0},Object.defineProperty(t.Param.prototype,"value",{get:function(){return this._toUnits(this._param.value)},set:function(e){if(this.isObject(e)){if(this.isUndef(t.LFO))throw new Error("Include 'Tone.LFO' to use an LFO as a Param value.");this._lfo&&this._lfo.dispose(),this._lfo=new t.LFO(e).start(),this._lfo.connect(this.input)}else{var i=this._fromUnits(e);this._param.cancelScheduledValues(0),this._param.value=i}}}),t.Param.prototype._fromUnits=function(e){if(!this.convert&&!this.isUndef(this.convert))return e;switch(this.units){case t.Type.Time:return this.toSeconds(e);case t.Type.Frequency:return this.toFrequency(e);case t.Type.Decibels:return this.dbToGain(e);
1case t.Type.NormalRange:return Math.min(Math.max(e,0),1);case t.Type.AudioRange:return Math.min(Math.max(e,-1),1);case t.Type.Positive:return Math.max(e,0);default:return e}},t.Param.prototype._toUnits=function(e){if(!this.convert&&!this.isUndef(this.convert))return e;switch(this.units){case t.Type.Decibels:return this.gainToDb(e);default:return e}},t.Param.prototype._minOutput=1e-5,t.Param.prototype.setValueAtTime=function(t,e){return t=this._fromUnits(t),(e=this.toSeconds(e))<=this.now()+this.blockTime?this._param.value=t:this._param.setValueAtTime(t,e),this},t.Param.prototype.setRampPoint=function(t){t=this.defaultArg(t,this.now());var e=this._param.value;return 0===e&&(e=this._minOutput),this._param.setValueAtTime(e,t),this},t.Param.prototype.linearRampToValueAtTime=function(t,e){return t=this._fromUnits(t),this._param.linearRampToValueAtTime(t,this.toSeconds(e)),this},t.Param.prototype.exponentialRampToValueAtTime=function(t,e){return t=this._fromUnits(t),t=Math.max(this._minOutput,t),this._param.exponentialRampToValueAtTime(t,this.toSeconds(e)),this},t.Param.prototype.exponentialRampToValue=function(t,e,i){return i=this.toSeconds(i),this.setRampPoint(i),this.exponentialRampToValueAtTime(t,i+this.toSeconds(e)),this},t.Param.prototype.linearRampToValue=function(t,e,i){return i=this.toSeconds(i),this.setRampPoint(i),this.linearRampToValueAtTime(t,i+this.toSeconds(e)),this},t.Param.prototype.setTargetAtTime=function(t,e,i){return t=this._fromUnits(t),t=Math.max(this._minOutput,t),i=Math.max(this._minOutput,i),this._param.setTargetAtTime(t,this.toSeconds(e),i),this},t.Param.prototype.setValueCurveAtTime=function(t,e,i){for(var r=0;r<t.length;r++)t[r]=this._fromUnits(t[r]);return this._param.setValueCurveAtTime(t,this.toSeconds(e),this.toSeconds(i)),this},t.Param.prototype.cancelScheduledValues=function(t){return this._param.cancelScheduledValues(this.toSeconds(t)),this},t.Param.prototype.rampTo=function(e,i,r){return i=this.defaultArg(i,0),this.units===t.Type.Frequency||this.units===t.Type.BPM||this.units===t.Type.Decibels?this.exponentialRampToValue(e,i,r):this.linearRampToValue(e,i,r),this},Object.defineProperty(t.Param.prototype,"lfo",{get:function(){return this._lfo}}),t.Param.prototype.dispose=function(){return t.prototype.dispose.call(this),this._param=null,this._lfo&&(this._lfo.dispose(),this._lfo=null),this}}(i),function(t){"use strict";window.GainNode&&!AudioContext.prototype.createGain&&(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),t.Gain=function(){var e=this.optionsObject(arguments,["gain","units"],t.Gain.defaults);this.input=this.output=this._gainNode=this.context.createGain(),this.gain=new t.Param({param:this._gainNode.gain,units:e.units,value:e.gain,convert:e.convert}),this._readOnly("gain")},t.extend(t.Gain),t.Gain.defaults={gain:1,convert:!0},t.Gain.prototype.dispose=function(){t.Param.prototype.dispose.call(this),this._gainNode.disconnect(),this._gainNode=null,this._writable("gain"),this.gain.dispose(),this.gain=null},t.prototype.createInsOuts=function(e,i){1===e?this.input=new t.Gain:e>1&&(this.input=new Array(e)),1===i?this.output=new t.Gain:i>1&&(this.output=new Array(e))}}(i),u=function(t){"use strict";return t.Signal=function(){var e=this.optionsObject(arguments,["value","units"],t.Signal.defaults);this.output=this._gain=this.context.createGain(),e.param=this._gain.gain,t.Param.call(this,e),this.input=this._param=this._gain.gain,this.context.getConstant(1).chain(this._gain)},t.extend(t.Signal,t.Param),t.Signal.defaults={value:0,units:t.Type.Default,convert:!0},t.Signal.prototype.connect=t.SignalBase.prototype.connect,t.Signal.prototype.dispose=function(){return t.Param.prototype.dispose.call(this),this._param=null,this._gain.disconnect(),this._gain=null,this},t.Signal}(i),c=function(t){"use strict";return t.Add=function(e){this.createInsOuts(2,0),this._sum=this.input[0]=this.input[1]=this.output=new t.Gain,this._param=this.input[1]=new t.Signal(e),this._param.connect(this._sum)},t.extend(t.Add,t.Signal),t.Add.prototype.dispose=function(){return t.prototype.dispose.call(this),this._sum.dispose(),this._sum=null,this._param.dispose(),this._param=null,this},t.Add}(i),p=function(t){"use strict";return t.Multiply=function(e){this.createInsOuts(2,0),this._mult=this.input[0]=this.output=new t.Gain,this._param=this.input[1]=this.output.gain,this._param.value=this.defaultArg(e,0)},t.extend(t.Multiply,t.Signal),t.Multiply.prototype.dispose=function(){return t.prototype.dispose.call(this),this._mult.dispose(),this._mult=null,this._param=null,this},t.Multiply}(i),f=function(t){"use strict";return t.Scale=function(e,i){this._outputMin=this.defaultArg(e,0),this._outputMax=this.defaultArg(i,1),this._scale=this.input=new t.Multiply(1),this._add=this.output=new t.Add(0),this._scale.connect(this._add),this._setRange()},t.extend(t.Scale,t.SignalBase),Object.defineProperty(t.Scale.prototype,"min",{get:function(){return this._outputMin},set:function(t){this._outputMin=t,this._setRange()}}),Object.defineProperty(t.Scale.prototype,"max",{get:function(){return this._outputMax},set:function(t){this._outputMax=t,this._setRange()}}),t.Scale.prototype._setRange=function(){this._add.value=this._outputMin,this._scale.value=this._outputMax-this._outputMin},t.Scale.prototype.dispose=function(){return t.prototype.dispose.call(this),this._add.dispose(),this._add=null,this._scale.dispose(),this._scale=null,this},t.Scale}(i),d=u,m=c,y=p,g=f,t.Signal=function(t){return new d(t)},d.prototype.fade=d.prototype.linearRampToValueAtTime,y.prototype.fade=d.prototype.fade,m.prototype.fade=d.prototype.fade,g.prototype.fade=d.prototype.fade,d.prototype.setInput=function(t){t.connect(this)},y.prototype.setInput=d.prototype.setInput,m.prototype.setInput=d.prototype.setInput,g.prototype.setInput=d.prototype.setInput,d.prototype.add=function(t){var e=new m(t);return this.connect(e),e},y.prototype.add=d.prototype.add,m.prototype.add=d.prototype.add,g.prototype.add=d.prototype.add,d.prototype.mult=function(t){var e=new y(t);return this.connect(e),e},y.prototype.mult=d.prototype.mult,m.prototype.mult=d.prototype.mult,g.prototype.mult=d.prototype.mult,d.prototype.scale=function(e,i,r,n){var o,s;4===arguments.length?(o=t.prototype.map(r,e,i,0,1)-.5,s=t.prototype.map(n,e,i,0,1)-.5):(o=arguments[0],s=arguments[1]);var a=new g(o,s);return this.connect(a),a},y.prototype.scale=d.prototype.scale,m.prototype.scale=d.prototype.scale,g.prototype.scale=d.prototype.scale,function(){var e=n,i=c,r=p,o=f;t.Oscillator=function(i,r){if("string"==typeof i){var n=r;r=i,i=n}"number"==typeof r&&(n=r,r=i,i=n),this.started=!1,this.phaseAmount=void 0,this.oscillator=e.audiocontext.createOscillator(),this.f=i||440,this.oscillator.type=r||"sine",this.oscillator.frequency.setValueAtTime(this.f,e.audiocontext.currentTime),this.output=e.audiocontext.createGain(),this._freqMods=[],this.output.gain.value=.5,this.output.gain.setValueAtTime(.5,e.audiocontext.currentTime),this.oscillator.connect(this.output),this.panPosition=0,this.connection=e.input,this.panner=new t.Panner(this.output,this.connection,1),this.mathOps=[this.output],e.soundArray.push(this)},t.Oscillator.prototype.start=function(t,i){if(this.started&&this.stop(e.audiocontext.currentTime),!this.started){var r=i||this.f,n=this.oscillator.type;for(var o in this.oscillator&&(this.oscillator.disconnect(),delete this.oscillator),this.oscillator=e.audiocontext.createOscillator(),this.oscillator.frequency.value=Math.abs(r),this.oscillator.type=n,this.oscillator.connect(this.output),this.oscillator.start((t=t||0)+e.audiocontext.currentTime),this.freqNode=this.oscillator.frequency,this._freqMods)void 0!==this._freqMods[o].connect&&this._freqMods[o].connect(this.oscillator.frequency);this.started=!0}},t.Oscillator.prototype.stop=function(t){this.started&&(this.oscillator.stop((t||0)+e.audiocontext.currentTime),this.started=!1)},t.Oscillator.prototype.amp=function(t,i,r){if("number"==typeof t)this.output.gain.linearRampToValueAtTime(t,e.audiocontext.currentTime+(r=r||0)+(i=i||0));else{if(!t)return this.output.gain;t.connect(this.output.gain)}},t.Oscillator.prototype.fade=t.Oscillator.prototype.amp,t.Oscillator.prototype.getAmp=function(){return this.output.gain.value},t.Oscillator.prototype.freq=function(t,i,r){if("number"!=typeof t||isNaN(t)){if(!t)return this.oscillator.frequency;t.output&&(t=t.output),t.connect(this.oscillator.frequency),this._freqMods.push(t)}else{this.f=t;var n=e.audiocontext.currentTime;r=r||0,0===(i=i||0)?this.oscillator.frequency.setValueAtTime(t,r+n):t>0?this.oscillator.frequency.exponentialRampToValueAtTime(t,r+i+n):this.oscillator.frequency.linearRampToValueAtTime(t,r+i+n),this.phaseAmount&&this.phase(this.phaseAmount)}},t.Oscillator.prototype.getFreq=function(){return this.oscillator.frequency.value},t.Oscillator.prototype.setType=function(t){this.oscillator.type=t},t.Oscillator.prototype.getType=function(){return this.oscillator.type},t.Oscillator.prototype.connect=function(t){t?t.hasOwnProperty("input")?(this.panner.connect(t.input),this.connection=t.input):(this.panner.connect(t),this.connection=t):this.panner.connect(e.input)},t.Oscillator.prototype.disconnect=function(){this.output&&this.output.disconnect(),this.panner&&(this.panner.disconnect(),this.output&&this.output.connect(this.panner)),this.oscMods=[]},t.Oscillator.prototype.pan=function(t,e){this.panPosition=t,this.panner.pan(t,e)},t.Oscillator.prototype.getPan=function(){return this.panPosition},t.Oscillator.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.oscillator&&(this.stop(e.audiocontext.currentTime),this.disconnect(),this.panner=null,this.oscillator=null),this.osc2&&this.osc2.dispose()},t.Oscillator.prototype.phase=function(i){var r=t.prototype.map(i,0,1,0,1/this.f),n=e.audiocontext.currentTime;this.phaseAmount=i,this.dNode||(this.dNode=e.audiocontext.createDelay(),this.oscillator.disconnect(),this.oscillator.connect(this.dNode),this.dNode.connect(this.output)),this.dNode.delayTime.setValueAtTime(r,n)};
1var s=function(t,e,i,r,n){var o=t.oscillator;for(var s in t.mathOps)t.mathOps[s]instanceof n&&(o.disconnect(),t.mathOps[s].dispose(),(i=s)<t.mathOps.length-2&&(r=t.mathOps[s+1]));return i===t.mathOps.length-1&&t.mathOps.push(r),s>0&&(o=t.mathOps[s-1]),o.disconnect(),o.connect(e),e.connect(r),t.mathOps[i]=e,t};t.Oscillator.prototype.add=function(t){var e=new i(t);return s(this,e,this.mathOps.length-1,this.output,i)},t.Oscillator.prototype.mult=function(t){var e=new r(t);return s(this,e,this.mathOps.length-1,this.output,r)},t.Oscillator.prototype.scale=function(e,i,r,n){var a,h;4===arguments.length?(a=t.prototype.map(r,e,i,0,1)-.5,h=t.prototype.map(n,e,i,0,1)-.5):(a=arguments[0],h=arguments[1]);var l=new o(a,h);return s(this,l,this.mathOps.length-1,this.output,o)},t.SinOsc=function(e){t.Oscillator.call(this,e,"sine")},t.SinOsc.prototype=Object.create(t.Oscillator.prototype),t.TriOsc=function(e){t.Oscillator.call(this,e,"triangle")},t.TriOsc.prototype=Object.create(t.Oscillator.prototype),t.SawOsc=function(e){t.Oscillator.call(this,e,"sawtooth")},t.SawOsc.prototype=Object.create(t.Oscillator.prototype),t.SqrOsc=function(e){t.Oscillator.call(this,e,"square")},t.SqrOsc.prototype=Object.create(t.Oscillator.prototype)}(),function(t){"use strict";t.Timeline=function(){var e=this.optionsObject(arguments,["memory"],t.Timeline.defaults);this._timeline=[],this._toRemove=[],this._iterating=!1,this.memory=e.memory},t.extend(t.Timeline),t.Timeline.defaults={memory:1/0},Object.defineProperty(t.Timeline.prototype,"length",{get:function(){return this._timeline.length}}),t.Timeline.prototype.add=function(t){if(this.isUndef(t.time))throw new Error("Tone.Timeline: events must have a time attribute");if(this._timeline.length){var e=this._search(t.time);this._timeline.splice(e+1,0,t)}else this._timeline.push(t);return this.length>this.memory&&this._timeline.splice(0,this.length-this.memory),this},t.Timeline.prototype.remove=function(t){if(this._iterating)this._toRemove.push(t);else{var e=this._timeline.indexOf(t);-1!==e&&this._timeline.splice(e,1)}return this},t.Timeline.prototype.get=function(t){var e=this._search(t);return-1!==e?this._timeline[e]:null},t.Timeline.prototype.peek=function(){return this._timeline[0]},t.Timeline.prototype.shift=function(){return this._timeline.shift()},t.Timeline.prototype.getAfter=function(t){var e=this._search(t);return e+1<this._timeline.length?this._timeline[e+1]:null},t.Timeline.prototype.getBefore=function(t){var e=this._timeline.length;if(e>0&&this._timeline[e-1].time<t)return this._timeline[e-1];var i=this._search(t);return i-1>=0?this._timeline[i-1]:null},t.Timeline.prototype.cancel=function(t){if(this._timeline.length>1){var e=this._search(t);if(e>=0)if(this._timeline[e].time===t){for(var i=e;i>=0&&this._timeline[i].time===t;i--)e=i;this._timeline=this._timeline.slice(0,e)}else this._timeline=this._timeline.slice(0,e+1);else this._timeline=[]}else 1===this._timeline.length&&this._timeline[0].time>=t&&(this._timeline=[]);return this},t.Timeline.prototype.cancelBefore=function(t){if(this._timeline.length){var e=this._search(t);e>=0&&(this._timeline=this._timeline.slice(e+1))}return this},t.Timeline.prototype._search=function(t){var e=0,i=this._timeline.length,r=i;if(i>0&&this._timeline[i-1].time<=t)return i-1;for(;e<r;){var n=Math.floor(e+(r-e)/2),o=this._timeline[n],s=this._timeline[n+1];if(o.time===t){for(var a=n;a<this._timeline.length;a++)this._timeline[a].time===t&&(n=a);return n}if(o.time<t&&s.time>t)return n;o.time>t?r=n:o.time<t&&(e=n+1)}return-1},t.Timeline.prototype._iterate=function(t,e,i){this._iterating=!0,e=this.defaultArg(e,0),i=this.defaultArg(i,this._timeline.length-1);for(var r=e;r<=i;r++)t(this._timeline[r]);if(this._iterating=!1,this._toRemove.length>0){for(var n=0;n<this._toRemove.length;n++){var o=this._timeline.indexOf(this._toRemove[n]);-1!==o&&this._timeline.splice(o,1)}this._toRemove=[]}},t.Timeline.prototype.forEach=function(t){return this._iterate(t),this},t.Timeline.prototype.forEachBefore=function(t,e){var i=this._search(t);return-1!==i&&this._iterate(e,0,i),this},t.Timeline.prototype.forEachAfter=function(t,e){var i=this._search(t);return this._iterate(e,i+1),this},t.Timeline.prototype.forEachFrom=function(t,e){for(var i=this._search(t);i>=0&&this._timeline[i].time>=t;)i--;return this._iterate(e,i+1),this},t.Timeline.prototype.forEachAtTime=function(t,e){var i=this._search(t);return-1!==i&&this._iterate(function(i){i.time===t&&e(i)},0,i),this},t.Timeline.prototype.dispose=function(){t.prototype.dispose.call(this),this._timeline=null,this._toRemove=null}}(i),v=function(t){"use strict";return t.TimelineSignal=function(){var e=this.optionsObject(arguments,["value","units"],t.Signal.defaults);this._events=new t.Timeline(10),t.Signal.apply(this,e),e.param=this._param,t.Param.call(this,e),this._initial=this._fromUnits(this._param.value)},t.extend(t.TimelineSignal,t.Param),t.TimelineSignal.Type={Linear:"linear",Exponential:"exponential",Target:"target",Curve:"curve",Set:"set"},Object.defineProperty(t.TimelineSignal.prototype,"value",{get:function(){var t=this.now(),e=this.getValueAtTime(t);return this._toUnits(e)},set:function(t){var e=this._fromUnits(t);this._initial=e,this.cancelScheduledValues(),this._param.value=e}}),t.TimelineSignal.prototype.setValueAtTime=function(e,i){return e=this._fromUnits(e),i=this.toSeconds(i),this._events.add({type:t.TimelineSignal.Type.Set,value:e,time:i}),this._param.setValueAtTime(e,i),this},t.TimelineSignal.prototype.linearRampToValueAtTime=function(e,i){return e=this._fromUnits(e),i=this.toSeconds(i),this._events.add({type:t.TimelineSignal.Type.Linear,value:e,time:i}),this._param.linearRampToValueAtTime(e,i),this}
1,t.TimelineSignal.prototype.exponentialRampToValueAtTime=function(e,i){i=this.toSeconds(i);var r=this._searchBefore(i);r&&0===r.value&&this.setValueAtTime(this._minOutput,r.time),e=this._fromUnits(e);var n=Math.max(e,this._minOutput);return this._events.add({type:t.TimelineSignal.Type.Exponential,value:n,time:i}),e<this._minOutput?(this._param.exponentialRampToValueAtTime(this._minOutput,i-this.sampleTime),this.setValueAtTime(0,i)):this._param.exponentialRampToValueAtTime(e,i),this},t.TimelineSignal.prototype.setTargetAtTime=function(e,i,r){return e=this._fromUnits(e),e=Math.max(this._minOutput,e),r=Math.max(this._minOutput,r),i=this.toSeconds(i),this._events.add({type:t.TimelineSignal.Type.Target,value:e,time:i,constant:r}),this._param.setTargetAtTime(e,i,r),this},t.TimelineSignal.prototype.setValueCurveAtTime=function(e,i,r,n){n=this.defaultArg(n,1);for(var o=new Array(e.length),s=0;s<o.length;s++)o[s]=this._fromUnits(e[s])*n;i=this.toSeconds(i),r=this.toSeconds(r),this._events.add({type:t.TimelineSignal.Type.Curve,value:o,time:i,duration:r}),this._param.setValueAtTime(o[0],i);for(var a=1;a<o.length;a++)this._param.linearRampToValueAtTime(o[a],i+a/(o.length-1)*r);return this},t.TimelineSignal.prototype.cancelScheduledValues=function(t){return t=this.toSeconds(t),this._events.cancel(t),this._param.cancelScheduledValues(t),this},t.TimelineSignal.prototype.setRampPoint=function(e){e=this.toSeconds(e);var i=this._toUnits(this.getValueAtTime(e)),r=this._searchBefore(e);if(r&&r.time===e)this.cancelScheduledValues(e+this.sampleTime);else if(r&&r.type===t.TimelineSignal.Type.Curve&&r.time+r.duration>e)this.cancelScheduledValues(e),this.linearRampToValueAtTime(i,e);else{var n=this._searchAfter(e);n&&(this.cancelScheduledValues(e),n.type===t.TimelineSignal.Type.Linear?this.linearRampToValueAtTime(i,e):n.type===t.TimelineSignal.Type.Exponential&&this.exponentialRampToValueAtTime(i,e)),this.setValueAtTime(i,e)}return this},t.TimelineSignal.prototype.linearRampToValueBetween=function(t,e,i){return this.setRampPoint(e),this.linearRampToValueAtTime(t,i),this},t.TimelineSignal.prototype.exponentialRampToValueBetween=function(t,e,i){return this.setRampPoint(e),this.exponentialRampToValueAtTime(t,i),this},t.TimelineSignal.prototype._searchBefore=function(t){return this._events.get(t)},t.TimelineSignal.prototype._searchAfter=function(t){return this._events.getAfter(t)},t.TimelineSignal.prototype.getValueAtTime=function(e){e=this.toSeconds(e);var i=this._searchAfter(e),r=this._searchBefore(e),n=this._initial;if(null===r)n=this._initial;else if(r.type===t.TimelineSignal.Type.Target){var o=this._events.getBefore(r.time);n=this._exponentialApproach(r.time,null===o?this._initial:o.value,r.value,r.constant,e)}else n=r.type===t.TimelineSignal.Type.Curve?this._curveInterpolate(r.time,r.value,r.duration,e):null===i?r.value:i.type===t.TimelineSignal.Type.Linear?this._linearInterpolate(r.time,r.value,i.time,i.value,e):i.type===t.TimelineSignal.Type.Exponential?this._exponentialInterpolate(r.time,r.value,i.time,i.value,e):r.value;return n},t.TimelineSignal.prototype.connect=t.SignalBase.prototype.connect,t.TimelineSignal.prototype._exponentialApproach=function(t,e,i,r,n){return i+(e-i)*Math.exp(-(n-t)/r)},t.TimelineSignal.prototype._linearInterpolate=function(t,e,i,r,n){return e+(n-t)/(i-t)*(r-e)},t.TimelineSignal.prototype._exponentialInterpolate=function(t,e,i,r,n){return(e=Math.max(this._minOutput,e))*Math.pow(r/e,(n-t)/(i-t))},t.TimelineSignal.prototype._curveInterpolate=function(t,e,i,r){var n=e.length;if(r>=t+i)return e[n-1];if(r<=t)return e[0];var o=(r-t)/i,s=Math.floor((n-1)*o),a=Math.ceil((n-1)*o),h=e[s];return a===s?h:this._linearInterpolate(s,h,a,e[a],o*(n-1))},t.TimelineSignal.prototype.dispose=function(){t.Signal.prototype.dispose.call(this),t.Param.prototype.dispose.call(this),this._events.dispose(),this._events=null},t.TimelineSignal}(i),function(){var e=n,i=c,r=p,o=f,s=v;t.Envelope=function(t,i,r,n,o,a){this.aTime=t||.1,this.aLevel=i||1,this.dTime=r||.5,this.dLevel=n||0,this.rTime=o||0,this.rLevel=a||0,this._rampHighPercentage=.98,this._rampLowPercentage=.02,this.output=e.audiocontext.createGain(),this.control=new s,this._init(),this.control.connect(this.output),this.connection=null,this.mathOps=[this.control],this.isExponential=!1,this.sourceToClear=null,this.wasTriggered=!1,e.soundArray.push(this)},t.Envelope.prototype._init=function(){this.control.setTargetAtTime(1e-5,e.audiocontext.currentTime,.001),this._setRampAD(this.aTime,this.dTime)}
1,t.Envelope.prototype.set=function(t,e,i,r,n,o){this.aTime=t,this.aLevel=e,this.dTime=i||0,this.dLevel=r||0,this.rTime=n||0,this.rLevel=o||0,this._setRampAD(t,i)},t.Envelope.prototype.setADSR=function(t,e,i,r){this.aTime=t,this.dTime=e||0,this.sPercent=i||0,this.dLevel=void 0!==i?i*(this.aLevel-this.rLevel)+this.rLevel:0,this.rTime=r||0,this._setRampAD(t,e)},t.Envelope.prototype.setRange=function(t,e){this.aLevel=t||1,this.rLevel=e||0},t.Envelope.prototype._setRampAD=function(t,e){this._rampAttackTime=this.checkExpInput(t),this._rampDecayTime=this.checkExpInput(e);var i=1;i=Math.log(1/this.checkExpInput(1-this._rampHighPercentage)),this._rampAttackTC=t/this.checkExpInput(i),i=Math.log(1/this._rampLowPercentage),this._rampDecayTC=e/this.checkExpInput(i)},t.Envelope.prototype.setRampPercentages=function(t,e){this._rampHighPercentage=this.checkExpInput(t),this._rampLowPercentage=this.checkExpInput(e);var i=1;i=Math.log(1/this.checkExpInput(1-this._rampHighPercentage)),this._rampAttackTC=this._rampAttackTime/this.checkExpInput(i),i=Math.log(1/this._rampLowPercentage),this._rampDecayTC=this._rampDecayTime/this.checkExpInput(i)},t.Envelope.prototype.setInput=function(){for(var t=0;t<arguments.length;t++)this.connect(arguments[t])},t.Envelope.prototype.setExp=function(t){this.isExponential=t},t.Envelope.prototype.checkExpInput=function(t){return t<=0&&(t=1e-8),t},t.Envelope.prototype.play=function(t,e,i){var r=e||0;i=i||0,t&&this.connection!==t&&this.connect(t),this.triggerAttack(t,r),this.triggerRelease(t,r+this.aTime+this.dTime+i)},t.Envelope.prototype.triggerAttack=function(t,i){var r=e.audiocontext.currentTime+(i||0);this.lastAttack=r,this.wasTriggered=!0,t&&this.connection!==t&&this.connect(t);var n=this.control.getValueAtTime(r);!0===this.isExponential?this.control.exponentialRampToValueAtTime(this.checkExpInput(n),r):this.control.linearRampToValueAtTime(n,r),r+=this.aTime,!0===this.isExponential?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.aLevel),r),n=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(n,r)):(this.control.linearRampToValueAtTime(this.aLevel,r),n=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(n,r)),r+=this.dTime,!0===this.isExponential?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.dLevel),r),n=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(n,r)):(this.control.linearRampToValueAtTime(this.dLevel,r),n=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(n,r))},t.Envelope.prototype.triggerRelease=function(t,i){if(this.wasTriggered){var r=e.audiocontext.currentTime+(i||0);t&&this.connection!==t&&this.connect(t);var n=this.control.getValueAtTime(r);!0===this.isExponential?this.control.exponentialRampToValueAtTime(this.checkExpInput(n),r):this.control.linearRampToValueAtTime(n,r),r+=this.rTime,!0===this.isExponential?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.rLevel),r),n=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(n,r)):(this.control.linearRampToValueAtTime(this.rLevel,r),n=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(n,r)),this.wasTriggered=!1}},t.Envelope.prototype.ramp=function(t,i,r,n){var o=e.audiocontext.currentTime+(i||0),s=this.checkExpInput(r),a=void 0!==n?this.checkExpInput(n):void 0;t&&this.connection!==t&&this.connect(t);var h=this.checkExpInput(this.control.getValueAtTime(o));s>h?(this.control.setTargetAtTime(s,o,this._rampAttackTC),o+=this._rampAttackTime):s<h&&(this.control.setTargetAtTime(s,o,this._rampDecayTC),o+=this._rampDecayTime),void 0!==a&&(a>s?this.control.setTargetAtTime(a,o,this._rampAttackTC):a<s&&this.control.setTargetAtTime(a,o,this._rampDecayTC))},t.Envelope.prototype.connect=function(i){this.connection=i,(i instanceof t.Oscillator||i instanceof t.SoundFile||i instanceof t.AudioIn||i instanceof t.Reverb||i instanceof t.Noise||i instanceof t.Filter||i instanceof t.Delay)&&(i=i.output.gain),i instanceof AudioParam&&i.setValueAtTime(0,e.audiocontext.currentTime),i instanceof t.Signal&&i.setValue(0),this.output.connect(i)},t.Envelope.prototype.disconnect=function(){this.output&&this.output.disconnect()},t.Envelope.prototype.add=function(e){var r=new i(e);return t.prototype._mathChain(this,r,this.mathOps.length,this.output,i)},t.Envelope.prototype.mult=function(e){var i=new r(e);return t.prototype._mathChain(this,i,this.mathOps.length,this.output,r)},t.Envelope.prototype.scale=function(e,i,r,n){var s=new o(e,i,r,n);return t.prototype._mathChain(this,s,this.mathOps.length,this.output,o)},t.Envelope.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.disconnect(),this.control&&(this.control.dispose(),this.control=null);for(var i=1;i<this.mathOps.length;i++)this.mathOps[i].dispose()},t.Env=function(e,i,r,n,o,s){console.warn("WARNING: p5.Env is now deprecated and may be removed in future versions. Please use the new p5.Envelope instead."),t.Envelope.call(this,e,i,r,n,o,s)},t.Env.prototype=Object.create(t.Envelope.prototype)}(),function(){var e=n;function i(){for(var t=e.audiocontext,i=t.createBuffer(1,2048,t.sampleRate),r=i.getChannelData(0),n=0;n<2048;n++)r[n]=1;var o=t.createBufferSource();return o.buffer=i,o.loop=!0,o}t.Pulse=function(r,n){t.Oscillator.call(this,r,"sawtooth"),this.w=n||0,this.osc2=new t.SawOsc(r),this.dNode=e.audiocontext.createDelay(),this.dcOffset=i(),this.dcGain=e.audiocontext.createGain(),this.dcOffset.connect(this.dcGain),this.dcGain.connect(this.output),this.f=r||440,this.dNode.delayTime.value=this.w/this.oscillator.frequency.value,this.dcGain.gain.value=1.7*(.5-this.w),this.osc2.disconnect(),this.osc2.panner.disconnect(),this.osc2.amp(-1),this.osc2.output.connect(this.dNode),this.dNode.connect(this.output),this.output.gain.value=1,this.output.connect(this.panner)},t.Pulse.prototype=Object.create(t.Oscillator.prototype),t.Pulse.prototype.width=function(e){if("number"==typeof e)e<=1&&e>=0&&(this.w=e,this.dNode.delayTime.value=this.w/this.oscillator.frequency.value),this.dcGain.gain.value=1.7*(.5-this.w);else{e.connect(this.dNode.delayTime);var i=new t.SignalAdd(-.5);i.setInput(e),(i=(i=i.mult(-1)).mult(1.7)).connect(this.dcGain.gain)}},t.Pulse.prototype.start=function(t,r){var n=e.audiocontext.currentTime,o=r||0;if(!this.started){var s=t||this.f,a=this.oscillator.type;this.oscillator=e.audiocontext.createOscillator(),this.oscillator.frequency.setValueAtTime(s,n),this.oscillator.type=a,this.oscillator.connect(this.output),this.oscillator.start(o+n),this.osc2.oscillator=e.audiocontext.createOscillator(),this.osc2.oscillator.frequency.setValueAtTime(s,o+n),this.osc2.oscillator.type=a,this.osc2.oscillator.connect(this.osc2.output),this.osc2.start(o+n),this.freqNode=[this.oscillator.frequency,this.osc2.oscillator.frequency],this.dcOffset=i(),this.dcOffset.connect(this.dcGain),this.dcOffset.start(o+n),void 0!==this.mods&&void 0!==this.mods.frequency&&(this.mods.frequency.connect(this.freqNode[0]),this.mods.frequency.connect(this.freqNode[1])),this.started=!0,this.osc2.started=!0}},t.Pulse.prototype.stop=function(t){if(this.started){var i=t||0,r=e.audiocontext.currentTime;this.oscillator.stop(i+r),this.osc2.oscillator&&this.osc2.oscillator.stop(i+r),this.dcOffset.stop(i+r),this.started=!1,this.osc2.started=!1}},t.Pulse.prototype.freq=function(t,i,r){if("number"==typeof t){this.f=t;var n=e.audiocontext.currentTime,o=(i=i||0,r=r||0,this.oscillator.frequency.value);this.oscillator.frequency.cancelScheduledValues(n),this.oscillator.frequency.setValueAtTime(o,n+r),this.oscillator.frequency.exponentialRampToValueAtTime(t,r+i+n),this.osc2.oscillator.frequency.cancelScheduledValues(n),this.osc2.oscillator.frequency.setValueAtTime(o,n+r),this.osc2.oscillator.frequency.exponentialRampToValueAtTime(t,r+i+n),this.freqMod&&(this.freqMod.output.disconnect(),this.freqMod=null)}else t.output&&(t.output.disconnect(),t.output.connect(this.oscillator.frequency),t.output.connect(this.osc2.oscillator.frequency),this.freqMod=t)}}(),function(){var e=n;t.Noise=function(e){t.Oscillator.call(this),delete this.f,delete this.freq,delete this.oscillator,this.buffer="brown"===e?o:"pink"===e?r:i},t.Noise.prototype=Object.create(t.Oscillator.prototype);var i=function(){for(var t=2*e.audiocontext.sampleRate,i=e.audiocontext.createBuffer(1,t,e.audiocontext.sampleRate),r=i.getChannelData(0),n=0;n<t;n++)r[n]=2*Math.random()-1;return i.type="white",i}(),r=function(){var t,i,r,n,o,s,a,h=2*e.audiocontext.sampleRate,l=e.audiocontext.createBuffer(1,h,e.audiocontext.sampleRate),u=l.getChannelData(0);t=i=r=n=o=s=a=0;for(var c=0;c<h;c++){var p=2*Math.random()-1;
1u[c]=(t=.99886*t+.0555179*p)+(i=.99332*i+.0750759*p)+(r=.969*r+.153852*p)+(n=.8665*n+.3104856*p)+(o=.55*o+.5329522*p)+(s=-.7616*s-.016898*p)+a+.5362*p,u[c]*=.11,a=.115926*p}return l.type="pink",l}(),o=function(){for(var t=2*e.audiocontext.sampleRate,i=e.audiocontext.createBuffer(1,t,e.audiocontext.sampleRate),r=i.getChannelData(0),n=0,o=0;o<t;o++){var s=2*Math.random()-1;r[o]=(n+.02*s)/1.02,n=r[o],r[o]*=3.5}return i.type="brown",i}();t.Noise.prototype.setType=function(t){switch(t){case"white":this.buffer=i;break;case"pink":this.buffer=r;break;case"brown":this.buffer=o;break;default:this.buffer=i}if(this.started){var n=e.audiocontext.currentTime;this.stop(n),this.start(n+.01)}},t.Noise.prototype.getType=function(){return this.buffer.type},t.Noise.prototype.start=function(){this.started&&this.stop(),this.noise=e.audiocontext.createBufferSource(),this.noise.buffer=this.buffer,this.noise.loop=!0,this.noise.connect(this.output),this.noise.start(e.audiocontext.currentTime),this.started=!0},t.Noise.prototype.stop=function(){this.noise&&(this.noise.stop(e.audiocontext.currentTime),this.started=!1)},t.Noise.prototype.dispose=function(){var t=e.audiocontext.currentTime,i=e.soundArray.indexOf(this);e.soundArray.splice(i,1),this.noise&&(this.noise.disconnect(),this.stop(t)),this.output&&this.output.disconnect(),this.panner&&this.panner.disconnect(),this.output=null,this.panner=null,this.buffer=null,this.noise=null}}(),function(){var e=n;e.inputSources=[],t.AudioIn=function(i){this.input=e.audiocontext.createGain(),this.output=e.audiocontext.createGain(),this.stream=null,this.mediaStream=null,this.currentSource=null,this.enabled=!1,this.amplitude=new t.Amplitude,this.output.connect(this.amplitude.input),window.MediaStreamTrack&&window.navigator.mediaDevices&&window.navigator.mediaDevices.getUserMedia||(i?i():window.alert("This browser does not support MediaStreamTrack and mediaDevices")),e.soundArray.push(this)},t.AudioIn.prototype.start=function(t,i){var r=this;this.stream&&this.stop();var n={audio:{sampleRate:e.audiocontext.sampleRate,echoCancellation:!1}};e.inputSources[this.currentSource]&&(n.audio.deviceId=e.inputSources[r.currentSource].deviceId),window.navigator.mediaDevices.getUserMedia(n).then(function(i){r.stream=i,r.enabled=!0,r.mediaStream=e.audiocontext.createMediaStreamSource(i),r.mediaStream.connect(r.output),r.amplitude.setInput(r.output),t&&t()}).catch(function(t){i?i(t):console.error(t)})},t.AudioIn.prototype.stop=function(){this.stream&&(this.stream.getTracks().forEach(function(t){t.stop()}),this.mediaStream.disconnect(),delete this.mediaStream,delete this.stream)},t.AudioIn.prototype.connect=function(t){t?t.hasOwnProperty("input")?this.output.connect(t.input):t.hasOwnProperty("analyser")?this.output.connect(t.analyser):this.output.connect(t):this.output.connect(e.input)},t.AudioIn.prototype.disconnect=function(){this.output&&(this.output.disconnect(),this.output.connect(this.amplitude.input))},t.AudioIn.prototype.getLevel=function(t){return t&&(this.amplitude.smoothing=t),this.amplitude.getLevel()},t.AudioIn.prototype.amp=function(t,i){if(i){var r=i||0,n=this.output.gain.value;this.output.gain.cancelScheduledValues(e.audiocontext.currentTime),this.output.gain.setValueAtTime(n,e.audiocontext.currentTime),this.output.gain.linearRampToValueAtTime(t,r+e.audiocontext.currentTime)}else this.output.gain.cancelScheduledValues(e.audiocontext.currentTime),this.output.gain.setValueAtTime(t,e.audiocontext.currentTime)},t.AudioIn.prototype.getSources=function(t,i){return new Promise(function(r,n){window.navigator.mediaDevices.enumerateDevices().then(function(i){e.inputSources=i.filter(function(t){return"audioinput"===t.kind}),r(e.inputSources),t&&t(e.inputSources)}).catch(function(t){n(t),i?i(t):console.error("This browser does not support MediaStreamTrack.getSources()")})})},t.AudioIn.prototype.setSource=function(t){e.inputSources.length>0&&t<e.inputSources.length?(this.currentSource=t,console.log("set source to ",e.inputSources[this.currentSource])):console.log("unable to set input source"),this.stream&&this.stream.active&&this.start()},t.AudioIn.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.stop(),this.output&&this.output.disconnect(),this.amplitude&&this.amplitude.disconnect(),delete this.amplitude,delete this.output}}(),function(t){"use strict";t.Negate=function(){this._multiply=this.input=this.output=new t.Multiply(-1)},t.extend(t.Negate,t.SignalBase),t.Negate.prototype.dispose=function(){return t.prototype.dispose.call(this),this._multiply.dispose(),this._multiply=null,this}}(i),function(t){"use strict";t.Subtract=function(e){this.createInsOuts(2,0),this._sum=this.input[0]=this.output=new t.Gain,this._neg=new t.Negate,this._param=this.input[1]=new t.Signal(e),this._param.chain(this._neg,this._sum)},t.extend(t.Subtract,t.Signal),t.Subtract.prototype.dispose=function(){return t.prototype.dispose.call(this),this._neg.dispose(),this._neg=null,this._sum.disconnect(),this._sum=null,this._param.dispose(),this._param=null,this}}(i),function(t){"use strict";t.GreaterThanZero=function(){this._thresh=this.output=new t.WaveShaper(function(t){return t<=0?0:1},127),this._scale=this.input=new t.Multiply(1e4),this._scale.connect(this._thresh)},t.extend(t.GreaterThanZero,t.SignalBase),t.GreaterThanZero.prototype.dispose=function(){return t.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._thresh.dispose(),this._thresh=null,this}}(i),function(t){"use strict";t.GreaterThan=function(e){this.createInsOuts(2,0),this._param=this.input[0]=new t.Subtract(e),this.input[1]=this._param.input[1],this._gtz=this.output=new t.GreaterThanZero,this._param.connect(this._gtz)},t.extend(t.GreaterThan,t.Signal),t.GreaterThan.prototype.dispose=function(){return t.prototype.dispose.call(this),this._param.dispose(),this._param=null,this._gtz.dispose(),this._gtz=null,this}}(i),function(t){"use strict";t.Abs=function(){this._abs=this.input=this.output=new t.WaveShaper(function(t){return 0===t?0:Math.abs(t)},127)},t.extend(t.Abs,t.SignalBase),t.Abs.prototype.dispose=function(){return t.prototype.dispose.call(this),this._abs.dispose(),this._abs=null,this}}(i),function(t){"use strict";t.Modulo=function(e){this.createInsOuts(1,0),this._shaper=new t.WaveShaper(Math.pow(2,16)),this._multiply=new t.Multiply,this._subtract=this.output=new t.Subtract,this._modSignal=new t.Signal(e),this.input.fan(this._shaper,this._subtract),this._modSignal.connect(this._multiply,0,0),this._shaper.connect(this._multiply,0,1),this._multiply.connect(this._subtract,0,1),this._setWaveShaper(e)},t.extend(t.Modulo,t.SignalBase),t.Modulo.prototype._setWaveShaper=function(t){this._shaper.setMap(function(e){return Math.floor((e+1e-4)/t)})},Object.defineProperty(t.Modulo.prototype,"value",{get:function(){return this._modSignal.value},set:function(t){this._modSignal.value=t,this._setWaveShaper(t)}}),t.Modulo.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this._multiply.dispose(),this._multiply=null,this._subtract.dispose(),this._subtract=null,this._modSignal.dis
1pose(),this._modSignal=null,this}}(i),function(t){"use strict";t.Pow=function(e){this._exp=this.defaultArg(e,1),this._expScaler=this.input=this.output=new t.WaveShaper(this._expFunc(this._exp),8192)},t.extend(t.Pow,t.SignalBase),Object.defineProperty(t.Pow.prototype,"value",{get:function(){return this._exp},set:function(t){this._exp=t,this._expScaler.setMap(this._expFunc(this._exp))}}),t.Pow.prototype._expFunc=function(t){return function(e){return Math.pow(Math.abs(e),t)}},t.Pow.prototype.dispose=function(){return t.prototype.dispose.call(this),this._expScaler.dispose(),this._expScaler=null,this}}(i),function(t){"use strict";t.AudioToGain=function(){this._norm=this.input=this.output=new t.WaveShaper(function(t){return(t+1)/2})},t.extend(t.AudioToGain,t.SignalBase),t.AudioToGain.prototype.dispose=function(){return t.prototype.dispose.call(this),this._norm.dispose(),this._norm=null,this}}(i),function(t){"use strict";function e(t,e,i){var r=new t;return i._eval(e[0]).connect(r,0,0),i._eval(e[1]).connect(r,0,1),r}function i(t,e,i){var r=new t;return i._eval(e[0]).connect(r,0,0),r}function r(t){return t?parseFloat(t):void 0}function n(t){return t&&t.args?parseFloat(t.args):void 0}t.Expr=function(){var t=this._replacements(Array.prototype.slice.call(arguments)),e=this._parseInputs(t);this._nodes=[],this.input=new Array(e);for(var i=0;i<e;i++)this.input[i]=this.context.createGain();var r,n=this._parseTree(t);try{r=this._eval(n)}catch(o){throw this._disposeNodes(),new Error("Tone.Expr: Could evaluate expression: "+t)}this.output=r},t.extend(t.Expr,t.SignalBase),t.Expr._Expressions={value:{signal:{regexp:/^\d+\.\d+|^\d+/,method:function(e){return new t.Signal(r(e))}},input:{regexp:/^\$\d/,method:function(t,e){return e.input[r(t.substr(1))]}}},glue:{"(":{regexp:/^\(/},")":{regexp:/^\)/},",":{regexp:/^,/}},func:{abs:{regexp:/^abs/,method:i.bind(this,t.Abs)},mod:{regexp:/^mod/,method:function(e,i){var r=n(e[1]),o=new t.Modulo(r);return i._eval(e[0]).connect(o),o}},pow:{regexp:/^pow/,method:function(e,i){var r=n(e[1]),o=new t.Pow(r);return i._eval(e[0]).connect(o),o}},a2g:{regexp:/^a2g/,method:function(e,i){var r=new t.AudioToGain;return i._eval(e[0]).connect(r),r}}},binary:{"+":{regexp:/^\+/,precedence:1,method:e.bind(this,t.Add)},"-":{regexp:/^\-/,precedence:1,method:function(r,n){return 1===r.length?i(t.Negate,r,n):e(t.Subtract,r,n)}},"*":{regexp:/^\*/,precedence:0,method:e.bind(this,t.Multiply)}},unary:{"-":{regexp:/^\-/,method:i.bind(this,t.Negate)},"!":{regexp:/^\!/,method:i.bind(this,t.NOT)}}},t.Expr.prototype._parseInputs=function(t){var e=t.match(/\$\d/g),i=0;if(null!==e)for(var r=0;r<e.length;r++){var n=parseInt(e[r].substr(1))+1;i=Math.max(i,n)}return i},t.Expr.prototype._replacements=function(t){for(var e=t.shift(),i=0;i<t.length;i++)e=e.replace(/\%/i,t[i]);return e},t.Expr.prototype._tokenize=function(e){for(var i=-1,r=[];e.length>0;){var n=o(e=e.trim());r.push(n),e=e.substr(n.value.length)}function o(e){for(var i in t.Expr._Expressions){var r=t.Expr._Expressions[i];for(var n in r){var o=r[n],s=e.match(o.regexp);if(null!==s)return{type:i,value:s[0],method:o.method}}}throw new SyntaxError("Tone.Expr: Unexpected token "+e)}return{next:function(){return r[++i]},peek:function(){return r[i+1]}}},t.Expr.prototype._parseTree=function(e){var i=this._tokenize(e),r=this.isUndef.bind(this);function n(t,e){return!r(t)&&"glue"===t.type&&t.value===e}function o(e,i,n){var o=t.Expr._Expressions[i];if(!r(e))for(var s in o){var a=o[s];if(a.regexp.test(e.value)){if(r(n))return!0;if(a.precedence===n)return!0}}return!1}return function t(e){var s;r(e)&&(e=5),s=e<0?function e(){var s,a;return o(s=i.peek(),"unary")?(s=i.next(),a=e(),{operator:s.value,method:s.method,args:[a]}):function(){var e,o;if(e=i.peek(),r(e))throw new SyntaxError("Tone.Expr: Unexpected termination of expression");if("func"===e.type)return function(e){var o=[];if(!n(i.next(),"("))throw new SyntaxError('Tone.Expr: Expected ( in a function call "'+e.value+'"');if(n(i.peek(),")")||(o=function(){for(var e,o=[];e=t(),!r(e)&&(o.push(e),n(i.peek(),","));)i.next();return o}()),!n(i.next(),")"))throw new SyntaxError('Tone.Expr: Expected ) in a function call "'+e.value+'"');return{method:e.method,args:o,name:name}}(e=i.next());if("value"===e.type)return{method:(e=i.next()).method,args:e.value};if(n(e,"(")){if(i.next(),o=t(),!n(e=i.next(),")"))throw new SyntaxError("Expected )");return o}throw new SyntaxError("Tone.Expr: Parse error, cannot process token "+e.value)}()}():t(e-1);for(var a=i.peek();o(a,"binary",e);)s={operator:(a=i.next()).value,method:a.method,args:[s,t(e-1)]},a=i.peek();return s}()},t.Expr.prototype._eval=function(t){if(!this.isUndef(t)){var e=t.method(t.args,this);return this._nodes.push(e),e}},t.Expr.prototype._disposeNodes=function(){for(var t=0;t<this._nodes.length;t++){var e=this._nodes[t];this.isFunction(e.dispose)?e.dispose():this.isFunction(e.disconnect)&&e.disconnect(),e=null,this._nodes[t]=null}this._nodes=null},t.Expr.prototype.dispose=function(){t.prototype.dispose.call(this),this._disposeNodes()}}(i),function(t){"use strict";t.EqualPowerGain=function(){this._eqPower=this.input=this.output=new t.WaveShaper((function(t){return Math.abs(t)<.001?0:this.equalPowerScale(t)}).bind(this),4096)},t.extend(t.EqualPowerGain,t.SignalBase),t.EqualPowerGain.prototype.dispose=function(){return t.prototype.dispose.call(this),this._eqPower.dis
1pose(),this._eqPower=null,this}}(i),_=function(t){"use strict";return t.CrossFade=function(e){this.createInsOuts(2,1),this.a=this.input[0]=new t.Gain,this.b=this.input[1]=new t.Gain,this.fade=new t.Signal(this.defaultArg(e,.5),t.Type.NormalRange),this._equalPowerA=new t.EqualPowerGain,this._equalPowerB=new t.EqualPowerGain,this._invert=new t.Expr("1 - $0"),this.a.connect(this.output),this.b.connect(this.output),this.fade.chain(this._equalPowerB,this.b.gain),this.fade.chain(this._invert,this._equalPowerA,this.a.gain),this._readOnly("fade")},t.extend(t.CrossFade),t.CrossFade.prototype.dispose=function(){return t.prototype.dispose.call(this),this._writable("fade"),this._equalPowerA.dispose(),this._equalPowerA=null,this._equalPowerB.dispose(),this._equalPowerB=null,this.fade.dispose(),this.fade=null,this._invert.dispose(),this._invert=null,this.a.dispose(),this.a=null,this.b.dispose(),this.b=null,this},t.CrossFade}(i),b=function(){var e=n,i=_;return t.Effect=function(){this.ac=e.audiocontext,this.input=this.ac.createGain(),this.output=this.ac.createGain(),this._drywet=new i(1),this.wet=this.ac.createGain(),this.input.connect(this._drywet.a),this.wet.connect(this._drywet.b),this._drywet.connect(this.output),this.connect(),e.soundArray.push(this)},t.Effect.prototype.amp=function(t,i,r){i=i||0,r=r||0;var n=e.audiocontext.currentTime,o=this.output.gain.value;this.output.gain.cancelScheduledValues(n),this.output.gain.linearRampToValueAtTime(o,n+r+.001),this.output.gain.linearRampToValueAtTime(t,n+r+i+.001)},t.Effect.prototype.chain=function(){if(arguments.length>0){this.connect(arguments[0]);for(var t=1;t<arguments.length;t+=1)arguments[t-1].connect(arguments[t])}return this},t.Effect.prototype.drywet=function(t){return void 0!==t&&(this._drywet.fade.value=t),this._drywet.fade.value},t.Effect.prototype.connect=function(e){var i=e||t.soundOut.input;
1this.output.connect(i.input?i.input:i)},t.Effect.prototype.disconnect=function(){this.output&&this.output.disconnect()},t.Effect.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.input&&(this.input.disconnect(),delete this.input),this.output&&(this.output.disconnect(),delete this.output),this._drywet&&(this._drywet.disconnect(),delete this._drywet),this.wet&&(this.wet.disconnect(),delete this.wet),this.ac=void 0},t.Effect}(),w=b,t.Filter=function(t){w.call(this),this.biquad=this.ac.createBiquadFilter(),this.input.connect(this.biquad),this.biquad.connect(this.wet),t&&this.setType(t),this._on=!0,this._untoggledType=this.biquad.type},t.Filter.prototype=Object.create(w.prototype),t.Filter.prototype.process=function(t,e,i,r){t.connect(this.input),this.set(e,i,r)},t.Filter.prototype.set=function(t,e,i){t&&this.freq(t,i),e&&this.res(e,i)},t.Filter.prototype.freq=function(t,e){var i=e||0;return t<=0&&(t=1),"number"==typeof t?(this.biquad.frequency.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.frequency.exponentialRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.frequency),this.biquad.frequency.value},t.Filter.prototype.res=function(t,e){var i=e||0;return"number"==typeof t?(this.biquad.Q.value=t,this.biquad.Q.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.Q.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.Q),this.biquad.Q.value},t.Filter.prototype.gain=function(t,e){var i=e||0;return"number"==typeof t?(this.biquad.gain.value=t,this.biquad.gain.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.gain.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.gain),this.biquad.gain.value},t.Filter.prototype.toggle=function(){return this._on=!this._on,!0===this._on?this.biquad.type=this._untoggledType:!1===this._on&&(this.biquad.type="allpass"),this._on},t.Filter.prototype.setType=function(t){this.biquad.type=t,this._untoggledType=this.biquad.type},t.Filter.prototype.dispose=function(){w.prototype.dispose.apply(this),this.biquad&&(this.biquad.disconnect(),delete this.biquad)},t.LowPass=function(){t.Filter.call(this,"lowpass")},t.LowPass.prototype=Object.create(t.Filter.prototype),t.HighPass=function(){t.Filter.call(this,"highpass")},t.HighPass.prototype=Object.create(t.Filter.prototype),t.BandPass=function(){t.Filter.call(this,"bandpass")},t.BandPass.prototype=Object.create(t.Filter.prototype),x=t.Filter,T=function(){var e=x,i=n,r=function(t,i){e.call(this,"peaking"),this.disconnect(),this.set(t,i),this.biquad.gain.value=0,delete this.input,delete this.output,delete this._drywet,delete this.wet};return(r.prototype=Object.create(e.prototype)).amp=function(){console.warn("`amp()` is not available for p5.EQ bands. Use `.gain()`")},r.prototype.drywet=function(){console.warn("`drywet()` is not available for p5.EQ bands.")},r.prototype.connect=function(e){var i=e||t.soundOut.input;
1this.biquad?this.biquad.connect(i.input?i.input:i):this.output.connect(i.input?i.input:i)},r.prototype.disconnect=function(){this.biquad&&this.biquad.disconnect()},r.prototype.dispose=function(){var t=i.soundArray.indexOf(this);i.soundArray.splice(t,1),this.disconnect(),delete this.biquad},r}(),function(){var e=b,i=T;t.EQ=function(t){var i,r,n;e.call(this),i=3===(t=3===t||8===t?t:3)?Math.pow(2,3):2,this.bands=[];for(var o=0;o<t;o++)o===t-1?(r=21e3,n=.01):0===o?(r=100,n=.1):1===o?(r=3===t?360*i:360,n=1):(r=this.bands[o-1].freq()*i,n=1),this.bands[o]=this._newBand(r,n),o>0?this.bands[o-1].connect(this.bands[o].biquad):this.input.connect(this.bands[o].biquad);this.bands[t-1].connect(this.output)},t.EQ.prototype=Object.create(e.prototype),t.EQ.prototype.process=function(t){t.connect(this.input)},t.EQ.prototype.set=function(){if(arguments.length===2*this.bands.length)for(var t=0;t<arguments.length;t+=2)this.bands[t/2].freq(arguments[t]),this.bands[t/2].gain(arguments[t+1]);else console.error("Argument mismatch. .set() should be called with "+2*this.bands.length+" arguments. (one frequency and gain value pair for each band of the eq)")},t.EQ.prototype._newBand=function(t,e){return new i(t,e)},t.EQ.prototype.dispose=function(){if(e.prototype.dispose.apply(this),this.bands){for(;this.bands.length>0;)this.bands.pop().dispose();delete this.bands}}}(),function(){var e=b;t.Panner3D=function(){e.call(this),this.panner=this.ac.createPanner(),this.panner.panningModel="HRTF",this.panner.distanceModel="linear",this.panner.connect(this.output),this.input.connect(this.panner)},t.Panner3D.prototype=Object.create(e.prototype),t.Panner3D.prototype.process=function(t){t.connect(this.input)},t.Panner3D.prototype.set=function(t,e,i,r){return this.positionX(t,r),this.positionY(e,r),this.positionZ(i,r),[this.panner.positionX.value,this.panner.positionY.value,this.panner.positionZ.value]},t.Panner3D.prototype.positionX=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionX.value=t,this.panner.positionX.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionX),this.panner.positionX.value},t.Panner3D.prototype.positionY=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionY.value=t,this.panner.positionY.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionY),this.panner.positionY.value},t.Panner3D.prototype.positionZ=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionZ.value=t,this.panner.positionZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionZ),this.panner.positionZ.value},t.Panner3D.prototype.orient=function(t,e,i,r){return this.orientX(t,r),this.orientY(e,r),this.orientZ(i,r),[this.panner.orientationX.value,this.panner.orientationY.value,this.panner.orientationZ.value]},t.Panner3D.prototype.orientX=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationX.value=t,this.panner.orientationX.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationX),this.panner.orientationX.value},t.Panner3D.prototype.orientY=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationY.value=t,this.panner.orientationY.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationY),this.panner.orientationY.value},t.Panner3D.prototype.orientZ=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationZ.value=t,this.panner.orientationZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationZ),this.panner.orientationZ.value},t.Panner3D.prototype.setFalloff=function(t,e){this.maxDist(t),this.rolloff(e)},t.Panner3D.prototype.maxDist=function(t){return"number"==typeof t&&(this.panner.maxDistance=t),this.panner.maxDistance},t.Panner3D.prototype.rolloff=function(t){return"number"==typeof t&&(this.panner.rolloffFactor=t),this.panner.rolloffFactor},t.Panner3D.dispose=function(){e.prototype.dispose.apply(this),this.panner&&(this.panner.disconnect(),delete this.panner)}}(),function(){var e=n;t.Listener3D=function(t){this.ac=e.audiocontext,this.listener=this.ac.listener},t.Listener3D.prototype.process=function(t){t.connect(this.input)}
1,t.Listener3D.prototype.position=function(t,e,i,r){return this.positionX(t,r),this.positionY(e,r),this.positionZ(i,r),[this.listener.positionX.value,this.listener.positionY.value,this.listener.positionZ.value]},t.Listener3D.prototype.positionX=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.positionX.value=t,this.listener.positionX.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.positionX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.positionX),this.listener.positionX.value},t.Listener3D.prototype.positionY=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.positionY.value=t,this.listener.positionY.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.positionY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.positionY),this.listener.positionY.value},t.Listener3D.prototype.positionZ=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.positionZ.value=t,this.listener.positionZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.positionZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.positionZ),this.listener.positionZ.value},t.Listener3D.prototype.orient=function(t,e,i,r,n,o,s){return 3===arguments.length||4===arguments.length?this.orientForward(t,e,i,s=arguments[3]):6!==arguments.length&&7!==arguments||(this.orientForward(t,e,i),this.orientUp(r,n,o,s)),[this.listener.forwardX.value,this.listener.forwardY.value,this.listener.forwardZ.value,this.listener.upX.value,this.listener.upY.value,this.listener.upZ.value]},t.Listener3D.prototype.orientForward=function(t,e,i,r){return this.forwardX(t,r),this.forwardY(e,r),this.forwardZ(i,r),[this.listener.forwardX,this.listener.forwardY,this.listener.forwardZ]},t.Listener3D.prototype.orientUp=function(t,e,i,r){return this.upX(t,r),this.upY(e,r),this.upZ(i,r),[this.listener.upX,this.listener.upY,this.listener.upZ]},t.Listener3D.prototype.forwardX=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.forwardX.value=t,this.listener.forwardX.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.forwardX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.forwardX),this.listener.forwardX.value},t.Listener3D.prototype.forwardY=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.forwardY.value=t,this.listener.forwardY.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.forwardY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.forwardY),this.listener.forwardY.value},t.Listener3D.prototype.forwardZ=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.forwardZ.value=t,this.listener.forwardZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.forwardZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.forwardZ),this.listener.forwardZ.value},t.Listener3D.prototype.upX=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.upX.value=t,this.listener.upX.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.upX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.upX),this.listener.upX.value},t.Listener3D.prototype.upY=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.upY.value=t,this.listener.upY.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.upY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.upY),this.listener.upY.value},t.Listener3D.prototype.upZ=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.upZ.value=t,this.listener.upZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.upZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.upZ),this.listener.upZ.value}}(),function(){var e=x,i=b;t.Delay=function(){i.call(this),this._split=this.ac.createChannelSplitter(2),this._merge=this.ac.createChannelMerger(2),this._leftGain=this.ac.createGain(),this._rightGain=this.ac.createGain(),this.leftDelay=this.ac.createDelay(),this.rightDelay=this.ac.createDelay(),this._leftFilter=new e,this._rightFilter=new e,this._leftFilter.disconnect(),this._rightFilter.disconnect(),this._leftFilter.biquad.frequency.setValueAtTime(1200,this.ac.currentTime),this._rightFilter.biquad.frequency.setValueAtTime(1200,this.ac.currentTime),this._leftFilter.biquad.Q.setValueAtTime(.3,this.ac.currentTime),this._rightFilter.biquad.Q.setValueAtTime(.3,this.ac.currentTime),this.input.connect(this._split),this.leftDelay.connect(this._leftGain),this.rightDelay.connect(this._rightGain),this._leftGain.connect(this._leftFilter.input),this._rightGain.connect(this._rightFilter.input),this._merge.connect(this.wet),this._leftFilter.biquad.gain.setValueAtTime(1,this.ac.currentTime),this._rightFilter.biquad.gain.setValueAtTime(1,this.ac.currentTime),this.setType(0),this._maxDelay=this.leftDelay.delayTime.maxValue,this.feedback(.5)},t.Delay.prototype=Object.create(i.prototype),t.Delay.prototype.process=function(t,e,
1i,r){var n=i||0,o=e||0;if(n>=1)throw new Error("Feedback value will force a positive feedback loop.");if(o>=this._maxDelay)throw new Error("Delay Time exceeds maximum delay time of "+this._maxDelay+" second.");t.connect(this.input),this.leftDelay.delayTime.setValueAtTime(o,this.ac.currentTime),this.rightDelay.delayTime.setValueAtTime(o,this.ac.currentTime),this._leftGain.gain.value=n,this._rightGain.gain.value=n,r&&(this._leftFilter.freq(r),this._rightFilter.freq(r))},t.Delay.prototype.delayTime=function(t){"number"!=typeof t?(t.connect(this.leftDelay.delayTime),t.connect(this.rightDelay.delayTime)):(this.leftDelay.delayTime.cancelScheduledValues(this.ac.currentTime),this.rightDelay.delayTime.cancelScheduledValues(this.ac.currentTime),this.leftDelay.delayTime.linearRampToValueAtTime(t,this.ac.currentTime),this.rightDelay.delayTime.linearRampToValueAtTime(t,this.ac.currentTime))},t.Delay.prototype.feedback=function(t){if(t&&"number"!=typeof t)t.connect(this._leftGain.gain),t.connect(this._rightGain.gain);else{if(t>=1)throw new Error("Feedback value will force a positive feedback loop.");"number"==typeof t&&(this._leftGain.gain.value=t,this._rightGain.gain.value=t)}return this._leftGain.gain.value},t.Delay.prototype.filter=function(t,e){this._leftFilter.set(t,e),this._rightFilter.set(t,e)},t.Delay.prototype.setType=function(t){switch(1===t&&(t="pingPong"),this._split.disconnect(),this._leftFilter.disconnect(),this._rightFilter.disconnect(),this._split.connect(this.leftDelay,0),this._split.connect(this.rightDelay,1),t){case"pingPong":this._rightFilter.setType(this._leftFilter.biquad.type),this._leftFilter.output.connect(this._merge,0,0),this._rightFilter.output.connect(this._merge,0,1),this._leftFilter.output.connect(this.rightDelay),this._rightFilter.output.connect(this.leftDelay);break;default:this._leftFilter.output.connect(this._merge,0,0),this._rightFilter.output.connect(this._merge,0,1),this._leftFilter.output.connect(this.leftDelay),this._rightFilter.output.connect(this.rightDelay)}},t.Delay.prototype.dispose=function(){i.prototype.dispose.apply(this),this._split.disconnect(),this._leftFilter.dispose(),this._rightFilter.dispose(),this._merge.disconnect(),this._leftGain.disconnect(),this._rightGain.disconnect(),this.leftDelay.disconnect(),this.rightDelay.disconnect(),this._split=void 0,this._leftFilter=void 0,this._rightFilter=void 0,this._merge=void 0,this._leftGain=void 0,this._rightGain=void 0,this.leftDelay=void 0,this.rightDelay=void 0}}(),function(){var e=s,i=b;t.Reverb=function(){i.call(this),this._initConvolverNode(),this.input.gain.value=.5,this._seconds=3,this._decay=2,this._reverse=!1,this._buildImpulse()},t.Reverb.prototype=Object.create(i.prototype),t.Reverb.prototype._initConvolverNode=function(){this.convolverNode=this.ac.createConvolver(),this.input.connect(this.convolverNode),this.convolverNode.connect(this.wet)},t.Reverb.prototype._teardownConvolverNode=function(){this.convolverNode&&(this.convolverNode.disconnect(),delete this.convolverNode)},t.Reverb.prototype._setBuffer=function(t){this._teardownConvolverNode(),this._initConvolverNode(),this.convolverNode.buffer=t},t.Reverb.prototype.process=function(t,e,i,r){t.connect(this.input);var n=!1;e&&(this._seconds=e,n=!0),i&&(this._decay=i),r&&(this._reverse=r),n&&this._buildImpulse()},t.Reverb.prototype.set=function(t,e,i){var r=!1;t&&(this._seconds=t,r=!0),e&&(this._decay=e),i&&(this._reverse=i),r&&this._buildImpulse()},t.Reverb.prototype._buildImpulse=function(){var t,e,i=this.ac.sampleRate,r=i*this._seconds,n=this._decay,o=this.ac.createBuffer(2,r,i),s=o.getChannelData(0),a=o.getChannelData(1);for(e=0;e<r;e++)t=this._reverse?r-e:e,s[e]=(2*Math.random()-1)*Math.pow(1-t/r,n),a[e]=(2*Math.random()-1)*Math.pow(1-t/r,n);this._setBuffer(o)},t.Reverb.prototype.dispose=function(){i.prototype.dispose.apply(this),this._teardownConvolverNode()},t.Convolver=function(e,i,r){t.Reverb.call(this),this._initConvolverNode(),this.input.gain.value=.5,e?(this.impulses=[],this._loadBuffer(e,i,r)):(this._seconds=3,this._decay=2,this._reverse=!1,this._buildImpulse())},t.Convolver.prototype=Object.create(t.Reverb.prototype),t.prototype.registerPreloadMethod("createConvolver",t.prototype),t.prototype.createConvolver=function(e,i,r){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS");var n=this,o=new t.Convolver(e,function(t){"function"==typeof i&&i(t),"function"==typeof n._decrementPreload&&n._decrementPreload()},r);return o.impulses=[],o},t.Convolver.prototype._loadBuffer=function(i,r,n){i=t.prototype._checkFileFormats(i);var o=this,s=(new Error).stack,a=t.prototype.getAudioContext(),h=new XMLHttpRequest;h.open("GET",i,!0),h.responseType="arraybuffer",h.onload=function(){if(200===h.status)a.decodeAudioData(h.response,function(t){var e={},n=i.split("/");e.name=n[n.length-1],e.audioBuffer=t,o.impulses.push(e),o._setBuffer(e.audioBuffer),r&&r(e)},function(){var t=new e("decodeAudioData",s,o.url),i="AudioContext error at decodeAudioData for "+o.url;n?(t.msg=i,n(t)):console.error(i+"\n The error stack trace includes: \n"+t.stack)});else{var t=new e("loadConvolver",s,o.url),l="Unable to load "+o.url+". The request status was: "+h.status+" ("+h.statusText+")";n?(t.message=l,n(t)):console.error(l+"\n The error stack trace includes: \n"+t.stack)}},h.onerror=function(){var t=new e("loadConvolver",s,o.url),i="There was no response from the server at "+o.url+". Check the url and internet connectivity.";n?(t.message=i,n(t)):console.error(i+"\n The error stack trace includes: \n"+t.stack)},h.send()},t.Convolver.prototype.set=null,t.Convolver.prototype.process=function(t){t.connect(this.input)},t.Convolver.prototype.impulses=[],t.Convolver.prototype.addImpulse=function(t,e,
1i){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS"),this._loadBuffer(t,e,i)},t.Convolver.prototype.resetImpulse=function(t,e,i){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS"),this.impulses=[],this._loadBuffer(t,e,i)},t.Convolver.prototype.toggleImpulse=function(t){if("number"==typeof t&&t<this.impulses.length&&this._setBuffer(this.impulses[t].audioBuffer),"string"==typeof t)for(var e=0;e<this.impulses.length;e++)if(this.impulses[e].name===t){this._setBuffer(this.impulses[e].audioBuffer);break}},t.Convolver.prototype.dispose=function(){for(var e in t.Reverb.prototype.dispose.apply(this),this.impulses)this.impulses[e]&&(this.impulses[e]=null)}}(),function(t){"use strict";t.TimelineState=function(e){t.Timeline.call(this),this._initial=e},t.extend(t.TimelineState,t.Timeline),t.TimelineState.prototype.getValueAtTime=function(t){var e=this.get(t);return null!==e?e.state:this._initial},t.TimelineState.prototype.setStateAtTime=function(t,e){this.add({state:t,time:e})}}(i),S=function(t){"use strict";return t.Clock=function(){t.Emitter.call(this);var e=this.optionsObject(arguments,["callback","frequency"],t.Clock.defaults);this.callback=e.callback,this._nextTick=0,this._lastState=t.State.Stopped,this.frequency=new t.TimelineSignal(e.frequency,t.Type.Frequency),this._readOnly("frequency"),this.ticks=0,this._state=new t.TimelineState(t.State.Stopped),this._boundLoop=this._loop.bind(this),this.context.on("tick",this._boundLoop)},t.extend(t.Clock,t.Emitter),t.Clock.defaults={callback:t.noOp,frequency:1,lookAhead:"auto"},Object.defineProperty(t.Clock.prototype,"state",{get:function(){return this._state.getValueAtTime(this.now())}}),t.Clock.prototype.start=function(e,i){return e=this.toSeconds(e),this._state.getValueAtTime(e)!==t.State.Started&&this._state.add({state:t.State.Started,time:e,offset:i}),this},t.Clock.prototype.stop=function(e){return e=this.toSeconds(e),this._state.cancel(e),this._state.setStateAtTime(t.State.Stopped,e),this},t.Clock.prototype.pause=function(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Started&&this._state.setStateAtTime(t.State.Paused,e),this},t.Clock.prototype._loop=function(){for(var e=this.now()+this.context.lookAhead+this.context.updateInterval+2*this.context.lag;e>this._nextTick&&this._state;){var i=this._state.getValueAtTime(this._nextTick);if(i!==this._lastState){this._lastState=i;var r=this._state.get(this._nextTick);i===t.State.Started?(this._nextTick=r.time,this.isUndef(r.offset)||(this.ticks=r.offset),this.emit("start",r.time,this.ticks)):i===t.State.Stopped?(this.ticks=0,this.emit("stop",r.time)):i===t.State.Paused&&this.emit("pause",r.time)}var n=this._nextTick;this.frequency&&(this._nextTick+=1/this.frequency.getValueAtTime(this._nextTick),i===t.State.Started&&(this.callback(n),this.ticks++))}},t.Clock.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},t.Clock.prototype.dispose=function(){t.Emitter.prototype.dispose.call(this),this.context.off("tick",this._boundLoop),this._writable("frequency"),this.frequency.dispose(),this.frequency=null,this._boundLoop=null,this._nextTick=1/0,this.callback=null,this._state.dispose(),this._state=null},t.Clock}(i),function(){var e=n,i=S;t.Metro=function(){this.clock=new i({callback:this.ontick.bind(this)}),this.syncedParts=[],this.bpm=120,this._init(),this.prevTick=0,this.tatumTime=0,this.tickCallback=function(){}},t.Metro.prototype.ontick=function(t){var i=t-e.audiocontext.currentTime;if(!(t-this.prevTick-this.tatumTime<=-.02)){this.prevTick=t;var r=this;this.syncedParts.forEach(function(t){t.isPlaying&&(t.incrementStep(i),t.phrases.forEach(function(t){var e=t.sequence,n=r.metroTicks%e.length;0!==e[n]&&(r.metroTicks<e.length||!t.looping)&&t.callback(i,e[n])}))}),this.metroTicks+=1,this.tickCallback(i)}},t.Metro.prototype.setBPM=function(t,i){var r=e.audiocontext.currentTime;this.tatumTime=60/(t*this.tatums),i=i||0,this.clock.frequency.setValueAtTime(this.clock.frequency.value,r),this.clock.frequency.linearRampToValueAtTime(t,r+i),this.bpm=t},t.Metro.prototype.getBPM=function(){return this.clock.getRate()/this.tatums*60}
1,t.Metro.prototype._init=function(){this.metroTicks=0},t.Metro.prototype.resetSync=function(t){this.syncedParts=[t]},t.Metro.prototype.pushSync=function(t){this.syncedParts.push(t)},t.Metro.prototype.start=function(t){this.clock.start(e.audiocontext.currentTime+(t||0)),this.setBPM(this.bpm)},t.Metro.prototype.stop=function(t){this.clock.stop(e.audiocontext.currentTime+(t||0))},t.Metro.prototype.beatLength=function(t){this.tatums=1/t/4}}(),function(){var e=n,i=120;t.prototype.setBPM=function(t,r){for(var n in i=t,e.parts)e.parts[n]&&e.parts[n].setBPM(t,r)},t.Phrase=function(t,e,i){this.phraseStep=0,this.name=t,this.callback=e,this.sequence=i},t.Part=function(r,n){this.length=r||0,this.partStep=0,this.phrases=[],this.isPlaying=!1,this.noLoop(),this.tatums=n||.0625,this.metro=new t.Metro,this.metro._init(),this.metro.beatLength(this.tatums),this.metro.setBPM(i),e.parts.push(this),this.callback=function(){}},t.Part.prototype.setBPM=function(t,e){this.metro.setBPM(t,e)},t.Part.prototype.getBPM=function(){return this.metro.getBPM()},t.Part.prototype.start=function(t){this.isPlaying||(this.isPlaying=!0,this.metro.resetSync(this),this.metro.start(t||0))},t.Part.prototype.loop=function(t){this.looping=!0,this.onended=function(){this.partStep=0},this.start(t||0)},t.Part.prototype.noLoop=function(){this.looping=!1,this.onended=function(){this.stop()}},t.Part.prototype.stop=function(t){this.partStep=0,this.pause(t)},t.Part.prototype.pause=function(t){this.isPlaying=!1,this.metro.stop(t||0)},t.Part.prototype.addPhrase=function(e,i,r){var n;if(3===arguments.length)n=new t.Phrase(e,i,r);else{if(!(arguments[0]instanceof t.Phrase))throw"invalid input. addPhrase accepts name, callback, array or a p5.Phrase";n=arguments[0]}this.phrases.push(n),n.sequence.length>this.length&&(this.length=n.sequence.length)},t.Part.prototype.removePhrase=function(t){for(var e in this.phrases)this.phrases[e].name===t&&this.phrases.splice(e,1)},t.Part.prototype.getPhrase=function(t){for(var e in this.phrases)if(this.phrases[e].name===t)return this.phrases[e]},t.Part.prototype.replaceSequence=function(t,e){for(var i in this.phrases)this.phrases[i].name===t&&(this.phrases[i].sequence=e)},t.Part.prototype.incrementStep=function(t){this.partStep<this.length-1?(this.callback(t),this.partStep+=1):this.looping||this.partStep!==this.length-1||(console.log("done"),this.onended())},t.Part.prototype.onStep=function(t){this.callback=t},t.Score=function(){this.parts=[],this.currentPart=0;var t=this;for(var e in arguments)arguments[e]&&this.parts[e]&&(this.parts[e]=arguments[e],this.parts[e].nextPart=this.parts[e+1],this.parts[e].onended=function(){var i;t.resetPart(e),(i=t).currentPart++,i.currentPart>=i.parts.length?(i.scoreStep=0,i.onended()):(i.scoreStep=0,i.parts[i.currentPart-1].stop(),i.parts[i.currentPart].start())});this.looping=!1},t.Score.prototype.onended=function(){this.looping?this.parts[0].start():this.parts[this.parts.length-1].onended=function(){this.stop(),this.resetParts()},this.currentPart=0},t.Score.prototype.start=function(){this.parts[this.currentPart].start(),this.scoreStep=0},t.Score.prototype.stop=function(){this.parts[this.currentPart].stop(),this.currentPart=0,this.scoreStep=0},t.Score.prototype.pause=function(){this.parts[this.currentPart].stop()},t.Score.prototype.loop=function(){this.looping=!0,this.start()},t.Score.prototype.noLoop=function(){this.looping=!1},t.Score.prototype.resetParts=function(){this.parts.forEach(function(t){})},t.Score.prototype.resetPart=function(t){for(var e in this.parts[t].stop(),this.parts[t].partStep=0,this.parts[t].phrases)this.parts[t]&&(this.parts[t].phrases[e].phraseStep=0)},t.Score.prototype.setBPM=function(t,e){for(var i in this.parts)this.parts[i]&&this.parts[i].setBPM(t,e)}}(),function(){var e=n,i=S;t.SoundLoop=function(t,r){this.callback=t,this.musicalTimeMode="number"!=typeof this._interval,this._interval=r||1,this._timeSignature=4,this._bpm=60,this.isPlaying=!1,this.maxIterations=1/0;var n=this;this.clock=new i({callback:function(t){var i=t-e.audiocontext.currentTime;i>0&&n.iterations<=n.maxIterations&&n.callback(i)},frequency:this._calcFreq()})},t.SoundLoop.prototype.start=function(t){this.isPlaying||(this.clock.start(e.audiocontext.currentTime+(t||0)),this.isPlaying=!0)},t.SoundLoop.prototype.stop=function(t){this.isPlaying&&(this.clock.stop(e.audiocontext.currentTime+(t||0)),this.isPlaying=!1)},t.SoundLoop.prototype.pause=function(t){this.isPlaying&&(this.clock.pause(e.audiocontext.currentTime+(t||0)),this.isPlaying=!1)},t.SoundLoop.prototype.syncedStart=function(t,i){var r=i||0,n=e.audiocontext.currentTime;t.isPlaying?t.isPlaying&&(this.clock.start(n+(t.clock._nextTick-e.audiocontext.currentTime)),this.isPlaying=!0):(t.clock.start(n+r),t.isPlaying=!0,this.clock.start(n+r),this.isPlaying=!0)},t.SoundLoop.prototype._update=function(){this.clock.frequency.value=this._calcFreq()},t.SoundLoop.prototype._calcFreq=function(){return"number"==typeof this._interval?(this.musicalTimeMode=!1,1/this._interval):"string"==typeof this._interval?(this.musicalTimeMode=!0,this._bpm/60/this._convertNotation(this._interval)*(this._timeSignature/4)):void 0},t.SoundLoop.prototype._convertNotation=function(t){var e=t.slice(-1);switch(t=Number(t.slice(0,-1)),e){case"m":return this._measure(t);case"n":return this._note(t);default:console.warn("Specified interval is not formatted correctly. See Tone.js timing reference for more info: https://github.com/Tonejs/Tone.js/wiki/Time")}},t.SoundLoop.prototype._measure=function(t){return t*this._timeSignature},t.SoundLoop.prototype._note=function(t){return this._timeSignature/t},Object.defineProperty(t.SoundLoop.prototype,"bpm",{get:function(){return this._bpm},set:function(t){this.musicalTimeMode||console.warn('Changing the BPM in "seconds" mode has no effect. BPM is only relevant in musicalTimeMode when the interval is specified as a string ("2n", "4n", "1m"...etc)'),this._bpm=t,this._update()}}),Object.defineProperty(t.SoundLoop.prototype,"timeSignature",{get:function(){return this._timeSignature},set:function(t){this.musicalTimeMode||console.warn('Changing the timeSignature in "seconds" mode has no effect. BPM is only relevant in musicalTimeMode when the interval is specified as a string ("2n", "4n", "1m"...etc)'),this._timeSignature=t,this._update()}}),Object.defineProperty(t.SoundLoop.prototype,"interval",{get:function(){return this._interval},set:function(t){this.musicalTimeMode="Number"!=typeof t,this._interval=t,this._update()}}),Object.defineProperty(t.SoundLoop.prototype,"iterations",{get:function(){return this.clock.ticks}})}(),function(){"use strict";var e=b;t.Compressor=function(){e.call(this),this.compressor=this.ac.createDynamicsCompressor(),this.input.connect(this.compressor),this.compressor.connect(this.wet)},t.Compressor.prototype=Object.create(e.prototype),t.Compressor.prototype.process=function(t,e,
1i,r,n,o){t.connect(this.input),this.set(e,i,r,n,o)},t.Compressor.prototype.set=function(t,e,i,r,n){void 0!==t&&this.attack(t),void 0!==e&&this.knee(e),void 0!==i&&this.ratio(i),void 0!==r&&this.threshold(r),void 0!==n&&this.release(n)},t.Compressor.prototype.attack=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.attack.value=t,this.compressor.attack.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.attack.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):void 0!==t&&t.connect(this.compressor.attack),this.compressor.attack.value},t.Compressor.prototype.knee=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.knee.value=t,this.compressor.knee.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.knee.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):void 0!==t&&t.connect(this.compressor.knee),this.compressor.knee.value},t.Compressor.prototype.ratio=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.ratio.value=t,this.compressor.ratio.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.ratio.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):void 0!==t&&t.connect(this.compressor.ratio),this.compressor.ratio.value},t.Compressor.prototype.threshold=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.threshold.value=t,this.compressor.threshold.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.threshold.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):void 0!==t&&t.connect(this.compressor.threshold),this.compressor.threshold.value},t.Compressor.prototype.release=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.release.value=t,this.compressor.release.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.release.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):"undefined"!=typeof number&&t.connect(this.compressor.release),this.compressor.release.value},t.Compressor.prototype.reduction=function(){return this.compressor.reduction.value},t.Compressor.prototype.dispose=function(){e.prototype.dispose.apply(this),this.compressor&&(this.compressor.disconnect(),delete this.compressor)}}(),function(){var e=n,i=o.convertToWav,r=e.audiocontext;t.SoundRecorder=function(){this.input=r.createGain(),this.output=r.createGain(),this.recording=!1,this.bufferSize=1024,this._channels=2,this._clear(),this._jsNode=r.createScriptProcessor(this.bufferSize,this._channels,2),this._jsNode.onaudioprocess=this._audioprocess.bind(this),this._callback=function(){},this._jsNode.connect(t.soundOut._silentNode),this.setInput(),e.soundArray.push(this)},t.SoundRecorder.prototype.setInput=function(e){this.input.disconnect(),this.input=null,this.input=r.createGain(),this.input.connect(this._jsNode),this.input.connect(this.output),e?e.connect(this.input):t.soundOut.output.connect(this.input)},t.SoundRecorder.prototype.record=function(t,e,i){this.recording=!0,e&&(this.sampleLimit=Math.round(e*r.sampleRate)),t&&i?this._callback=function(){this.buffer=this._getBuffer(),t.setBuffer(this.buffer),i()}:t&&(this._callback=function(){this.buffer=this._getBuffer(),t.setBuffer(this.buffer)})},t.SoundRecorder.prototype.stop=function(){this.recording=!1,this._callback(),this._clear()},t.SoundRecorder.prototype._clear=function(){this._leftBuffers=[],this._rightBuffers=[],this.recordedSamples=0,this.sampleLimit=null},t.SoundRecorder.prototype._audioprocess=function(t){if(!1!==this.recording&&!0===this.recording)if(this.sampleLimit&&this.recordedSamples>=this.sampleLimit)this.stop();else{var e=t.inputBuffer.getChannelData(0),i=t.inputBuffer.getChannelData(1);this._leftBuffers.push(new Float32Array(e)),this._rightBuffers.push(new Float32Array(i)),this.recordedSamples+=this.bufferSize}},t.SoundRecorder.prototype._getBuffer=function(){var t=[];return t.push(this._mergeBuffers(this._leftBuffers)),t.push(this._mergeBuffers(this._rightBuffers)),t}
1,t.SoundRecorder.prototype._mergeBuffers=function(t){for(var e=new Float32Array(this.recordedSamples),i=0,r=t.length,n=0;n<r;n++){var o=t[n];e.set(o,i),i+=o.length}return e},t.SoundRecorder.prototype.dispose=function(){this._clear();var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this._callback=function(){},this.input&&this.input.disconnect(),this.input=null,this._jsNode=null},t.prototype.saveSound=function(e,r){const n=i(e.buffer);t.prototype.writeFile([n],r,"wav")}}(),t.PeakDetect=function(t,e,i,r){this.framesPerPeak=r||20,this.framesSinceLastPeak=0,this.decayRate=.95,this.threshold=i||.35,this.cutoff=0,this.cutoffMult=1.5,this.energy=0,this.penergy=0,this.currentValue=0,this.isDetected=!1,this.f1=t||40,this.f2=e||2e4,this._onPeak=function(){}},t.PeakDetect.prototype.update=function(t){var e=this.energy=t.getEnergy(this.f1,this.f2)/255;e>this.cutoff&&e>this.threshold&&e-this.penergy>0?(this._onPeak(),this.isDetected=!0,this.cutoff=e*this.cutoffMult,this.framesSinceLastPeak=0):(this.isDetected=!1,this.framesSinceLastPeak<=this.framesPerPeak?this.framesSinceLastPeak++:(this.cutoff*=this.decayRate,this.cutoff=Math.max(this.cutoff,this.threshold))),this.currentValue=e,this.penergy=e},t.PeakDetect.prototype.onPeak=function(t,e){var i=this;i._onPeak=function(){t(i.energy,e)}},function(){var e=n;t.Gain=function(){this.ac=e.audiocontext,this.input=this.ac.createGain(),this.output=this.ac.createGain(),this.input.gain.value=.5,this.input.connect(this.output),e.soundArray.push(this)},t.Gain.prototype.setInput=function(t){t.connect(this.input)},t.Gain.prototype.connect=function(e){var i=e||t.soundOut.input;
1this.output.connect(i.input?i.input:i)},t.Gain.prototype.disconnect=function(){this.output&&this.output.disconnect()},t.Gain.prototype.amp=function(t,i,r){i=i||0,r=r||0;var n=e.audiocontext.currentTime,o=this.output.gain.value;this.output.gain.cancelScheduledValues(n),this.output.gain.linearRampToValueAtTime(o,n+r),this.output.gain.linearRampToValueAtTime(t,n+r+i)},t.Gain.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.output&&(this.output.disconnect(),delete this.output),this.input&&(this.input.disconnect(),delete this.input)}}(),M=function(){var e=n;return t.AudioVoice=function(){this.ac=e.audiocontext,this.output=this.ac.createGain(),this.connect(),e.soundArray.push(this)},t.AudioVoice.prototype.play=function(t,e,i,r){},t.AudioVoice.prototype.triggerAttack=function(t,e,i){},t.AudioVoice.prototype.triggerRelease=function(t){},t.AudioVoice.prototype.amp=function(t,e){},t.AudioVoice.prototype.connect=function(t){var i=t||e.input;this.output.connect(i.input?i.input:i)},t.AudioVoice.prototype.disconnect=function(){this.output.disconnect()},t.AudioVoice.prototype.dispose=function(){this.output&&(this.output.disconnect(),delete this.output)},t.AudioVoice}(),function(){var e=n,i=M,r=o.noteToFreq;t.MonoSynth=function(){i.call(this),this.oscillator=new t.Oscillator,this.env=new t.Envelope,this.env.setRange(1,0),this.env.setExp(!0),this.setADSR(.02,.25,.05,.35),this.oscillator.disconnect(),this.oscillator.connect(this.output),this.env.disconnect(),this.env.setInput(this.output.gain),this.oscillator.output.gain.value=1,this.oscillator.start(),this.connect(),e.soundArray.push(this)},t.MonoSynth.prototype=Object.create(t.AudioVoice.prototype),t.MonoSynth.prototype.play=function(t,e,i,r){this.triggerAttack(t,e,~~i),this.triggerRelease(~~i+(r||.15))},t.MonoSynth.prototype.triggerAttack=function(t,e,i){i=~~i;var n=r(t),o=e||.1;this.oscillator.freq(n,0,i),this.env.ramp(this.output.gain,i,o)},t.MonoSynth.prototype.triggerRelease=function(t){this.env.ramp(this.output.gain,t=t||0,0)},t.MonoSynth.prototype.setADSR=function(t,e,i,r){this.env.setADSR(t,e,i,r)},Object.defineProperties(t.MonoSynth.prototype,{attack:{get:function(){return this.env.aTime},set:function(t){this.env.setADSR(t,this.env.dTime,this.env.sPercent,this.env.rTime)}},decay:{get:function(){return this.env.dTime},set:function(t){this.env.setADSR(this.env.aTime,t,this.env.sPercent,this.env.rTime)}},sustain:{get:function(){return this.env.sPercent},set:function(t){this.env.setADSR(this.env.aTime,this.env.dTime,t,this.env.rTime)}},release:{get:function(){return this.env.rTime},set:function(t){this.env.setADSR(this.env.aTime,this.env.dTime,this.env.sPercent,t)}}}),t.MonoSynth.prototype.amp=function(t,e){return void 0!==t&&this.oscillator.amp(t,e||0),this.oscillator.amp().value},t.MonoSynth.prototype.connect=function(t){var i=t||e.input;
1this.output.connect(i.input?i.input:i)},t.MonoSynth.prototype.disconnect=function(){this.output&&this.output.disconnect()},t.MonoSynth.prototype.dispose=function(){i.prototype.dispose.apply(this),this.env&&this.env.dispose(),this.oscillator&&this.oscillator.dispose()}}(),function(){var e=n,i=v,r=o.noteToFreq;t.PolySynth=function(r,n){this.audiovoices=[],this.notes={},this._newest=0,this._oldest=0,this.maxVoices=n||8,this.AudioVoice=void 0===r?t.MonoSynth:r,this._voicesInUse=new i(0),this.output=e.audiocontext.createGain(),this.connect(),this._allocateVoices(),e.soundArray.push(this)},t.PolySynth.prototype._allocateVoices=function(){for(var t=0;t<this.maxVoices;t++)this.audiovoices.push(new this.AudioVoice),this.audiovoices[t].disconnect(),this.audiovoices[t].connect(this.output)},t.PolySynth.prototype.play=function(t,e,i,r){r=r||1,this.noteAttack(t,e,i),this.noteRelease(t,i+r)},t.PolySynth.prototype.noteADSR=function(t,i,r,n,o,s){this.audiovoices[this.notes[t].getValueAtTime(e.audiocontext.currentTime+(s=s||0))].setADSR(i,r,n,o)},t.PolySynth.prototype.setADSR=function(t,e,i,r){this.audiovoices.forEach(function(n){n.setADSR(t,e,i,r)})},t.PolySynth.prototype.noteAttack=function(n,o,s){var a,h=e.audiocontext.currentTime+(s=~~s),l=r(n),u=o||.1;if(this.notes[l]&&null!==this.notes[l].getValueAtTime(h)&&this.noteRelease(l,0),this._voicesInUse.getValueAtTime(h)<this.maxVoices)a=Math.max(~~this._voicesInUse.getValueAtTime(h),0);else{a=this._oldest;var c=t.prototype.freqToMidi(this.audiovoices[this._oldest].oscillator.freq().value);this.noteRelease(c),this._oldest=(this._oldest+1)%(this.maxVoices-1)}this.notes[l]=new i,this.notes[l].setValueAtTime(a,h);var p=null===this._voicesInUse._searchBefore(h)?0:this._voicesInUse._searchBefore(h).value;if(this._voicesInUse.setValueAtTime(p+1,h),this._updateAfter(h,1),this._newest=a,"number"==typeof u){var f=1/this._voicesInUse.getValueAtTime(h)*2;u=u>f?f:u}this.audiovoices[a].triggerAttack(l,u,s)},t.PolySynth.prototype._updateAfter=function(t,e){if(null!==this._voicesInUse._searchAfter(t)){this._voicesInUse._searchAfter(t).value+=e;var i=this._voicesInUse._searchAfter(t).time;this._updateAfter(i,e)}},t.PolySynth.prototype.noteRelease=function(t,i){var n=i||0,o=e.audiocontext.currentTime+n;if(t){var s=r(t);if(this.notes[s]&&null!==this.notes[s].getValueAtTime(o)){var a=Math.max(~~this._voicesInUse.getValueAtTime(o).value,1);this._voicesInUse.setValueAtTime(a-1,o),a>0&&this._updateAfter(o,-1),this.audiovoices[this.notes[s].getValueAtTime(o)].triggerRelease(n),this.notes[s].dispose(),delete this.notes[s],this._newest=0===this._newest?0:(this._newest-1)%(this.maxVoices-1)}else console.warn("Cannot release a note that is not already playing")}else for(var h in this.audiovoices.forEach(function(t){t.triggerRelease(n)}),this._voicesInUse.setValueAtTime(0,o),this.notes)this.notes[h].dispose(),delete this.notes[h]},t.PolySynth.prototype.connect=function(t){var i=t||e.input;
1this.output.connect(i.input?i.input:i)},t.PolySynth.prototype.disconnect=function(){this.output&&this.output.disconnect()},t.PolySynth.prototype.dispose=function(){this.audiovoices.forEach(function(t){t.dispose()}),this.output&&(this.output.disconnect(),delete this.output)}}(),function(){var e=b;function i(t){for(var e,i="number"==typeof t?t:50,r=new Float32Array(44100),n=Math.PI/180,o=0;o<44100;++o)r[o]=(3+i)*(e=2*o/44100-1)*20*n/(Math.PI+i*Math.abs(e));return r}t.Distortion=function(r,n){if(e.call(this),void 0===r&&(r=.25),"number"!=typeof r)throw new Error("amount must be a number");if(void 0===n&&(n="2x"),"string"!=typeof n)throw new Error("oversample must be a String");var o=t.prototype.map(r,0,1,0,2e3);this.waveShaperNode=this.ac.createWaveShaper(),this.amount=o,this.waveShaperNode.curve=i(o),this.waveShaperNode.oversample=n,this.input.connect(this.waveShaperNode),this.waveShaperNode.connect(this.wet)},t.Distortion.prototype=Object.create(e.prototype),t.Distortion.prototype.process=function(t,e,i){t.connect(this.input),this.set(e,i)},t.Distortion.prototype.set=function(e,r){if(e){var n=t.prototype.map(e,0,1,0,2e3);this.amount=n,this.waveShaperNode.curve=i(n)}r&&(this.waveShaperNode.oversample=r)},t.Distortion.prototype.getAmount=function(){return this.amount},t.Distortion.prototype.getOversample=function(){return this.waveShaperNode.oversample},t.Distortion.prototype.dispose=function(){e.prototype.dispose.apply(this),this.waveShaperNode&&(this.waveShaperNode.disconnect(),this.waveShaperNode=null)}}()}),function(t,e){"function"==typeof define&&define.amd?define("p5.dom",["p5"],function(t){e(t)}):"object"==typeof exports?e(require("../p5")):e(t.p5)}(this,function(t){function e(e){var i=document;return"string"==typeof e&&"#"===e[0]?(e=e.slice(1),i=document.getElementById(e)||document):e instanceof t.Element?i=e.elt:e instanceof HTMLElement&&(i=e),i}function i(e,i,r){(i._userNode?i._userNode:document.body).appendChild(e);var n=r?new t.MediaElement(e,i):new t.Element(e,i);return i._elements.push(n),n}function r(t,e,r,n){var o=document.createElement(e);"string"==typeof(r=r||"")&&(r=[r]);for(var s=0;s<r.length;s++){var a=document.createElement("source");a.src=r[s],o.appendChild(a)}if(void 0!==n){var h=function(){n(),o.removeEventListener("canplaythrough",h)};o.addEventListener("canplaythrough",h)}var l=i(o,t,!0);return l.loadedmetadata=!1,o.addEventListener("loadedmetadata",function(){l.width=o.videoWidth,l.height=o.videoHeight,0===l.elt.width&&(l.elt.width=o.videoWidth),0===l.elt.height&&(l.elt.height=o.videoHeight),l.presetPlaybackRate&&(l.elt.playbackRate=l.presetPlaybackRate,delete l.presetPlaybackRate),l.loadedmetadata=!0}),l}t.prototype.select=function(i,r){t._validateParameters("select",arguments);var n=null,o=e(r);return"."===i[0]?(i=i.slice(1),n=(n=o.getElementsByClassName(i)).length?n[0]:null):"#"===i[0]?(i=i.slice(1),n=o.getElementById(i)):n=(n=o.getElementsByTagName(i)).length?n[0]:null,n?this._wrapElement(n):null},t.prototype.selectAll=function(i,r){t._validateParameters("selectAll",arguments);var n,o=[],s=e(r);if("."===i[0]?(i=i.slice(1),n=s.getElementsByClassName(i)):n=s.getElementsByTagName(i),n)for(var a=0;a<n.length;a++){var h=this._wrapElement(n[a]);o.push(h)}return o},t.prototype._wrapElement=function(e){var i=Array.prototype.slice.call(e.children);if("INPUT"===e.tagName&&"checkbox"===e.type){var r=new t.Element(e,this);return r.checked=function(){return 0===arguments.length?this.elt.checked:(this.elt.checked=!!arguments[0],this)},r}return"VIDEO"===e.tagName||"AUDIO"===e.tagName?new t.MediaElement(e,this):"SELECT"===e.tagName?this.createSelect(new t.Element(e,this)):i.length>0&&i.every(function(t){return"INPUT"===t.tagName||"LABEL"===t.tagName})?this.createRadio(new t.Element(e,this)):new t.Element(e,this)},t.prototype.removeElements=function(e){t._validateParameters("removeElements",arguments);for(var i=0;i<this._elements.length;i++)this._elements[i].elt instanceof HTMLCanvasElement||this._elements[i].remove()},t.Element.prototype.changed=function(e){return t.Element._adjustListener("change",e,this),this},t.Element.prototype.input=function(e){return t.Element._adjustListener("input",e,this),this},["div","p","span"].forEach(function(e){var r="create"+e.charAt(0).toUpperCase()+e.slice(1);t.prototype[r]=function(t){var r=document.createElement(e);return r.innerHTML=void 0===t?"":t,i(r,this)}}),t.prototype.createImg=function(){t._validateParameters("createImg",arguments);var e=document.createElement("img");e.crossOrigin="Anonymous";var r,n=arguments;return e.src=n[0],n.length>1&&"string"==typeof n[1]&&(e.alt=n[1]),e.onload=function(){r.width=e.offsetWidth||e.width,r.height=e.offsetHeight||e.height,n.length>1&&"function"==typeof n[1]?(r.fn=n[1],r.fn()):n.length>1&&"function"==typeof n[2]&&(r.fn=n[2],r.fn())},r=i(e,this)},t.prototype.createA=function(e,r,n){t._validateParameters("createA",arguments);var o=document.createElement("a");return o.href=e,o.innerHTML=r,n&&(o.target=n),i(o,this)},t.prototype.createSlider=function(e,r,n,o){t._validateParameters("createSlider",arguments);var s=document.createElement("input");return s.type="range",s.min=e,s.max=r,0===o?s.step=1e-18:o&&(s.step=o),"number"==typeof n&&(s.value=n),i(s,this)},t.prototype.createButton=function(e,r){t._validateParameters("createButton",arguments);var n=document.createElement("button");return n.innerHTML=e,r&&(n.value=r),i(n,this)},t.prototype.createCheckbox=function(){t._validateParameters("createCheckbox",arguments);var e=document.createElement("div"),r=document.createElement("input");r.type="checkbox",e.appendChild(r);var n=i(e,this);if(n.checked=function(){var t=n.elt.getElementsByTagName("input")[0];if(t){if(0===arguments.length)return t.checked;t.checked=!!arguments[0]}return n},this.value=function(t){return n.value=t,this},arguments[0]){var o=Math.random().toString(36).slice(2),s=document.createElement("label");r.setAttribute("id",o),s.htmlFor=o,n.value(arguments[0]),s.appendChild(document.createTextNode(arguments[0])),e.appendChild(s)}return arguments[1]&&(r.checked=!0),n},t.prototype.createSelect=function(){var e,r;t._validateParameters("createSelect",arguments);var n=arguments[0];return"object"==typeof n&&"SELECT"===n.elt.nodeName?(r=n,e=this.elt=n.elt):(e=document.createElement("select"),n&&"boolean"==typeof n&&e.setAttribute("multiple","true"),r=i(e,this)),r.option=function(t,i){for(var r,n=0;n<this.elt.length;n++)if(this.elt[n].innerHTML===t){r=n;break}if(void 0!==r)!1===i?this.elt.remove(r):this.elt[r].innerHTML===this.elt[r].value?this.elt[r].innerHTML=this.elt[r].value=i:this.elt[r].value=i;else{var o=document.createElement("option");o.innerHTML=t,o.value=arguments.length>1?i:t,e.appendChild(o)}},r.selected=function(t){var e,i=[];if(arguments.length>0){for(e=0;e<this.elt.length;e++)t.toString()===this.elt[e].value&&(this.elt.selectedIndex=e);return this}if(this.elt.getAttribute("multiple")){for(e=0;e<this.elt.selectedOptions.length;e++)i.push(this.elt.selectedOptions[e].value);return i}return this.elt.value},r},t.prototype.createRadio=function(e){t._validateParameters("createRadio",arguments);var r,n,o=document.querySelectorAll("input[type=radio]"),s=0;if(o.length>1){var a=o.length,h=o[0].name,l=o[1].name;s=1;for(var u=1;u<a;u++)h!==(l=o[u].name)&&s++,h=l}else 1===o.length&&(s=1);"object"==typeof e?(n=e,r=this.elt=e.elt):(r=document.createElement("div"),n=i(r,this)),n._getInputChildrenArray=function(){return Array.prototype.slice.call(this.elt.children).filter(function(t){return"INPUT"===t.tagName})};var c=-1;return n.option=function(t,e){var i=document.createElement("input");if(i.type="radio",i.innerHTML=t,i.value=e||t,i.setAttribute("name","defaultradio"+s),r.appendChild(i),t){c++;var n=document.createElement("label");i.setAttribute("id","defaultradio"+s+"-"+c),n.htmlFor="defaultradio"+s+"-"+c,n.appendChild(document.createTextNode(t)),r.appendChild(n)}return i},n.selected=function(t){var e,i=n._getInputChildrenArray();if(t){for(e=0;e<i.length;e++)i[e].value===t&&(i[e].checked=!0);return this}for(e=0;e<i.length;e++)if(!0===i[e].checked)return i[e].value},n.value=function(t){var e,i=n._getInputChildrenArray();if(t){for(e=0;e<i.length;e++)i[e].value===t&&(i[e].checked=!0);return this}for(e=0;e<i.length;e++)if(!0===i[e].checked)return i[e].value;return""},n},t.prototype.createColorPicker=function(e){t._validateParameters("createColorPicker",arguments);var r,n=document.createElement("input");return n.type="color",e?e instanceof t.Color?n.value=e.toString("#rrggbb"):(t.prototype._colorMode="rgb",t.prototype._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},n.value=t.prototype.color(e).toString("#rrggbb")):n.value="#000000",(r=i(n,this)).color=function(){return e.mode&&(t.prototype._colorMode=e.mode),e.maxes&&(t.prototype._colorMaxes=e.maxes),t.prototype.color(this.elt.value)},r},t.prototype.createInput=function(e,r){t._validateParameters("createInput",arguments);var n=document.createElement("input");return n.type=r||"text",e&&(n.value=e),i(n,this)},t.prototype.createFileInput=function(e,r){if(t._validateParameters("createFileInput",arguments),window.File&&window.FileReader&&window.FileList&&window.Blob){var n=document.createElement("input");return n.type="file",r&&(n.multiple="multiple"),n.addEventListener("change",function(i){for(var r=i.target.files,n=0;n<r.length;n++)t.File._load(r[n],e)},!1),i(n,this)}console.log("The File APIs are not fully supported in this browser. C
1annot create element.")},t.prototype.createVideo=function(e,i){return t._validateParameters("createVideo",arguments),r(this,"video",e,i)},t.prototype.createAudio=function(e,i){return t._validateParameters("createAudio",arguments),r(this,"audio",e,i)},t.prototype.VIDEO="video",t.prototype.AUDIO="audio",void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(t){var e=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return e?new Promise(function(i,r){e.call(navigator,t,i,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),t.prototype.createCapture=function(){t._validateParameters("createCapture",arguments);for(var e,r,n=!0,o=!0,s=0;s<arguments.length;s++)arguments[s]===t.prototype.VIDEO?o=!1:arguments[s]===t.prototype.AUDIO?n=!1:"object"==typeof arguments[s]?e=arguments[s]:"function"==typeof arguments[s]&&(r=arguments[s]);if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)throw"getUserMedia not supported in this browser";var a=document.createElement("video");a.setAttribute("playsinline",""),e||(e={video:n,audio:o}),navigator.mediaDevices.getUserMedia(e).then(function(t){try{"srcObject"in a?a.srcObject=t:a.src=window.URL.createObjectURL(t)}catch(e){a.src=t}},function(t){console.log(t)});var h=i(a,this,!0);return h.loadedmetadata=!1,a.addEventListener("loadedmetadata",function(){a.play(),a.width?(h.width=a.videoWidth=a.width,h.height=a.videoHeight=a.height):(h.width=h.elt.width=a.videoWidth,h.height=h.elt.height=a.videoHeight),h.loadedmetadata=!0,r&&r(a.srcObject)}),h},t.prototype.createElement=function(e,r){t._validateParameters("createElement",arguments);var n=document.createElement(e);return void 0!==r&&(n.innerHTML=r),i(n,this)},t.Element.prototype.addClass=function(t){return this.elt.className?this.hasClass(t)||(this.elt.className=this.elt.className+" "+t):this.elt.className=t,this},t.Element.prototype.removeClass=function(t){return this.elt.classList.remove(t),this},t.Element.prototype.hasClass=function(t){return this.elt.classList.contains(t)},t.Element.prototype.toggleClass=function(t){return this.elt.classList.contains(t)?this.elt.classList.remove(t):this.elt.classList.add(t),this},t.Element.prototype.child=function(e){return void 0===e?this.elt.childNodes:("string"==typeof e?("#"===e[0]&&(e=e.substring(1)),e=document.getElementById(e)):e instanceof t.Element&&(e=e.elt),this.elt.appendChild(e),this)},t.Element.prototype.center=function(t){var e=this.elt.style.display,i="none"===this.elt.style.display,r="none"===this.parent().style.display,n={x:this.elt.offsetLeft,y:this.elt.offsetTop};i&&this.show(),this.elt.style.display="block",this.position(0,0),r&&(this.parent().style.display="block");var o=Math.abs(this.parent().offsetWidth-this.elt.offsetWidth),s=Math.abs(this.parent().offsetHeight-this.elt.offsetHeight),a=n.y,h=n.x;return"both"===t||void 0===t?this.position(o/2,s/2):"horizontal"===t?this.position(o/2,a):"vertical"===t&&this.position(h,s/2),this.style("display",e),i&&this.hide(),r&&(this.parent().style.display="none"),this},t.Element.prototype.html=function(){return 0===arguments.length?this.elt.innerHTML:arguments[1]?(this.elt.innerHTML+=arguments[0],this):(this.elt.innerHTML=arguments[0],this)},t.Element.prototype.position=function(){return 0===arguments.length?{x:this.elt.offsetLeft,y:this.elt.offsetTop}:(this.elt.style.position="absolute",this.elt.style.left=arguments[0]+"px",this.elt.style.top=arguments[1]+"px",this.x=arguments[0],this.y=arguments[1],this)},t.Element.prototype._translate=function(){this.elt.style.position="absolute";var t="";return this.elt.style.transform&&(t=(t=this.elt.style.transform.replace(/translate3d\(.*\)/g,"")).replace(/translate[X-Z]?\(.*\)/g,"")),2===arguments.length?this.elt.style.transform="translate("+arguments[0]+"px, "+arguments[1]+"px)":arguments.length>2&&(this.elt.style.transform="translate3d("+arguments[0]+"px,"+arguments[1]+"px,"+arguments[2]+"px)",this.elt.parentElement.style.perspective=3===arguments.length?"1000px":arguments[3]+"px"),this.elt.style.transform+=t,this},t.Element.prototype._rotate=function(){var t="";return this.elt.style.transform&&(t=(t=this.elt.style.transform.replace(/rotate3d\(.*\)/g,"")).replace(/rotate[X-Z]?\(.*\)/g,"")),1===arguments.length?this.elt.style.transform="rotate("+
1arguments[0]+"deg)":2===arguments.length?this.elt.style.transform="rotate("+arguments[0]+"deg, "+arguments[1]+"deg)":3===arguments.length&&(this.elt.style.transform="rotateX("+arguments[0]+"deg)",this.elt.style.transform+="rotateY("+arguments[1]+"deg)",this.elt.style.transform+="rotateZ("+arguments[2]+"deg)"),this.elt.style.transform+=t,this},t.Element.prototype.style=function(e,i){if(i instanceof t.Color&&(i="rgba("+i.levels[0]+","+i.levels[1]+","+i.levels[2]+","+i.levels[3]/255+")"),void 0===i){if(-1===e.indexOf(":"))return window.getComputedStyle(this.elt).getPropertyValue(e);for(var r=e.split(";"),n=0;n<r.length;n++){var o=r[n].split(":");o[0]&&o[1]&&(this.elt.style[o[0].trim()]=o[1].trim())}}else if(this.elt.style[e]=i,"width"===e||"height"===e||"left"===e||"top"===e){var s=i.replace(/\D+/g,"");this[e]=parseInt(s,10)}return this},t.Element.prototype.attribute=function(t,e){if(null==this.elt.firstChild||"checkbox"!==this.elt.firstChild.type&&"radio"!==this.elt.firstChild.type)return void 0===e?this.elt.getAttribute(t):(this.elt.setAttribute(t,e),this);if(void 0===e)return this.elt.firstChild.getAttribute(t);for(var i=0;i<this.elt.childNodes.length;i++)this.elt.childNodes[i].setAttribute(t,e)},t.Element.prototype.removeAttribute=function(t){if(null!=this.elt.firstChild&&("checkbox"===this.elt.firstChild.type||"radio"===this.elt.firstChild.type))for(var e=0;e<this.elt.childNodes.length;e++)this.elt.childNodes[e].removeAttribute(t);return this.elt.removeAttribute(t),this},t.Element.prototype.value=function(){return arguments.length>0?(this.elt.value=arguments[0],this):"range"===this.elt.type?parseFloat(this.elt.value):this.elt.value},t.Element.prototype.show=function(){return this.elt.style.display="block",this},t.Element.prototype.hide=function(){return this.elt.style.display="none",this},t.Element.prototype.size=function(e,i){if(0===arguments.length)return{width:this.elt.offsetWidth,height:this.elt.offsetHeight};var r=e,n=i,o=t.prototype.AUTO;if(r!==o||n!==o){if(r===o?r=i*this.width/this.height:n===o&&(n=e*this.height/this.width),this.elt instanceof HTMLCanvasElement){var s,a={},h=this.elt.getContext("2d");for(s in h)a[s]=h[s];for(s in this.elt.setAttribute("width",r*this._pInst._pixelDensity),this.elt.setAttribute("height",n*this._pInst._pixelDensity),this.elt.style.width=r+"px",this.elt.style.height=n+"px",this._pInst.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),a)this.elt.getContext("2d")[s]=a[s]}else this.elt.style.width=r+"px",this.elt.style.height=n+"px",this.elt.width=r,this.elt.height=n;this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this._pInst&&this._pInst._curElement&&this._pInst._curElement.elt===this.elt&&(this._pInst._setProperty("width",this.elt.offsetWidth),this._pInst._setProperty("height",this.elt.offsetHeight))}return this},t.Element.prototype.remove=function(){for(var t in this._events)this.elt.removeEventListener(t,this._events[t]);this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt)},t.Element.prototype.drop=function(e,i){if(window.File&&window.FileReader&&window.FileList&&window.Blob){if(!this._dragDisabled){this._dragDisabled=!0;var r=function(t){t.preventDefault()};this.elt.addEventListener("dragover",r),this.elt.addEventListener("dragleave",r)}t.Element._attachListener("drop",function(r){r.preventDefault(),"function"==typeof i&&i.call(this,r);for(var n=r.dataTransfer.files,o=0;o<n.length;o++)t.File._load(n[o],e)},this)}else console.log("The File APIs are not fully supported in this browser.");return this},t.MediaElement=function(e,i){t.Element.call(this,e,i);var r=this;this.elt.crossOrigin="anonymous",this._prevTime=0,this._cueIDCounter=0,this._cues=[],this._pixelsState=this,this._pixelDensity=1,this._modified=!1,this._pixelsDirty=!0,this._pixelsTime=-1,Object.defineProperty(r,"src",{get:function(){var t=r.elt.children[0].src,e=r.elt.src===window.location.href?"":r.elt.src;return t===window.location.href?e:t},set:function(t){for(var i=0;i<r.elt.children.length;i++)r.elt.removeChild(r.elt.children[i]);var n=document.createElement("source");n.src=t,e.appendChild(n),r.elt.src=t,r.modified=!0}}),r._onended=function(){}
1,r.elt.onended=function(){r._onended(r)}},t.MediaElement.prototype=Object.create(t.Element.prototype),t.MediaElement.prototype.play=function(){var t;return this.elt.currentTime===this.elt.duration&&(this.elt.currentTime=0),this.elt.readyState>1?t=this.elt.play():(this.elt.load(),t=this.elt.play()),t&&t.catch&&t.catch(function(t){console.log("WARN: Element play method raised an error asynchronously",t)}),this},t.MediaElement.prototype.stop=function(){return this.elt.pause(),this.elt.currentTime=0,this},t.MediaElement.prototype.pause=function(){return this.elt.pause(),this},t.MediaElement.prototype.loop=function(){return this.elt.setAttribute("loop",!0),this.play(),this},t.MediaElement.prototype.noLoop=function(){return this.elt.setAttribute("loop",!1),this},t.MediaElement.prototype.autoplay=function(t){return this.elt.setAttribute("autoplay",t),this},t.MediaElement.prototype.volume=function(t){if(void 0===t)return this.elt.volume;this.elt.volume=t},t.MediaElement.prototype.speed=function(t){if(void 0===t)return this.presetPlaybackRate||this.elt.playbackRate;this.loadedmetadata?this.elt.playbackRate=t:this.presetPlaybackRate=t},t.MediaElement.prototype.time=function(t){return void 0===t?this.elt.currentTime:(this.elt.currentTime=t,this)},t.MediaElement.prototype.duration=function(){return this.elt.duration},t.MediaElement.prototype.pixels=[],t.MediaElement.prototype._ensureCanvas=function(){if(this.canvas||(this.canvas=document.createElement("canvas"),this.drawingContext=this.canvas.getContext("2d"),this.setModified(!0)),this.loadedmetadata){this.canvas.width!==this.elt.width&&(this.canvas.width=this.elt.width,this.canvas.height=this.elt.height,this.width=this.canvas.width,this.height=this.canvas.height,this._pixelsDirty=!0);var t=this.elt.currentTime;(this._pixelsDirty||this._pixelsTime!==t)&&(this._pixelsTime=t,this._pixelsDirty=!0,this.drawingContext.drawImage(this.elt,0,0,this.canvas.width,this.canvas.height),this.setModified(!0))}},t.MediaElement.prototype.loadPixels=function(){return this._ensureCanvas(),t.Renderer2D.prototype.loadPixels.apply(this,arguments)},t.MediaElement.prototype.updatePixels=function(e,i,r,n){return this.loadedmetadata&&(this._ensureCanvas(),t.Renderer2D.prototype.updatePixels.call(this,e,i,r,n)),this.setModified(!0),this},t.MediaElement.prototype.get=function(){return this._ensureCanvas(),t.Renderer2D.prototype.get.apply(this,arguments)},t.MediaElement.prototype._getPixel=function(){return this.loadPixels(),t.Renderer2D.prototype._getPixel.apply(this,arguments)},t.MediaElement.prototype.set=function(e,i,r){this.loadedmetadata&&(this._ensureCanvas(),t.Renderer2D.prototype.set.call(this,e,i,r),this.setModified(!0))},t.MediaElement.prototype.copy=function(){this._ensureCanvas(),t.Renderer2D.prototype.copy.apply(this,arguments)},t.MediaElement.prototype.mask=function(){this.loadPixels(),this.setModified(!0),t.Image.prototype.mask.apply(this,arguments)},t.MediaElement.prototype.isModified=function(){return this._modified},t.MediaElement.prototype.setModified=function(t){this._modified=t},t.MediaElement.prototype.onended=function(t){return this._onended=t,this},t.MediaElement.prototype.connect=function(e){var i,r;if("function"==typeof t.prototype.getAudioContext)i=t.prototype.getAudioContext(),r=t.soundOut.input;else try{r=(i=e.context).destination}catch(n){throw"connect() is meant to be used with Web Audio API or p5.sound.js"}this.audioSourceNode||(this.audioSourceNode=i.createMediaElementSource(this.elt),this.audioSourceNode.connect(r)),this.audioSourceNode.connect(e?e.input?e.input:e:r)},t.MediaElement.prototype.disconnect=function(){if(!this.audioSourceNode)throw"nothing to disconnect";this.audioSourceNode.disconnect()},t.MediaElement.prototype.showControls=function(){this.elt.style["text-align"]="inherit",this.elt.controls=!0},t.MediaElement.prototype.hideControls=function(){this.elt.controls=!1};var n=function(t,e,i,r){this.callback=t,this.time=e,this.id=i,this.val=r};t.MediaElement.prototype.addCue=function(t,e,i){var r=this._cueIDCounter++,o=new n(e,t,r,i);return this._cues.push(o),this.elt.ontimeupdate||(this.elt.ontimeupdate=this._onTimeUpdate.bind(this)),r},t.MediaElement.prototype.removeCue=function(t){for(var e=0;e<this._cues.length;e++)this._cues[e].id===t&&(console.log(t),this._cues.splice(e,1));0===this._cues.length&&(this.elt.ontimeupdate=null)},t.MediaElement.prototype.clearCues=function(){this._cues=[],this.elt.ontimeupdate=null}
1,t.MediaElement.prototype._onTimeUpdate=function(){for(var t=this.time(),e=0;e<this._cues.length;e++){var i=this._cues[e].time;this._prevTime<i&&i<=t&&this._cues[e].callback(this._cues[e].val)}this._prevTime=t},t.File=function(t,e){this.file=t,this._pInst=e;var i=t.type.split("/");this.type=i[0],this.subtype=i[1],this.name=t.name,this.size=t.size,this.data=void 0},t.File._createLoader=function(e,i){var r=new FileReader;return r.onload=function(r){var n=new t.File(e);n.data=r.target.result,i(n)},r},t.File._load=function(e,i){if(/^text\//.test(e.type))t.File._createLoader(e,i).readAsText(e);else if(/^(video|audio)\//.test(e.type)){var r=new t.File(e);r.data=URL.createObjectURL(e),i(r)}else t.File._createLoader(e,i).readAsDataURL(e)}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.