+ ${a("run",`fa-play-circle ${r}`,n("toolbar.run"),"editor: eval all")}
+ ${a("clear",`fa fa-trash ${r}`,n("toolbar.clear"),"clear all")}
+ ${h}
+ ${a("shuffle","fa-random",n("toolbar.shuffle"),"gallery:showExample")}
+ ${a("mutator",`fa-dice ${r}`,n("toolbar.random"),"editor: randomize")}
+ ${e.serverURL===null?"":a("share",`fa-upload ${r}`,n("toolbar.upload"),"gallery:shareSketch")}
+ ${f}
+
`}const fM=({content:e,header:t},r,n)=>{r.translation;const o=r.translation.selectedLanguage==="ar"&&r.showInfo===!0?"rtl":"ltr";return At`
+
+

+
+
+
{r("extensions: load example",t,0)}} style="cursor:pointer">${e.name} - ${e.author}
+
${e.description}
+
+
`,pM=(e,t)=>{const{categories:r,selectedCategoryIndex:n}=e.extensions,o=r[n].entries,{t:a}=e.translation,f=At`
+${Co(a("extensions.about-extensions"))}
+
+${o.map((p,v)=>hM(p,v,t,a))}
+
+
+`,h=At`
+ ${r.map((p,v)=>At`
t("extensions: select category",v)}
+ >${p.name}
`)}
+
`;return{content:f,header:h}},Ni=e=>`href=${e} target=_blank`,dM=e=>At`
+
+
${e("info.title")}
+
${e("info.subtitle")}
+
///////////////////////////////////////////////////////////
+
${e("info.description")}
+
${e("info.get-started-title")}
+ - ${e("info.get-started-list.0")}
+ - ${e("info.get-started-list.1")}
+ - ${e("info.get-started-list.2")}
+
+
+
+
///////////////////////////////////////////////////////////
+ ${e("info.description-detailed")}
+
+
${e("info.uses")}
+${e("info.uses-list",{returnObjects:!0}).map(t=>At`- ${t}
`)}
+
+
+
${Co(e("info.author",{author:"href=https://ojack.xyz class=olivia target=_blank"}))}
+
${Co(e("info.more-info",{docs:Ni("https://hydra.ojack.xyz/docs"),functions:Ni("https://hydra.ojack.xyz/api"),gallery:Ni("https://twitter.com/hydra_patterns"),repo:Ni("https://github.com/hydra-synth/hydra"),pixeljam:Ni("http://pixeljam.glitch.me/"),garden:Ni("https://hydra.ojack.xyz/garden"),"hydra-book":Ni("https://hydra-book.glitch.me/"),tutorials:Ni("https://github.com/ojack/hydra/blob/master/examples/README.md")}))}
+
${Co(e("info.more-info-forums",{discord:Ni("https://discord.gg/ZQjfHkNHXC"),facebook:Ni("https://www.facebook.com/groups/1084288351771117/")}))}
+
+
${Co(e("info.support",{"open-collective":Ni("https://opencollective.com/hydra-synth")}))}
+
`;function gM(e,t){const{t:r,languages:n}=e.translation,o=Object.entries(n),a=At`
`,f=At`
+ ${e.showInfo&&o.length>1?At`
${o.map(([p,v])=>At`
+
t("set language",p)}>${v}
+ `)}
`:At`
`}
+ ${dM(r)}
+ `,h=e.showExtensions?pM(e,t):{content:f,header:a};return fM(h,e,t)}var xg=typeof gt<"u"?gt:typeof window<"u"?window:{},yM=bs,To;typeof document<"u"?To=document:(To=xg["__GLOBAL_DOCUMENT_CACHE@4"],To||(To=xg["__GLOBAL_DOCUMENT_CACHE@4"]=yM));var Qm=To,Zl={exports:{}},Eo;typeof window<"u"?Eo=window:typeof gt<"u"?Eo=gt:typeof self<"u"?Eo=self:Eo={};var mM=Eo,_f=Qm,Sg=mM,jt=Object.create(null),Ym="onloadid"+Math.random().toString(36).slice(2),Sn="data-"+Ym,wf=0;if(Sg&&Sg.MutationObserver){var vM=new MutationObserver(function(e){if(!(Object.keys(jt).length<1))for(var t=0;t
0&&Sc(e[n].childNodes,t)}}var bM=Zl.exports,xM=Zm;class Hm extends Error{}Hm.prototype.name="AssertionError";function Zm(e,t){if(!e){var r=new Hm(t);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zm),r}}const $m=Qm,ko=$c,SM=ym,fh=bM,Mc=xM,MM=fh.KEY_ID,CM=fh.KEY_ATTR;var TM=li;function EM(){return"ncid-"+Math.floor((1+Math.random())*65536).toString(16).substring(1)}li.makeID=EM;function li(e){this._hasWindow=typeof window<"u",this._id=null,this._ncID=null,this._olID=null,this._proxy=null,this._loaded=!1,this._rootNodeName=null,this._name=e||"nanocomponent",this._rerender=!1,this._handleLoad=this._handleLoad.bind(this),this._handleUnload=this._handleUnload.bind(this),this._arguments=[];const t=this;Object.defineProperty(this,"element",{get:function(){const r=$m.getElementById(t._id);if(r)return r.dataset.nanocomponent===t._ncID?r:void 0}})}li.prototype.render=function(){const e=ko(this._name+".render"),t=this,r=new Array(arguments.length);let n;for(let o=0;o{o.setup=()=>{o.createCanvas(t,r,o[n])},o.draw=()=>{}},"hydra-ui"),this.width=t,this.height=r,this.mode=n,this.canvas.style.position="absolute",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvas.style.zIndex=-1}show(){this.canvas.style.visibility="visible"}hide(){this.canvas.style.visibility="hidden"}clear(){this.drawingContext.clearRect(0,0,this.canvas.width,this.canvas.height)}}var Cc={exports:{}},RM=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],qm=function(t){var r=t,n=t.indexOf("["),o=t.indexOf("]");n!=-1&&o!=-1&&(t=t.substring(0,n)+t.substring(n,o).replace(/:/g,";")+t.substring(o,t.length));for(var a=RM.exec(t||""),f={},h=14;h--;)f[LM[h]]=a[h]||"";return n!=-1&&o!=-1&&(f.source=r,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=UM(f,f.path),f.queryKey=IM(f,f.query),f};function UM(e,t){var r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&n.splice(0,1),t.substr(t.length-1,1)=="/"&&n.splice(n.length-1,1),n}function IM(e,t){var r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,a){o&&(r[o]=a)}),r}var Tc={exports:{}},Ec={exports:{}},Do=1e3,jo=Do*60,Po=jo*60,Go=Po*24,JM=Go*365.25,NM=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return OM(e);if(r==="number"&&isNaN(e)===!1)return t.long?FM(e):BM(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function OM(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*JM;case"days":case"day":case"d":return r*Go;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Po;case"minutes":case"minute":case"mins":case"min":case"m":return r*jo;case"seconds":case"second":case"secs":case"sec":case"s":return r*Do;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function BM(e){return e>=Go?Math.round(e/Go)+"d":e>=Po?Math.round(e/Po)+"h":e>=jo?Math.round(e/jo)+"m":e>=Do?Math.round(e/Do)+"s":e+"ms"}function FM(e){return il(e,Go,"day")||il(e,Po,"hour")||il(e,jo,"minute")||il(e,Do,"second")||e+" ms"}function il(e,t,r){if(!(e=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(p){try{return JSON.stringify(p)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}};function n(p){var v=this.useColors;if(p[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+p[0]+(v?"%c ":" ")+"+"+t.humanize(this.diff),!!v){var _="color: "+this.color;p.splice(1,0,_,"color: inherit");var y=0,m=0;p[0].replace(/%[a-zA-Z%]/g,function(x){x!=="%%"&&(y++,x==="%c"&&(m=y))}),p.splice(m,0,_)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(p){try{p==null?t.storage.removeItem("debug"):t.storage.debug=p}catch{}}function f(){var p;try{p=t.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}t.enable(f());function h(){try{return window.localStorage}catch{}}})(Tc,Tc.exports);var $l=Tc.exports,jM=qm,Tg=$l("socket.io-client:url"),PM=GM;function GM(e,t){var r=e;t=t||typeof location<"u"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(Tg("protocol-less url %s",e),typeof t<"u"?e=t.protocol+"//"+e:e="https://"+e),Tg("parse %s",e),r=jM(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var n=r.host.indexOf(":")!==-1,o=n?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port,r.href=r.protocol+"://"+o+(t&&t.port===r.port?"":":"+r.port),r}var Xl={},kc={exports:{}},Ac={exports:{}},Wo=1e3,Ko=Wo*60,Vo=Ko*60,zo=Vo*24,WM=zo*365.25,KM=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return VM(e);if(r==="number"&&isNaN(e)===!1)return t.long?QM(e):zM(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function VM(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*WM;case"days":case"day":case"d":return r*zo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Vo;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ko;case"seconds":case"second":case"secs":case"sec":case"s":return r*Wo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function zM(e){return e>=zo?Math.round(e/zo)+"d":e>=Vo?Math.round(e/Vo)+"h":e>=Ko?Math.round(e/Ko)+"m":e>=Wo?Math.round(e/Wo)+"s":e+"ms"}function QM(e){return rl(e,zo,"day")||rl(e,Vo,"hour")||rl(e,Ko,"minute")||rl(e,Wo,"second")||e+" ms"}function rl(e,t,r){if(!(e=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(p){try{return JSON.stringify(p)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}};function n(p){var v=this.useColors;if(p[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+p[0]+(v?"%c ":" ")+"+"+t.humanize(this.diff),!!v){var _="color: "+this.color;p.splice(1,0,_,"color: inherit");var y=0,m=0;p[0].replace(/%[a-zA-Z%]/g,function(x){x!=="%%"&&(y++,x==="%c"&&(m=y))}),p.splice(m,0,_)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(p){try{p==null?t.storage.removeItem("debug"):t.storage.debug=p}catch{}}function f(){var p;try{p=t.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}t.enable(f());function h(){try{return window.localStorage}catch{}}})(kc,kc.exports);var HM=kc.exports,ql={},ZM={}.toString,e0=Array.isArray||function(e){return ZM.call(e)=="[object Array]"},t0=eC,$M=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",XM=typeof ArrayBuffer=="function",qM=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function eC(e){return $M&&Buffer.isBuffer(e)||XM&&(e instanceof ArrayBuffer||qM(e))}var ch=e0,i0=t0,r0=Object.prototype.toString,tC=typeof Blob=="function"||typeof Blob<"u"&&r0.call(Blob)==="[object BlobConstructor]",iC=typeof File=="function"||typeof File<"u"&&r0.call(File)==="[object FileConstructor]";ql.deconstructPacket=function(e){var t=[],r=e.data,n=e;return n.data=Rc(r,t),n.attachments=t.length,{packet:n,buffers:t}};function Rc(e,t){if(!e)return e;if(i0(e)){var r={_placeholder:!0,num:t.length};return t.push(e),r}else if(ch(e)){for(var n=new Array(e.length),o=0;o=0&&e.numn&&(r=n),t>=n||t>=r||n===0)return new ArrayBuffer(0);for(var o=new Uint8Array(e),a=new Uint8Array(r-t),f=t,h=0;f=55296&&o<=56319&&r65535&&(n-=65536,o+=Dr(n>>>10&1023|55296),n=56320|n&1023),o+=Dr(n);return o}function l0(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function bf(e,t){return Dr(e>>t&63|128)}function mC(e,t){if(!(e&4294967168))return Dr(e);var r="";return e&4294965248?e&4294901760?e&4292870144||(r=Dr(e>>18&7|240),r+=bf(e,12),r+=bf(e,6)):(l0(e,t)||(e=65533),r=Dr(e>>12&15|224),r+=bf(e,6)):r=Dr(e>>6&31|192),r+=Dr(e&63|128),r}function vC(e,t){t=t||{};for(var r=t.strict!==!1,n=a0(e),o=n.length,a=-1,f,h="";++a=Nl)throw Error("Invalid byte index");var e=Jl[Pr]&255;if(Pr++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function _C(e){var t,r,n,o,a;if(Pr>Nl)throw Error("Invalid byte index");if(Pr==Nl)return!1;if(t=Jl[Pr]&255,Pr++,!(t&128))return t;if((t&224)==192){if(r=ts(),a=(t&31)<<6|r,a>=128)return a;throw Error("Invalid continuation byte")}if((t&240)==224){if(r=ts(),n=ts(),a=(t&15)<<12|r<<6|n,a>=2048)return l0(a,e)?a:65533;throw Error("Invalid continuation byte")}if((t&248)==240&&(r=ts(),n=ts(),o=ts(),a=(t&7)<<18|r<<12|n<<6|o,a>=65536&&a<=1114111))return a;throw Error("Invalid UTF-8 detected")}var Jl,Nl,Pr;function wC(e,t){t=t||{};var r=t.strict!==!1;Jl=a0(e),Nl=Jl.length,Pr=0;for(var n=[],o;(o=_C(r))!==!1;)n.push(o);return yC(n)}var bC={version:"2.1.2",encode:vC,decode:wC},nl={},Eg;function xC(){return Eg||(Eg=1,function(e){nl.encode=function(t){var r=new Uint8Array(t),n,o=r.length,a="";for(n=0;n>2],a+=e[(r[n]&3)<<4|r[n+1]>>4],a+=e[(r[n+1]&15)<<2|r[n+2]>>6],a+=e[r[n+2]&63];return o%3===2?a=a.substring(0,a.length-1)+"=":o%3===1&&(a=a.substring(0,a.length-2)+"=="),a},nl.decode=function(t){var r=t.length*.75,n=t.length,o,a=0,f,h,p,v;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);var _=new ArrayBuffer(r),y=new Uint8Array(_);for(o=0;o>4,y[a++]=(h&15)<<4|p>>2,y[a++]=(p&3)<<6|v&63;return _}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),nl}var xf,kg;function SC(){if(kg)return xf;kg=1;var e=typeof e<"u"?e:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,t=function(){try{var h=new Blob(["hi"]);return h.size===2}catch{return!1}}(),r=t&&function(){try{var h=new Blob([new Uint8Array([1,2])]);return h.size===2}catch{return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function o(h){return h.map(function(p){if(p.buffer instanceof ArrayBuffer){var v=p.buffer;if(p.byteLength!==v.byteLength){var _=new Uint8Array(p.byteLength);_.set(new Uint8Array(v,p.byteOffset,p.byteLength)),v=_.buffer}return v}return p})}function a(h,p){p=p||{};var v=new e;return o(h).forEach(function(_){v.append(_)}),p.type?v.getBlob(p.type):v.getBlob()}function f(h,p){return new Blob(o(h),p||{})}return typeof Blob<"u"&&(a.prototype=Blob.prototype,f.prototype=Blob.prototype),xf=function(){return t?r?Blob:f:n?a:void 0}(),xf}(function(e){var t=oC,r=s0,n=hC,o=pC,a=bC,f;typeof ArrayBuffer<"u"&&(f=xC());var h=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),p=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),v=h||p;e.protocol=3;var _=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},y=t(_),m={type:"error",data:"parser error"},x=SC();e.encodePacket=function(O,P,F,V){typeof P=="function"&&(V=P,P=!1),typeof F=="function"&&(V=F,F=null);var D=O.data===void 0?void 0:O.data.buffer||O.data;if(typeof ArrayBuffer<"u"&&D instanceof ArrayBuffer)return R(O,P,V);if(typeof x<"u"&&D instanceof x)return g(O,P,V);if(D&&D.base64)return U(O,V);var ee=_[O.type];return O.data!==void 0&&(ee+=F?a.encode(String(O.data),{strict:!1}):String(O.data)),V(""+ee)};function U(O,P){var F="b"+e.packets[O.type]+O.data.data;return P(F)}function R(O,P,F){if(!P)return e.encodeBase64Packet(O,F);var V=O.data,D=new Uint8Array(V),ee=new Uint8Array(1+V.byteLength);ee[0]=_[O.type];for(var A=0;A1?{type:y[D],data:O.substring(1)}:{type:y[D]}}var V=new Uint8Array(O),D=V[0],ee=n(O,1);return x&&P==="blob"&&(ee=new x([ee])),{type:y[D],data:ee}};function L(O){try{O=a.decode(O,{strict:!1})}catch{return!1}return O}e.decodeBase64Packet=function(O,P){var F=y[O.charAt(0)];if(!f)return{type:F,data:{base64:!0,data:O.substr(1)}};var V=f.decode(O.substr(1));return P==="blob"&&x&&(V=new x([V])),{type:F,data:V}},e.encodePayload=function(O,P,F){typeof P=="function"&&(F=P,P=null);var V=r(O);if(P&&V)return x&&!v?e.encodePayloadAsBlob(O,F):e.encodePayloadAsArrayBuffer(O,F);if(!O.length)return F("0:");function D(A){return A.length+":"+A}function ee(A,q){e.encodePacket(A,V?P:!1,!1,function($){q(null,D($))})}G(O,ee,function(A,q){return F(q.join(""))})};function G(O,P,F){for(var V=new Array(O.length),D=o(O.length,F),ee=function(q,$,ce){P($,function(ye,re){V[q]=re,ce(ye,V)})},A=0;A0;){for(var ee=new Uint8Array(V),A=ee[0]===0,q="",$=1;ee[$]!==255;$++){if(q.length>310)return F(m,0,1);q+=ee[$]}V=n(V,2+q.length),q=parseInt(q);var ce=n(V,0,q);if(A)try{ce=String.fromCharCode.apply(null,new Uint8Array(ce))}catch{var ye=new Uint8Array(ce);ce="";for(var $=0;$0);return t}function MC(e){var t=0;for(Gr=0;Gr0)return EC(e);if(r==="number"&&isNaN(e)===!1)return t.long?AC(e):kC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function EC(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*CC;case"days":case"day":case"d":return r*Zo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ho;case"minutes":case"minute":case"mins":case"min":case"m":return r*Yo;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function kC(e){return e>=Zo?Math.round(e/Zo)+"d":e>=Ho?Math.round(e/Ho)+"h":e>=Yo?Math.round(e/Yo)+"m":e>=Qo?Math.round(e/Qo)+"s":e+"ms"}function AC(e){return sl(e,Zo,"day")||sl(e,Ho,"hour")||sl(e,Yo,"minute")||sl(e,Qo,"second")||e+" ms"}function sl(e,t,r){if(!(e=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(p){try{return JSON.stringify(p)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}};function n(p){var v=this.useColors;if(p[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+p[0]+(v?"%c ":" ")+"+"+t.humanize(this.diff),!!v){var _="color: "+this.color;p.splice(1,0,_,"color: inherit");var y=0,m=0;p[0].replace(/%[a-zA-Z%]/g,function(x){x!=="%%"&&(y++,x==="%c"&&(m=y))}),p.splice(m,0,_)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(p){try{p==null?t.storage.removeItem("debug"):t.storage.debug=p}catch{}}function f(){var p;try{p=t.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}t.enable(f());function h(){try{return window.localStorage}catch{}}})(Jc,Jc.exports);var iu=Jc.exports,h0=yh(),LC=Ss,p0=Tn,UC=tu,IC=c0,Fi=iu("engine.io-client:polling"),d0=sr,JC=function(){var e=dh,t=new e({xdomain:!1});return t.responseType!=null}();function sr(e){var t=e&&e.forceBase64;(!JC||t)&&(this.supportsBinary=!1),h0.call(this,e)}UC(sr,h0);sr.prototype.name="polling";sr.prototype.doOpen=function(){this.poll()};sr.prototype.pause=function(e){var t=this;this.readyState="pausing";function r(){Fi("paused"),t.readyState="paused",e()}if(this.polling||!this.writable){var n=0;this.polling&&(Fi("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){Fi("pre-pause polling complete"),--n||r()})),this.writable||(Fi("we are currently writing - waiting to pause"),n++,this.once("drain",function(){Fi("pre-pause writing complete"),--n||r()}))}else r()};sr.prototype.poll=function(){Fi("polling"),this.polling=!0,this.doPoll(),this.emit("poll")};sr.prototype.onData=function(e){var t=this;Fi("polling got data %s",e);var r=function(n,o,a){if(t.readyState==="opening"&&n.type==="open"&&t.onOpen(),n.type==="close")return t.onClose(),!1;t.onPacket(n)};p0.decodePayload(e,this.socket.binaryType,r),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Fi('ignoring poll - transport state "%s"',this.readyState))};sr.prototype.doClose=function(){var e=this;function t(){Fi("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?(Fi("transport open - closing"),t()):(Fi("transport not open - deferring close"),this.once("open",t))};sr.prototype.write=function(e){var t=this;this.writable=!1;var r=function(){t.writable=!0,t.emit("drain")};p0.encodePayload(e,this.supportsBinary,function(n){t.doWrite(n,r)})};sr.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",r="";this.timestampRequests!==!1&&(e[this.timestampParam]=IC()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=LC.encode(e),this.port&&(t==="https"&&Number(this.port)!==443||t==="http"&&Number(this.port)!==80)&&(r=":"+this.port),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+e};var NC=dh,g0=d0,OC=Cn,BC=tu,Oc=iu("engine.io-client:polling-xhr"),FC=ph;gh.exports=Ms;gh.exports.Request=Jt;function Ug(){}function Ms(e){if(g0.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var t=location.protocol==="https:",r=location.port;r||(r=t?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==t}}BC(Ms,g0);Ms.prototype.supportsBinary=!0;Ms.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new Jt(e)};Ms.prototype.doWrite=function(e,t){var r=typeof e!="string"&&e!==void 0,n=this.request({method:"POST",data:e,isBinary:r}),o=this;n.on("success",t),n.on("error",function(a){o.onError("xhr post error",a)}),this.sendXhr=n};Ms.prototype.doPoll=function(){Oc("xhr poll");var e=this.request(),t=this;e.on("data",function(r){t.onData(r)}),e.on("error",function(r){t.onError("xhr poll error",r)}),this.pollXhr=e};function Jt(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}OC(Jt.prototype);Jt.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new NC(e),r=this;try{Oc("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(var n in this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&t.setRequestHeader(n,this.extraHeaders[n])}}catch{}if(this.method==="POST")try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{t.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){r.onLoad()},t.onerror=function(){r.onError(t.responseText)}):t.onreadystatechange=function(){if(t.readyState===2)try{var o=t.getResponseHeader("Content-Type");(r.supportsBinary&&o==="application/octet-stream"||o==="application/octet-stream; charset=UTF-8")&&(t.responseType="arraybuffer")}catch{}t.readyState===4&&(t.status===200||t.status===1223?r.onLoad():setTimeout(function(){r.onError(typeof t.status=="number"?t.status:0)},0))},Oc("xhr data %s",this.data),t.send(this.data)}catch(o){setTimeout(function(){r.onError(o)},0);return}typeof document<"u"&&(this.index=Jt.requestsCount++,Jt.requests[this.index]=this)};Jt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()};Jt.prototype.onData=function(e){this.emit("data",e),this.onSuccess()};Jt.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)};Jt.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Ug:this.xhr.onreadystatechange=Ug,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Jt.requests[this.index],this.xhr=null}};Jt.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch{}t==="application/octet-stream"||t==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(r){this.onError(r)}e!=null&&this.onData(e)};Jt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR};Jt.prototype.abort=function(){this.cleanup()};Jt.requestsCount=0;Jt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ig);else if(typeof addEventListener=="function"){var DC="onpagehide"in FC?"pagehide":"unload";addEventListener(DC,Ig,!1)}}function Ig(){for(var e in Jt.requests)Jt.requests.hasOwnProperty(e)&&Jt.requests[e].abort()}var jC=gh.exports,vh=d0,PC=tu,Jg=ph,GC=Cs,WC=/\n/g,KC=/\\n/g,ol;function VC(){}function Cs(e){vh.call(this,e),this.query=this.query||{},ol||(ol=Jg.___eio=Jg.___eio||[]),this.index=ol.length;var t=this;ol.push(function(r){t.onData(r)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=VC)},!1)}PC(Cs,vh);Cs.prototype.supportsBinary=!1;Cs.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),vh.prototype.doClose.call(this)};Cs.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(o){e.onError("jsonp poll error",o)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t;var n=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);n&&setTimeout(function(){var o=document.createElement("iframe");document.body.appendChild(o),document.body.removeChild(o)},100)};Cs.prototype.doWrite=function(e,t){var r=this;if(!this.form){var n=document.createElement("form"),o=document.createElement("textarea"),a=this.iframeId="eio_iframe_"+this.index,f;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=a,n.method="POST",n.setAttribute("accept-charset","utf-8"),o.name="d",n.appendChild(o),document.body.appendChild(n),this.form=n,this.area=o}this.form.action=this.uri();function h(){p(),t()}function p(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(_){r.onError("jsonp polling iframe removal error",_)}try{var v='