function onSubmit_contact(a){var b=document.getElementById("contact-form");if($(b).hasClass("has-validation-callback")){if($(b).isValid()){$(".footer-form").hide();$.ajax({url:$(b).attr("action"),type:"POST",data:$(b).serialize(),success:function(c){obj=JSON.parse(c);if(obj.Status=="OK"){showOverlay({Contents:'

Thank you for your interest!

'})}else{if(obj.Status=="RECAPTCHA"){showOverlay({Contents:'

ReCaptcha Failed!

'})}else{}}},error:function(c){showOverlay({Contents:'

Failed to send contact request!

'})}})}}}$(document).ready(function(){$(".js-start").on("click",function(a){window.open("http://designer.galatent.co.uk/login","3D Designer","menubar=no,location=no,resizable=yes,scrollbars=yes,status=yes")});$(".js-register").on("click",function(a){window.open("http://designer.galatent.co.uk/register","Register 3D Designer","menubar=no,location=no,resizable=yes,scrollbars=yes,status=yes")});$(".menu-bars").click(function(a){$(".links").toggleClass("open");if($(".links").hasClass("open")){$(".links").addClass("animated fadeIn")}else{$(".links").removeClass("animated fadeIn")}})});$(document).ready(function(){$.validate({addValidClassOnAll:true,modules:"security",onSuccess:function(a){return true}})});$(function(){$(".lazy").Lazy()});$(document).ready(function(){try{$(".popup-gallery").magnificPopup({delegate:"a",type:"image",tLoading:"Loading image #%curr%...",mainClass:"mfp-img-mobile",gallery:{enabled:true,navigateByImgClick:true,preload:[0,1]},image:{tError:'The image #%curr% could not be loaded.',titleSrc:function(b){return""+b.el.attr("title")+"

"+b.el.data("description")+"

"}}})}catch(a){}});new WOW().init(); /*! * Socket.IO v2.3.0 * (c) 2014-2019 Guillermo Rauch * Released under the MIT License. */ !function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.io=b():a.io=b()}(this,function(){return function(a){function b(d){if(c[d]){return c[d].exports}var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(l,h,f){function b(y,w){"object"==typeof y&&(w=y,y=void 0),w=w||{};var o,a=d(y),q=a.source,x=a.id,c=a.path,s=j[x]&&c in j[x].nsps,v=w.forceNew||w["force new connection"]||!1===w.multiplex||s;return v?(k("ignoring socket cache for %s",q),o=m(q,w)):(j[x]||(k("new io instance for %s",q),j[x]=m(q,w)),o=j[x]),a.query&&!w.query&&(w.query=a.query),o.socket(a.path,w)}var d=f(1),g=f(7),m=f(15),k=f(3)("socket.io-client");l.exports=h=b;var j=h.managers={};h.protocol=g.protocol,h.connect=b,h.Manager=f(15),h.Socket=f(39)},function(b,d,g){function c(h,k){var l=h;k=k||"undefined"!=typeof location&&location,null==h&&(h=k.protocol+"//"+k.host),"string"==typeof h&&("/"===h.charAt(0)&&(h="/"===h.charAt(1)?k.protocol+h:k.host+h),/^(https?|wss?):\/\//.test(h)||(a("protocol-less url %s",h),h="undefined"!=typeof k?k.protocol+"//"+h:"https://"+h),a("parse %s",h),l=f(h)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";var j=l.host.indexOf(":")!==-1,i=j?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+i+":"+l.port,l.href=l.protocol+"://"+i+(k&&k.port===l.port?"":":"+l.port),l}var f=g(2),a=g(3)("socket.io-client:url");b.exports=c},function(a,c){var d=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,b=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];a.exports=function(h){var k=h,l=h.indexOf("["),g=h.indexOf("]");l!=-1&&g!=-1&&(h=h.substring(0,l)+h.substring(l,g).replace(/:/g,";")+h.substring(g,h.length));for(var j=d.exec(h||""),f={},m=14;m--;){f[b[m]]=j[m]||""}return l!=-1&&g!=-1&&(f.source=k,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f}},function(a,b,c){(function(d){function f(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function g(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+a.exports.humanize(this.diff),this.useColors){var q="color: "+this.color;i.splice(1,0,q,"color: inherit");var h=0,p=0;i[0].replace(/%[a-zA-Z%]/g,function(o){"%%"!==o&&(h++,"%c"===o&&(p=h))}),i.splice(p,0,q)}}function n(){var h;return"object"===("undefined"==typeof console?"undefined":e(console))&&console.log&&(h=console).log.apply(h,arguments)}function l(h){try{h?b.storage.setItem("debug",h):b.storage.removeItem("debug")}catch(i){}}function k(){var h=void 0;try{h=b.storage.getItem("debug")}catch(i){}return !h&&"undefined"!=typeof d&&"env" in d&&(h=d.env.DEBUG),h}function m(){try{return localStorage}catch(h){}}var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h};b.log=n,b.formatArgs=g,b.save=l,b.load=k,b.useColors=f,b.storage=m(),b.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.exports=c(5)(b);var j=a.exports.formatters;j.j=function(h){try{return JSON.stringify(h)}catch(i){return"[UnexpectedJSONParseError]: "+i.message}}}).call(b,c(4))},function(G,A){function k(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}function j(a){if(g===setTimeout){return setTimeout(a,0)}if((g===k||!g)&&setTimeout){return g=setTimeout,setTimeout(a,0)}try{return g(a,0)}catch(c){try{return g.call(null,a,0)}catch(c){return g.call(this,a,0)}}}function w(a){if(x===clearTimeout){return clearTimeout(a)}if((x===b||!x)&&clearTimeout){return x=clearTimeout,clearTimeout(a)}try{return x(a)}catch(c){try{return x.call(null,a)}catch(c){return x.call(this,a)}}}function H(){D&&v&&(D=!1,v.length?B=v.concat(B):q=-1,B.length&&E())}function E(){if(!D){var a=j(H);D=!0;for(var c=B.length;c;){for(v=B,B=[];++q1){for(var d=1;d100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(h){var i=parseFloat(h[1]),c=(h[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return i*k;case"weeks":case"week":case"w":return i*d;case"days":case"day":case"d":return i*v;case"hours":case"hour":case"hrs":case"hr":case"h":return i*m;case"minutes":case"minute":case"mins":case"min":case"m":return i*q;case"seconds":case"second":case"secs":case"sec":case"s":return i*x;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function b(a){var c=Math.abs(a);return c>=v?Math.round(a/v)+"d":c>=m?Math.round(a/m)+"h":c>=q?Math.round(a/q)+"m":c>=x?Math.round(a/x)+"s":a+"ms"}function f(a){var c=Math.abs(a);return c>=v?j(a,c,v,"day"):c>=m?j(a,c,m,"hour"):c>=q?j(a,c,q,"minute"):c>=x?j(a,c,x,"second"):a+" ms"}function j(a,h,p,c){var i=h>=1.5*p;return Math.round(a/p)+" "+c+(i?"s":"")}var x=1000,q=60*x,m=60*q,v=24*m,d=7*v,k=365.25*v;w.exports=function(c,h){h=h||{};var a=typeof c;if("string"===a&&c.length>0){return g(c)}if("number"===a&&isFinite(c)){return h["long"]?f(c):b(c)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))}},function(k,G,z){function v(){}function x(a){var d=""+a.type;if(G.BINARY_EVENT!==a.type&&G.BINARY_ACK!==a.type||(d+=a.attachments+"-"),a.nsp&&"/"!==a.nsp&&(d+=a.nsp+","),null!=a.id&&(d+=a.id),null!=a.data){var c=C(a.data);if(c===!1){return E}d+=c}return F("encoded %j as %s",a,d),d}function C(a){try{return JSON.stringify(a)}catch(c){return !1}}function q(a,c){function d(f){var h=H.deconstructPacket(f),g=x(h.packet),e=h.buffers;e.unshift(g),c(e)}H.removeBlobs(a,d)}function J(){this.reconstructor=null}function I(f){var p=0,h={type:Number(f.charAt(0))};if(null==G.types[h.type]){return D("unknown packet type "+h.type)}if(G.BINARY_EVENT===h.type||G.BINARY_ACK===h.type){for(var l="";"-"!==f.charAt(++p)&&(l+=f.charAt(p),p!=f.length);){}if(l!=Number(l)||"-"!==f.charAt(p)){throw new Error("Illegal attachments")}h.attachments=Number(l)}if("/"===f.charAt(p+1)){for(h.nsp="";++p;){var e=f.charAt(p);if(","===e){break}if(h.nsp+=e,p===f.length){break}}}else{h.nsp="/"}var g=f.charAt(p+1);if(""!==g&&Number(g)==g){for(h.id="";++p;){var e=f.charAt(p);if(null==e||Number(e)!=e){--p;break}if(h.id+=f.charAt(p),p===f.length){break}}h.id=Number(h.id)}if(f.charAt(++p)){var d=j(f.substr(p)),m=d!==!1&&(h.type===G.ERROR||b(d));if(!m){return D("invalid payload")}h.data=d}return F("decoded %s as %j",f,h),h}function j(a){try{return JSON.parse(a)}catch(c){return !1}}function w(a){this.reconPack=a,this.buffers=[]}function D(a){return{type:G.ERROR,data:"parser error: "+a}}var F=z(8)("socket.io-parser"),B=z(11),H=z(12),b=z(13),A=z(14);G.protocol=4,G.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],G.CONNECT=0,G.DISCONNECT=1,G.EVENT=2,G.ACK=3,G.ERROR=4,G.BINARY_EVENT=5,G.BINARY_ACK=6,G.Encoder=v,G.Decoder=J;var E=G.ERROR+'"encode error"';v.prototype.encode=function(a,d){if(F("encoding packet %j",a),G.BINARY_EVENT===a.type||G.BINARY_ACK===a.type){q(a,d)}else{var c=x(a);d([c])}},B(J.prototype),J.prototype.add=function(a){var c;if("string"==typeof a){c=I(a),G.BINARY_EVENT===c.type||G.BINARY_ACK===c.type?(this.reconstructor=new w(c),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",c)):this.emit("decoded",c)}else{if(!A(a)&&!a.base64){throw new Error("Unknown type: "+a)}if(!this.reconstructor){throw new Error("got binary data when not reconstructing a packet")}c=this.reconstructor.takeBinaryData(a),c&&(this.reconstructor=null,this.emit("decoded",c))}},J.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},w.prototype.takeBinaryData=function(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){var c=H.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),c}return null},w.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(a,b,c){(function(h){function k(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function f(p){var u=this.useColors;if(p[0]=(u?"%c":"")+this.namespace+(u?" %c":" ")+p[0]+(u?"%c ":" ")+"+"+b.humanize(this.diff),u){var q="color: "+this.color;p.splice(1,0,q,"color: inherit");var s=0,m=0;p[0].replace(/%[a-zA-Z%]/g,function(i){"%%"!==i&&(s++,"%c"===i&&(m=s))}),p.splice(m,0,q)}}function g(){return"object"===("undefined"==typeof console?"undefined":j(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function d(i){try{null==i?b.storage.removeItem("debug"):b.storage.debug=i}catch(m){}}function l(){var i;try{i=b.storage.debug}catch(m){}return !i&&"undefined"!=typeof h&&"env" in h&&(i=h.env.DEBUG),i}function e(){try{return window.localStorage}catch(i){}}var j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(i){return typeof i}:function(i){return i&&"function"==typeof Symbol&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};b=a.exports=c(9),b.log=g,b.formatArgs=f,b.save=d,b.load=l,b.useColors=k,b.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:e(),b.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],b.formatters.j=function(i){try{return JSON.stringify(i)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}},b.enable(l())}).call(b,c(4))},function(m,h,f){function b(a){var e,c=0;for(e in a){c=(c<<5)-c+a.charCodeAt(e),c|=0}return h.colors[Math.abs(c)%h.colors.length]}function d(a){function e(){if(e.enabled){var v=e,x=+new Date,q=x-(c||x);v.diff=q,v.prev=c,v.curr=x,c=x;for(var w=new Array(arguments.length),n=0;n100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(i){var o=parseFloat(i[1]),c=(i[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return o*d;case"days":case"day":case"d":return o*m;case"hours":case"hour":case"hrs":case"hr":case"h":return o*k;case"minutes":case"minute":case"mins":case"min":case"m":return o*l;case"seconds":case"second":case"secs":case"sec":case"s":return o*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function b(a){return a>=m?Math.round(a/m)+"d":a>=k?Math.round(a/k)+"h":a>=l?Math.round(a/l)+"m":a>=v?Math.round(a/v)+"s":a+"ms"}function f(a){return h(a,m,"day")||h(a,k,"hour")||h(a,l,"minute")||h(a,v,"second")||a+" ms"}function h(a,c,i){if(!(a0){return g(c)}if("number"===a&&isNaN(c)===!1){return n["long"]?f(c):b(c)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))}},function(a,c,f){function b(e){if(e){return d(e)}}function d(g){for(var h in b.prototype){g[h]=b.prototype[h]}return g}a.exports=b,b.prototype.on=b.prototype.addEventListener=function(g,h){return this._callbacks=this._callbacks||{},(this._callbacks["$"+g]=this._callbacks["$"+g]||[]).push(h),this},b.prototype.once=function(g,h){function i(){this.off(g,i),h.apply(this,arguments)}return i.fn=h,this.on(g,i),this},b.prototype.off=b.prototype.removeListener=b.prototype.removeAllListeners=b.prototype.removeEventListener=function(g,i){if(this._callbacks=this._callbacks||{},0==arguments.length){return this._callbacks={},this}var k=this._callbacks["$"+g];if(!k){return this}if(1==arguments.length){return delete this._callbacks["$"+g],this}for(var h,j=0;j0&&!this.encoding){var a=this.packetBuffer.shift();this.packet(a)}},b.prototype.cleanup=function(){d("cleanup");for(var a=this.subs.length,c=0;c=this._reconnectionAttempts){d("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1}else{var c=this.backoff.duration();d("will wait %dms before reconnect attempt",c),this.reconnecting=!0;var f=setTimeout(function(){a.skipReconnect||(d("attempting reconnect"),a.emitAll("reconnect_attempt",a.backoff.attempts),a.emitAll("reconnecting",a.backoff.attempts),a.skipReconnect||a.open(function(h){h?(d("reconnect attempt error"),a.reconnecting=!1,a.reconnect(),a.emitAll("reconnect_error",h.data)):(d("reconnect success"),a.onreconnect())}))},c);this.subs.push({destroy:function(){clearTimeout(f)}})}},b.prototype.onreconnect=function(){var a=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",a)}},function(a,b,c){a.exports=c(17),a.exports.parser=c(24)},function(w,l,g){function b(a,c){return this instanceof b?(c=c||{},a&&"object"==typeof a&&(c=a,a=null),a?(a=d(a),c.hostname=a.host,c.secure="https"===a.protocol||"wss"===a.protocol,c.port=a.port,a.query&&(c.query=a.query)):c.host&&(c.hostname=d(c.host).host),this.secure=null!=c.secure?c.secure:"undefined"!=typeof location&&"https:"===location.protocol,c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.agent=c.agent||!1,this.hostname=c.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=c.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=c.query||{},"string"==typeof this.query&&(this.query=k.decode(this.query)),this.upgrade=!1!==c.upgrade,this.path=(c.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!c.forceJSONP,this.jsonp=!1!==c.jsonp,this.forceBase64=!!c.forceBase64,this.enablesXDR=!!c.enablesXDR,this.withCredentials=!1!==c.withCredentials,this.timestampParam=c.timestampParam||"t",this.timestampRequests=c.timestampRequests,this.transports=c.transports||["polling","websocket"],this.transportOptions=c.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=c.policyPort||843,this.rememberUpgrade=c.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=c.onlyBinaryUpgrades,this.perMessageDeflate=!1!==c.perMessageDeflate&&(c.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=c.pfx||null,this.key=c.key||null,this.passphrase=c.passphrase||null,this.cert=c.cert||null,this.ca=c.ca||null,this.ciphers=c.ciphers||null,this.rejectUnauthorized=void 0===c.rejectUnauthorized||c.rejectUnauthorized,this.forceNode=!!c.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(c.extraHeaders&&Object.keys(c.extraHeaders).length>0&&(this.extraHeaders=c.extraHeaders),c.localAddress&&(this.localAddress=c.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,void this.open()):new b(a,c)}function f(a){var c={};for(var h in a){a.hasOwnProperty(h)&&(c[h]=a[h])}return c}var j=g(18),x=g(11),q=g(3)("engine.io-client:socket"),m=g(38),v=g(24),d=g(2),k=g(32);w.exports=b,b.priorWebsocketSuccess=!1,x(b.prototype),b.protocol=v.protocol,b.Socket=b,b.Transport=g(23),b.transports=g(18),b.parser=g(24),b.prototype.createTransport=function(a){q('creating transport "%s"',a);var h=f(this.query);h.EIO=v.protocol,h.transport=a;var i=this.transportOptions[a]||{};this.id&&(h.sid=this.id);var c=new j[a]({query:h,socket:this,agent:i.agent||this.agent,hostname:i.hostname||this.hostname,port:i.port||this.port,secure:i.secure||this.secure,path:i.path||this.path,forceJSONP:i.forceJSONP||this.forceJSONP,jsonp:i.jsonp||this.jsonp,forceBase64:i.forceBase64||this.forceBase64,enablesXDR:i.enablesXDR||this.enablesXDR,withCredentials:i.withCredentials||this.withCredentials,timestampRequests:i.timestampRequests||this.timestampRequests,timestampParam:i.timestampParam||this.timestampParam,policyPort:i.policyPort||this.policyPort,pfx:i.pfx||this.pfx,key:i.key||this.key,passphrase:i.passphrase||this.passphrase,cert:i.cert||this.cert,ca:i.ca||this.ca,ciphers:i.ciphers||this.ciphers,rejectUnauthorized:i.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:i.perMessageDeflate||this.perMessageDeflate,extraHeaders:i.extraHeaders||this.extraHeaders,forceNode:i.forceNode||this.forceNode,localAddress:i.localAddress||this.localAddress,requestTimeout:i.requestTimeout||this.requestTimeout,protocols:i.protocols||void 0,isReactNative:this.isReactNative});return c},b.prototype.open=function(){var a;if(this.rememberUpgrade&&b.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1){a="websocket"}else{if(0===this.transports.length){var c=this;return void setTimeout(function(){c.emit("error","No transports available")},0)}a=this.transports[0]}this.readyState="opening";try{a=this.createTransport(a)}catch(h){return this.transports.shift(),void this.open()}a.open(),this.setTransport(a)},b.prototype.setTransport=function(a){q("setting transport %s",a.name);var c=this;this.transport&&(q("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=a,a.on("drain",function(){c.onDrain()}).on("packet",function(e){c.onPacket(e)}).on("error",function(e){c.onError(e)}).on("close",function(){c.onClose("transport close")})},b.prototype.probe=function(F){function C(){if(B.onlyBinaryUpgrades){var c=!this.supportsBinary&&B.transport.supportsBinary;A=A||c}A||(q('probe transport "%s" opened',F),a.send([{type:"ping",data:"probe"}]),a.once("packet",function(h){if(!A){if("pong"===h.type&&"probe"===h.data){if(q('probe transport "%s" pong',F),B.upgrading=!0,B.emit("upgrading",a),!a){return}b.priorWebsocketSuccess="websocket"===a.name,q('pausing current transport "%s"',B.transport.name),B.transport.pause(function(){A||"closed"!==B.readyState&&(q("changing transport and sending upgrade packet"),E(),B.setTransport(a),a.send([{type:"upgrade"}]),B.emit("upgrade",a),a=null,B.upgrading=!1,B.flush())})}else{q('probe transport "%s" failed',F);var i=new Error("probe error");i.transport=a.name,B.emit("upgradeError",i)}}}))}function y(){A||(A=!0,E(),a.close(),a=null)}function r(h){var c=new Error("probe error: "+h);c.transport=a.name,y(),q('probe transport "%s" failed because of error: %s',F,h),B.emit("upgradeError",c)}function z(){r("transport closed")}function G(){r("socket closed")}function D(c){a&&c.name!==a.name&&(q('"%s" works - aborting "%s"',c.name,a.name),y())}function E(){a.removeListener("open",C),a.removeListener("error",r),a.removeListener("close",z),B.removeListener("close",G),B.removeListener("upgrading",D)}q('probing transport "%s"',F);var a=this.createTransport(F,{probe:1}),A=!1,B=this;b.priorWebsocketSuccess=!1,a.once("open",C),a.once("error",r),a.once("close",z),this.once("close",G),this.once("upgrading",D),a.open()},b.prototype.onOpen=function(){if(q("socket open"),this.readyState="open",b.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){q("starting upgrade probes");for(var a=0,c=this.upgrades.length;a1?{type:Q[e],data:b.substring(1)}:{type:Q[e]}:B}var a=new Uint8Array(b),e=a[0],c=M(b,1);return k&&"blob"===f&&(c=new k([c])),{type:Q[e],data:c}},N.decodeBase64Packet=function(a,c){var d=Q[a.charAt(0)];if(!x){return{type:d,data:{base64:!0,data:a.substr(1)}}}var b=x.decode(a.substr(1));return"blob"===c&&k&&(b=new k([b])),{type:d,data:b}},N.encodePayload=function(b,f,d){function e(g){return g.length+":"+g}function a(g,h){N.encodePacket(g,!!c&&f,!1,function(i){h(null,e(i))})}"function"==typeof f&&(d=f,f=null);var c=K(b);return f&&c?k&&!L?N.encodePayloadAsBlob(b,d):N.encodePayloadAsArrayBuffer(b,d):b.length?void P(b,a,function(g,h){return d(h.join(""))}):d("0:")},N.decodePayload=function(y,f,b){if("string"!=typeof y){return N.decodePayloadAsBinary(y,f,b)}"function"==typeof f&&(b=f,f=null);var e;if(""===y){return b(B,0,1)}for(var g,C,v="",m=0,w=y.length;m0;){for(var V=new Uint8Array(f),S=0===V[0],C="",T=1;255!==V[T];T++){if(C.length>310){return b(B,0,1)}C+=V[T]}f=M(f,2+C.length),C=parseInt(C);var e=M(f,0,C);if(S){try{e=String.fromCharCode.apply(null,new Uint8Array(e))}catch(w){var m=new Uint8Array(e);e="";for(var T=0;Th&&(l=h),j>=h||j>=l||0===h){return new ArrayBuffer(0)}for(var k=new Uint8Array(f),d=new Uint8Array(l-j),g=j,c=0;g=55296&&f<=56319&&h65535&&(d-=65536,f+=y(d>>>10&1023|55296),d=56320|1023&d),f+=y(d)}return f}function j(a,c){if(a>=55296&&a<=57343){if(c){throw Error("Lone surrogate U+"+a.toString(16).toUpperCase()+" is not a scalar value")}return !1}return !0}function q(a,c){return y(a>>c&63|128)}function D(a,c){if(0==(4294967168&a)){return y(a)}var d="";return 0==(4294965248&a)?d=y(a>>6&31|192):0==(4294901760&a)?(j(a,c)||(a=65533),d=y(a>>12&15|224),d+=q(a,6)):0==(4292870144&a)&&(d=y(a>>18&7|240),d+=q(a,12),d+=q(a,6)),d+=y(63&a|128)}function A(l,p){p=p||{};for(var n,s=!1!==p.strict,h=k(l),d=h.length,E=-1,f="";++E=w){throw Error("Invalid byte index")}var a=255&v[m];if(m++,128==(192&a)){return 63&a}throw Error("Invalid continuation byte")}function B(c){var h,l,f,a,d;if(m>w){throw Error("Invalid byte index")}if(m==w){return !1}if(h=255&v[m],m++,0==(128&h)){return h}if(192==(224&h)){if(l=z(),d=(31&h)<<6|l,d>=128){return d}throw Error("Invalid continuation byte")}if(224==(240&h)){if(l=z(),f=z(),d=(15&h)<<12|l<<6|f,d>=2048){return j(d,c)?d:65533}throw Error("Invalid continuation byte")}if(240==(248&h)&&(l=z(),f=z(),a=z(),d=(7&h)<<18|l<<12|f<<6|a,d>=65536&&d<=1114111)){return d}throw Error("Invalid UTF-8 detected")}function g(c,f){f=f||{};var h=!1!==f.strict;v=k(c),w=v.length,m=0;for(var a,d=[];(a=B(h))!==!1;){d.push(a)}return b(d)} /*! https://mths.be/utf8js v2.1.2 by @mathias */ var v,w,m,y=String.fromCharCode;C.exports={version:"2.1.2",encode:A,decode:g}},function(a,b){!function(){for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),d=0;d>2],f+=c[(3&g[k])<<4|g[k+1]>>4],f+=c[(15&g[k+1])<<2|g[k+2]>>6],f+=c[63&g[k+2]]}return j%3===2?f=f.substring(0,f.length-1)+"=":j%3===1&&(f=f.substring(0,f.length-2)+"=="),f},b.decode=function(w){var m,f,j,k,x,q=0.75*w.length,n=w.length,v=0;"="===w[w.length-1]&&(q--,"="===w[w.length-2]&&q--);var g=new ArrayBuffer(q),l=new Uint8Array(g);for(m=0;m>4,l[v++]=(15&j)<<4|k>>2,l[v++]=(3&k)<<6|63&x}return g}}()},function(l,h){function f(a){return a.map(function(c){if(c.buffer instanceof ArrayBuffer){var i=c.buffer;if(c.byteLength!==i.byteLength){var o=new Uint8Array(c.byteLength);o.set(new Uint8Array(i,c.byteOffset,c.byteLength)),i=o.buffer}return i}return c})}function b(a,i){i=i||{};var c=new g;return f(a).forEach(function(e){c.append(e)}),i.type?c.getBlob(i.type):c.getBlob()}function d(a,c){return new Blob(f(a),c||{})}var g="undefined"!=typeof g?g:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,m=function(){try{var a=new Blob(["hi"]);return 2===a.size}catch(c){return !1}}(),k=m&&function(){try{var a=new Blob([new Uint8Array([1,2])]);return 2===a.size}catch(c){return !1}}(),j=g&&g.prototype.append&&g.prototype.getBlob;"undefined"!=typeof Blob&&(b.prototype=Blob.prototype,d.prototype=Blob.prototype),l.exports=function(){return m?k?Blob:d:j?b:void 0}()},function(a,b){b.encode=function(c){var d="";for(var f in c){c.hasOwnProperty(f)&&(d.length&&(d+="&"),d+=encodeURIComponent(f)+"="+encodeURIComponent(c[f]))}return d},b.decode=function(d){for(var g={},j=d.split("&"),f=0,h=j.length;f0);return c}function b(a){var c=0;for(d=0;d';v=document.createElement(o)}catch(i){v=document.createElement("iframe"),v.name=q.iframeId,v.src="javascript:0"}v.id=q.iframeId,q.form.appendChild(v),q.iframe=v}var q=this;if(!this.form){var v,B=document.createElement("form"),z=document.createElement("textarea"),y=this.iframeId="eio_iframe_"+this.index;B.className="socketio",B.style.position="absolute",B.style.top="-1000px",B.style.left="-1000px",B.target=y,B.method="POST",B.setAttribute("accept-charset","utf-8"),z.name="d",B.appendChild(z),document.body.appendChild(B),this.form=B,this.area=z}this.form.action=this.uri(),p(),A=A.replace(f,"\\\n"),this.area.value=A.replace(m,"\\n");try{this.form.submit()}catch(w){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===q.iframe.readyState&&u()}:this.iframe.onload=u}}).call(b,function(){return this}())},function(A,w,j){function b(a){var c=a&&a.forceBase64;c&&(this.supportsBinary=!1),this.perMessageDeflate=a.perMessageDeflate,this.usingBrowserWebSocket=g&&!a.forceNode,this.protocols=a.protocols,this.usingBrowserWebSocket||(k=m),B.call(this,a)}var g,m,B=j(23),y=j(24),x=j(32),z=j(33),d=j(34),q=j(3)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?g=WebSocket:"undefined"!=typeof self&&(g=self.WebSocket||self.MozWebSocket),"undefined"==typeof window){try{m=j(37)}catch(v){}}var k=g||m;A.exports=b,z(b,B),b.prototype.name="websocket",b.prototype.supportsBinary=!0,b.prototype.doOpen=function(){if(this.check()){var a=this.uri(),f=this.protocols,h={agent:this.agent,perMessageDeflate:this.perMessageDeflate};h.pfx=this.pfx,h.key=this.key,h.passphrase=this.passphrase,h.cert=this.cert,h.ca=this.ca,h.ciphers=this.ciphers,h.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(h.headers=this.extraHeaders),this.localAddress&&(h.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?f?new k(a,f):new k(a):new k(a,f,h)}catch(c){return this.emit("error",c)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},b.prototype.addEventListeners=function(){var a=this;this.ws.onopen=function(){a.onOpen()},this.ws.onclose=function(){a.onClose()},this.ws.onmessage=function(c){a.onData(c.data)},this.ws.onerror=function(c){a.onError("websocket error",c)}},b.prototype.write=function(c){function h(){p.emit("flush"),setTimeout(function(){p.writable=!0,p.emit("drain")},0)}var p=this;this.writable=!1;for(var f=c.length,l=0,a=f;l0&&d.jitter<=1?d.jitter:0,this.attempts=0}a.exports=c,c.prototype.duration=function(){var d=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var f=Math.random(),g=Math.floor(f*this.jitter*d);d=0==(1&Math.floor(10*f))?d-g:d+g}return 0|Math.min(d,this.max)},c.prototype.reset=function(){this.attempts=0},c.prototype.setMin=function(d){this.ms=d},c.prototype.setMax=function(d){this.max=d},c.prototype.setJitter=function(d){this.jitter=d}}])});