/** * Auryc JavaScript Client-Side Library v4.7.17, 1712158135611 * (c) Copyright 2024, Auryc Inc. https://www.auryc.com */ try{try{Symbol.for("test")}catch(e){delete Symbol,"undefined"!=typeof window&&window&&window.localStorage&&"true"===window.localStorage.getItem("ardebug")&&console.log("Symbol exception",e)}!function(){var win,win="undefined"==typeof window?{navigator:{},console:{},location:{},document:{}}:window,windowNavigator=win.navigator,windowConsole=win.console,windowLocation=win.location,windowDocument=win.document,debugMsgHeader="Auryc Debug Message";function log(e,t){}function warn(e){}function error(e){}function critical(e){}function isLiveDebug(){var e=0=HOT_COUNT)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}var _shortOut=shortOut,setToString=_shortOut(_baseSetToString),_setToString=setToString;function baseRest(e,t){return _setToString(_overRest(e,t,identity_1),e+"")}var _baseRest=baseRest,WeakMap$1=_getNative(_root,"WeakMap"),_WeakMap=WeakMap$1,metaMap=_WeakMap&&new _WeakMap,_metaMap=metaMap,baseSetData=_metaMap?function(e,t){return _metaMap.set(e,t),e}:identity_1,_baseSetData=baseSetData,objectCreate=Object.create,baseCreate=function(e){if(!isObject_1(e))return{};if(objectCreate)return objectCreate(e);La.prototype=e;var t=new La;return La.prototype=void 0,t};function La(){}var _baseCreate=baseCreate;function createCtor(n){return function(){var e=arguments;switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3]);case 5:return new n(e[0],e[1],e[2],e[3],e[4]);case 6:return new n(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new n(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=_baseCreate(n.prototype),r=n.apply(t,e);return isObject_1(r)?r:t}}var _createCtor=createCtor,WRAP_BIND_FLAG=1;function createBind(t,e,r){var n=e&WRAP_BIND_FLAG,i=_createCtor(t);return function e(){return(this&&this!==_root&&this instanceof e?i:t).apply(n?r:this,arguments)}}var _createBind=createBind,nativeMax$1=Math.max;function composeArgs(e,t,r,n){for(var i=-1,a=e.length,o=r.length,s=-1,c=t.length,l=nativeMax$1(a-o,0),u=Array(c+l),g=!n;++s>>0,t>>>=0;for(var a=Array(i);++n>>2),n+=r.charAt((3&e.charCodeAt(i))<<4|e.charCodeAt(i+1)>>>4),n+=r.charAt((15&e.charCodeAt(i+1))<<2|e.charCodeAt(i+2)>>>6),n+=r.charAt(63&e.charCodeAt(i+2));return t%3==2?(n+=r.charAt(e.charCodeAt(i)>>>2),n+=r.charAt((3&e.charCodeAt(i))<<4|e.charCodeAt(i+1)>>>4),n+=r.charAt((15&e.charCodeAt(i+1))<<2),n+=b64pad):t%3==1&&(n+=r.charAt(e.charCodeAt(i)>>>2),n+=r.charAt((3&e.charCodeAt(i))<<4),n+=b64pad,n+=b64pad),n}function base64_encode(e){var t=unescape(encodeURIComponent(e));return base64_encode_data(t,t.length,b64c)}function base64url_encode(e){var t=unescape(encodeURIComponent(e));return base64_encode_data(t,t.length,b64u)}function base64_charIndex(e){return"+"==e?62:"/"==e?63:b64u.indexOf(e)}function base64_decode(e){for(var t,r,n,i,a="",o=e.length,s=0;s<=o-2;s+=4)t=base64_charIndex(e.charAt(s+0)),r=base64_charIndex(e.charAt(s+1)),n=base64_charIndex(e.charAt(s+2)),i=base64_charIndex(e.charAt(s+3)),a+=String.fromCharCode(t<<2|r>>>4),s+2>>2&15)),s+3>>32-t}function r(e){for(var t="",r=7;0<=r;r--)t+=(e>>>4*r&15).toString(16);return t}for(var n,i,a,o,s,c,l,u,g=[],d=1732584193,h=4023233417,p=2562383102,f=271733878,I=3285377520,m=[],b=(e=unescape(encodeURIComponent(e))).length,C=0;C>>29),m.push(b<<3&4294967295),n=0;n>6:(i<55296||57344<=i?a[s++]=224|i>>12:(i=65536+((1023&i)<<10|1023&e.charCodeAt(++c)),a[s++]=240|i>>18,a[s++]=128|i>>12&63),a[s++]=128|i>>6&63),a[s++]=128|63&i);e=a}else{if("object"!=n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR)}64>2]|=e[a]<>2]|=n<>2]|=(192|n>>6)<>2]|=(224|n>>12)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=EXTRA[3&t],this.block=e[16],56<=t&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash())},Sha256.prototype.hash=function(){for(var e,t,r,n,i,a,o,s,c=this.h0,l=this.h1,u=this.h2,g=this.h3,d=this.h4,h=this.h5,p=this.h6,f=this.h7,I=this.blocks,m=16;m<64;++m)e=((n=I[m-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,t=((n=I[m-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,I[m]=I[m-16]+e+I[m-7]+t<<0;for(s=l&u,m=0;m<64;m+=4)this.first?(g=this.is224?(i=300032,f=(n=I[0]-1413257819)-150054599<<0,n+24177077<<0):(i=704751109,f=(n=I[0]-210244248)-1521486534<<0,n+143694565<<0),this.first=!1):(e=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(i=c&l)^c&u^s,f=g+(n=f+(t=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&p)+K[m]+I[m])<<0,g=n+(e+r)<<0),e=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),r=(a=g&c)^g&l^i,p=u+(n=p+(t=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&d^~f&h)+K[m+1]+I[m+1])<<0,e=((u=n+(e+r)<<0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(o=u&g)^u&c^a,h=l+(n=h+(t=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&f^~p&d)+K[m+2]+I[m+2])<<0,e=((l=n+(e+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(s=l&u)^l&g^o,d=c+(n=d+(t=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&p^~h&f)+K[m+3]+I[m+3])<<0,c=n+(e+r)<<0;this.h0=this.h0+c<<0,this.h1=this.h1+l<<0,this.h2=this.h2+u<<0,this.h3=this.h3+g<<0,this.h4=this.h4+d<<0,this.h5=this.h5+h<<0,this.h6=this.h6+p<<0,this.h7=this.h7+f<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o];return this.is224||(c+=HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a,o>>24&255,o>>16&255,o>>8&255,255&o];return this.is224||c.push(s>>24&255,s>>16&255,s>>8&255,255&s),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){var e;Sha256.prototype.finalize.call(this),this.inner&&(this.inner=!1,e=this.array(),Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this))};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(void 0)(function(){return exports}))}()});function idGen(e){e=sha256.sha256(e);for(var t="",r=0;r]*?>)[\\s\\S]*?(<\/script>)","gim"),r="",n=e.length,i=0,a=t.exec(e);_.isDefined(a);)var o=a.index,s=a[0],c=a[1].replace("src=","au_src="),l=a[2],r=(r+=e.substring(i,o))+c+l,i=o+s.length,a=t.exec(e);return r+=e.substring(i,n)}},{key:"removeBlobLink",value:function(e){if(!e)return"";if(e.indexOf("blob:")<0&&e.indexOf("prefetch")<0)return e;var t=RegExp("()","gim");return PIIUtils.replaceWithMask(e,t,function(e){var t=e instanceof Array?e[0]:e||"";return-1"))e.removeAttribute(i);else if(_.inArray(i,this.redactedAttributes)||/data-*/.test(i))try{e.setAttribute(i,this.redactText(e.getAttribute(i)))}catch(e){}}return e}}}},{key:"redactText",value:function(e){for(var t=0)|(&[^\s;]*;)|(<[^<>]*?>)|(<)|\w/g,function(e,t,r,n){return r||n||"*"}).replace(/&((?!nbsp| |amp).)*?;/g,"*"):""}},{key:"containedBy",value:function(e,t){var r=e,n=t;do{if(n.contains?r!==n&&n.contains(r):16&n.compareDocumentPosition(r))return!0;var i=r.getRootNode(),r=dom.isShadowRoot(i)&&i.host?i.host:null}while(r);return!1}}]),eQ);function eQ(){classCallCheck(this,eQ)}var globalPIIHandler=null,resetAttribute$1;function getPIIHandler(){return globalPIIHandler=globalPIIHandler||new PIIHandler}var PIINodeReCache=new WeakMap;function isPIINodeRec(t){if(!t)return!1;if(PIINodeReCache.has(t))return PIINodeReCache.get(t);t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);try{if(!0===t[constants.pii.maskingProperty]||t.getAttribute(constants.pii.maskingClassName))return PIINodeReCache.set(t,!0),!0;var e=t.type||t.getAttribute("type");if("reset"===e||"submit"===e||"button"===e)return PIINodeReCache.set(t,!1),!1;if("input"===t.nodeName.toLowerCase()&&getPIIHandler().isIgnoreInputsOverride())return PIINodeReCache.set(t,!0),!0;if(getPIIHandler().shouldRedactText(t))return PIINodeReCache.set(t,!0),!0;var r=t.className||t.getAttribute("class"),n=r&&"string"==typeof r&&(0<=r.indexOf(constants.pii.maskingClassName)||0<=r.indexOf(constants.pii.redactingClassName));return n?(getPIIHandler().shouldRedactText(t)||(t[constants.pii.maskingProperty]=!0),PIINodeReCache.set(t,n),n):(getPIIHandler().shouldRedactText(t)&&(n=!0),isCreditcardInput(t,t.value)&&(n=!0,t[constants.pii.maskingProperty]=!0),PIINodeReCache.set(t,n),n)}catch(e){return PIINodeReCache.set(t,!1),!1}}function processKeepInputs(e){getPIIHandler().processKeepInputs(e)}function addMaskAttributeToTags(e){getPIIHandler().addMaskAttributeToTags(e)}function isMaskedPIINode(e){var t=1>>8&255]<<16|l[e>>>16&255]<<8|l[e>>>24&255])>>32-t:l[e]>>8-t),t+o<8)s=s<>t-n-1&1,8==++o&&(o=0,i[a++]=l[s],s=0,a===i.length&&(i=c(this)));i[a]=s,this.buffer=i,this.d=o,this.index=a},se.prototype.finish=function(){var e=this.buffer,t=this.index;return 0>>1;o;o>>>=1)n<<=1,n|=1&o,--i;t[r]=(n<>>0}var l=t;function u(e){this.buffer=new(oe?Uint16Array:Array)(2*e),this.length=0}function s(e,t){this.e=ce,this.f=0,this.input=oe&&e instanceof Array?new Uint8Array(e):e,this.c=0,t&&(t.lazy&&(this.f=t.lazy),"number"==typeof t.compressionType&&(this.e=t.compressionType),t.outputBuffer&&(this.b=oe&&t.outputBuffer instanceof Array?new Uint8Array(t.outputBuffer):t.outputBuffer),"number"==typeof t.outputIndex&&(this.c=t.outputIndex)),this.b||(this.b=new(oe?Uint8Array:Array)(32768))}u.prototype.getParent=function(e){return 2*((e-2)/4|0)},u.prototype.push=function(e,t){var r,n,i=this.buffer,a=this.length;for(i[this.length++]=t,i[this.length++]=e;0i[r]);)n=i[a],i[a]=i[r],i[r]=n,n=i[a+1],i[a+1]=i[r+1],i[r+1]=n,a=r;return this.length},u.prototype.pop=function(){var e,t,r,n=this.buffer,i=n[0],a=n[1];for(this.length-=2,n[0]=n[this.length],n[1]=n[this.length+1],r=0;!((t=2*r+2)>=this.length)&&(t+2n[t]&&(t+=2),n[t]>n[r]);)e=n[r],n[r]=n[t],n[t]=e,e=n[r+1],n[r+1]=n[t+1],n[t+1]=e,r=t;return{index:a,value:i,length:this.length}};for(var ce=2,le=[],g=0;g<288;g++)switch(ae){case g<=143:le.push([g+48,8]);break;case g<=255:le.push([g-144+400,9]);break;case g<=279:le.push([g-256,7]);break;case g<=287:le.push([g-280+192,8]);break;default:throw"invalid literal: "+g}function C(e,t){this.length=e,this.g=t}s.prototype.h=function(){var e,t,r,n,i=this.input;switch(this.e){case 0:for(r=0,n=i.length;r>>8&255,d[h++]=255&s,d[h++]=s>>>8&255,oe)d.set(l,h),h+=l.length,d=d.subarray(0,h);else{for(g=0,c=l.length;g>16&255,o[s++]=c>>24,ae){case 1===a:r=[0,a-1,0];break;case 2===a:r=[1,a-2,0];break;case 3===a:r=[2,a-3,0];break;case 4===a:r=[3,a-4,0];break;case a<=6:r=[4,a-5,1];break;case a<=8:r=[5,a-7,1];break;case a<=12:r=[6,a-9,2];break;case a<=16:r=[7,a-13,2];break;case a<=24:r=[8,a-17,3];break;case a<=32:r=[9,a-25,3];break;case a<=48:r=[10,a-33,4];break;case a<=64:r=[11,a-49,4];break;case a<=96:r=[12,a-65,5];break;case a<=128:r=[13,a-97,5];break;case a<=192:r=[14,a-129,6];break;case a<=256:r=[15,a-193,6];break;case a<=384:r=[16,a-257,7];break;case a<=512:r=[17,a-385,7];break;case a<=768:r=[18,a-513,8];break;case a<=1024:r=[19,a-769,8];break;case a<=1536:r=[20,a-1025,9];break;case a<=2048:r=[21,a-1537,9];break;case a<=3072:r=[22,a-2049,10];break;case a<=4096:r=[23,a-3073,10];break;case a<=6144:r=[24,a-4097,11];break;case a<=8192:r=[25,a-6145,11];break;case a<=12288:r=[26,a-8193,12];break;case a<=16384:r=[27,a-12289,12];break;case a<=24576:r=[28,a-16385,13];break;case a<=32768:r=[29,a-24577,13];break;default:throw"invalid distance"}for(c=r,o[s++]=c[0],o[s++]=c[1],o[5]=c[2],n=0,i=o.length;n2*c[i-1]+l[i]&&(c[i]=2*c[i-1]+l[i]),g[i]=Array(c[i]),d[i]=Array(c[i]);for(r=0;re[r]?(g[i][a]=o,d[i][a]=n,s+=2):(g[i][a]=e[r],d[i][a]=r,++r);h[i]=0,1===l[i]&&function e(t){var r=d[t][h[t]];r===n?(e(t+1),e(t+1)):--u[r],++h[t]}(i)}return u}(n,n.length,t),a=0,o=r.length;a>>=1;return n}e("Zlib.RawDeflate",s),e("Zlib.RawDeflate.prototype.compress",s.prototype.h);var h,p,f,I,m={NONE:0,FIXED:1,DYNAMIC:ce};if(Object.keys)h=Object.keys(m);else for(p in h=[],f=0,m)h[f++]=p;for(f=0,I=h.length;f>>0;return t}},{key:"byteArrayToString",value:function(e){for(var t="",r=0;r>6|192):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128)),t+=String.fromCharCode(63&n|128))}return t}},{key:"timerSplitAndProcess",value:function(e,t,r,n,i,a,o,s,c,l){logger.log("timerSplitAndProcess: processing "+t+" - "+r);for(var u,g=t;gthis.getMaxSize()}},{key:"updateSize",value:function(e){this.totalSize+=e.length}},{key:"getObject",value:function(e,t,r){t=t.join(",");for(var n,i={},a=this.caches,o=this.caches.length-1;0<=o;o--)if(a[o].v===e){i=a[o];break}if(e=Zlib.emojiToHtmlEntity(e),!_.isDefined(i.id)){if(i.id=_.UUID(),(i.kl=t)&&e.length>constants.record.cache.minLength&&config.isDomDiffEnabled())for(var s=this.caches.length-1;0<=s;s--)if(a[s].kl===t){var c=_.Diff(a[s].v,e);i.diff={id:a[s].id,df:c};break}_.isDefined(i.diff)?this.caches.length\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=a.console&&(a.console.warn||a.console.log);return r&&r.call(a.console,i,t),n.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===g||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;rt[r]}):n.sort()),n}function P(e,t){for(var r,n,i=t[0].toUpperCase()+t.slice(1),a=0;ad(l.y)?l.x:l.y,t.scale=o?function(e,t){return re(t[0],t[1],z)/re(e[0],e[1],z)}(o.pointers,n):1,t.rotation=o?function(e,t){return ne(t[1],t[0],z)+ne(e[1],e[0],z)}(o.pointers,n):0,t.maxPointers=!r.prevInput||t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers,function(e,t){var r,n,i,a,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;{var c,l,u;t.eventType!=M&&(Ld(u.y)?u.x:u.y,a=te(c,l),e.lastInterval=t):(r=o.velocity,n=o.velocityX,i=o.velocityY,a=o.direction)}t.velocity=r,t.velocityX=n,t.velocityY=i,t.direction=a}(r,t);var u=e.element;v(t.srcEvent.target,u)&&(u=t.srcEvent.target);t.target=u}(e,r),e.emit("hammer.input",r),e.recognize(r),e.session.prevInput=r}function Q(e){for(var t=[],r=0;r=d(t)?e<0?G:V:t<0?Z:j}function re(e,t,r){var n=t[(r=r||X)[0]]-e[r[0]],i=t[r[1]]-e[r[1]];return Math.sqrt(n*n+i*i)}function ne(e,t,r){var n=t[(r=r||X)[0]]-e[r[0]],i=t[r[1]]-e[r[1]];return 180*Math.atan2(i,n)/Math.PI}K.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(x(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&A(this.element,this.evEl,this.domHandler),this.evTarget&&A(this.target,this.evTarget,this.domHandler),this.evWin&&A(x(this.element),this.evWin,this.domHandler)}};var ie={mousedown:F,mousemove:2,mouseup:O},ae="mousedown",oe="mousemove mouseup";function se(){this.evEl=ae,this.evWin=oe,this.pressed=!1,K.apply(this,arguments)}I(se,K,{handler:function(e){var t=ie[e.type];t&F&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=O),this.pressed&&(t&O&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:B,srcEvent:e}))}});var ce={pointerdown:F,pointermove:2,pointerup:O,pointercancel:M,pointerout:M},le={2:D,3:"pen",4:B,5:"kinect"},ue="pointerdown",ge="pointermove pointerup pointercancel";function de(){this.evEl=ue,this.evWin=ge,K.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}a.MSPointerEvent&&!a.PointerEvent&&(ue="MSPointerDown",ge="MSPointerMove MSPointerUp MSPointerCancel"),I(de,K,{handler:function(e){var t=this.store,r=!1,n=e.type.toLowerCase().replace("ms",""),i=ce[n],a=le[e.pointerType]||e.pointerType,o=a==D,s=k(t,e.pointerId,"pointerId");i&F&&(0===e.button||o)?s<0&&(t.push(e),s=t.length-1):i&(O|M)&&(r=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:a,srcEvent:e}),r&&t.splice(s,1))}});var he={touchstart:F,touchmove:2,touchend:O,touchcancel:M};function pe(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,K.apply(this,arguments)}I(pe,K,{handler:function(e){var t,r=he[e.type];r===F&&(this.started=!0),this.started&&(t=function(e,t){var r=T(e.touches),n=T(e.changedTouches);t&(O|M)&&(r=_(r.concat(n),"identifier",!0));return[r,n]}.call(this,e,r),r&(O|M)&&t[0].length-t[1].length==0&&(this.started=!1),this.callback(this.manager,r,{pointers:t[0],changedPointers:t[1],pointerType:D,srcEvent:e}))}});var fe={touchstart:F,touchmove:2,touchend:O,touchcancel:M},Ie="touchstart touchmove touchend touchcancel";function me(){this.evTarget=Ie,this.targetIds={},K.apply(this,arguments)}I(me,K,{handler:function(e){var t=fe[e.type],r=function(e,t){var r=T(e.touches),n=this.targetIds;if(t&(2|F)&&1===r.length)return n[r[0].identifier]=!0,[r,r];var i,a,o=T(e.changedTouches),s=[],c=this.target;if(a=r.filter(function(e){return v(e.target,c)}),t===F)for(i=0;it.threshold&&i&t.direction},attrTest:function(e){return Be.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=We(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),I(Fe,Be,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ke]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){var t;1!==e.scale&&(t=e.scale<1?"in":"out",e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),I(Oe,Re,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,n=e.distancet.time;if(this._input=e,!n||!r||e.eventType&(O|M)&&!i)this.reset();else if(e.eventType&F)this.reset(),this._timer=u(function(){this.state=8,this.tryEmit()},t.time,this);else if(e.eventType&O)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&O?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}}),I(Me,Be,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ke]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),I(Ue,Be,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:H|J,pointers:1},getTouchAction:function(){return Le.prototype.getTouchAction.call(this)},attrTest:function(e){var t,r=this.options.direction;return r&(H|J)?t=e.overallVelocity:r&H?t=e.overallVelocityX:r&J&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&d(t)>this.options.velocity&&e.eventType&O},emit:function(e){var t=We(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),I(Ge,Re,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Se]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,n=e.distance>2],n=(3&c)<<4,s=1;break;case 1:a[o++]=l[n|c>>4],n=(15&c)<<2,s=2;break;case 2:a[o++]=l[n|c>>6],a[o++]=l[63&c],s=0}8191>4,n=s,a=2;break;case 2:t[r++]=(15&n)<<4|(60&s)>>2,n=s,a=3;break;case 3:t[r++]=(3&n)<<6|s,a=0}}if(1===a)throw Error(u);return r-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}),eventemitter=EventEmitter;function EventEmitter(){this._listeners={}}EventEmitter.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},EventEmitter.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n>>0:t<11754943508222875e-54?(a<<31|Math.round(t/1401298464324817e-60))>>>0:(a<<31|(i=Math.floor(Math.log(t)/Math.LN2))+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}function r(e,t,r){var n=e(t,r),i=2*(n>>31)+1,a=n>>>23&255,o=8388607&n;return 255==a?o?NaN:1/0*i:0==a?1401298464324817e-60*i*o:i*Math.pow(2,a-150)*(8388608+o)}function n(e,t,r){s[0]=e,t[r]=c[0],t[r+1]=c[1],t[r+2]=c[2],t[r+3]=c[3]}function i(e,t,r){s[0]=e,t[r]=c[3],t[r+1]=c[2],t[r+2]=c[1],t[r+3]=c[0]}function a(e,t){return c[0]=e[t],c[1]=e[t+1],c[2]=e[t+2],c[3]=e[t+3],s[0]}function o(e,t){return c[3]=e[t],c[2]=e[t+1],c[1]=e[t+2],c[0]=e[t+3],s[0]}var s,c,l,u,g,d;function h(e,t,r,n,i,a){var o,s,c=n<0?1:0;c&&(n=-n),0===n?(e(0,i,a+t),e(0<1/n?0:2147483648,i,a+r)):isNaN(n)?(e(0,i,a+t),e(2146959360,i,a+r)):17976931348623157e292>>0,i,a+r)):n<22250738585072014e-324?(e((o=n/5e-324)>>>0,i,a+t),e((c<<31|o/4294967296)>>>0,i,a+r)):(1024===(s=Math.floor(Math.log(n)/Math.LN2))&&(s=1023),e(4503599627370496*(o=n*Math.pow(2,-s))>>>0,i,a+t),e((c<<31|s+1023<<20|1048576*o&1048575)>>>0,i,a+r))}function p(e,t,r,n,i){var a=e(n,i+t),o=e(n,i+r),s=2*(o>>31)+1,c=o>>>20&2047,l=4294967296*(1048575&o)+a;return 2047==c?l?NaN:1/0*s:0==c?5e-324*s*l:s*Math.pow(2,c-1075)*(l+4503599627370496)}function f(e,t,r){u[0]=e,t[r]=g[0],t[r+1]=g[1],t[r+2]=g[2],t[r+3]=g[3],t[r+4]=g[4],t[r+5]=g[5],t[r+6]=g[6],t[r+7]=g[7]}function I(e,t,r){u[0]=e,t[r]=g[7],t[r+1]=g[6],t[r+2]=g[5],t[r+3]=g[4],t[r+4]=g[3],t[r+5]=g[2],t[r+6]=g[1],t[r+7]=g[0]}function m(e,t){return g[0]=e[t],g[1]=e[t+1],g[2]=e[t+2],g[3]=e[t+3],g[4]=e[t+4],g[5]=e[t+5],g[6]=e[t+6],g[7]=e[t+7],u[0]}function b(e,t){return g[7]=e[t],g[6]=e[t+1],g[5]=e[t+2],g[4]=e[t+3],g[3]=e[t+4],g[2]=e[t+5],g[1]=e[t+6],g[0]=e[t+7],u[0]}return"undefined"!=typeof Float32Array?(s=new Float32Array([-0]),c=new Uint8Array(s.buffer),l=128===c[3],e.writeFloatLE=l?n:i,e.writeFloatBE=l?i:n,e.readFloatLE=l?a:o,e.readFloatBE=l?o:a):(e.writeFloatLE=t.bind(null,writeUintLE),e.writeFloatBE=t.bind(null,writeUintBE),e.readFloatLE=r.bind(null,readUintLE),e.readFloatBE=r.bind(null,readUintBE)),"undefined"!=typeof Float64Array?(u=new Float64Array([-0]),g=new Uint8Array(u.buffer),d=128===g[7],e.writeDoubleLE=d?f:I,e.writeDoubleBE=d?I:f,e.readDoubleLE=d?m:b,e.readDoubleBE=d?b:m):(e.writeDoubleLE=h.bind(null,writeUintLE,0,4),e.writeDoubleBE=h.bind(null,writeUintBE,4,0),e.readDoubleLE=p.bind(null,readUintLE,0,4),e.readDoubleBE=p.bind(null,readUintBE,4,0)),e}function writeUintLE(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function writeUintBE(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function readUintLE(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function readUintBE(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}var inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}var utf8_1=createCommonjsModule(function(e,t){var r=t;r.length=function(e){for(var t,r=0,n=0;n>10),a[o++]=56320+(1023&n)):a[o++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],8191>6|192:(55296==(64512&n)&&56320==(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-a}}),pool_1=pool;function pool(r,n,e){var i=e||8192,a=i>>>1,o=null,s=i;return function(e){if(e<1||a>>0,this.hi=t>>>0}var zero=LongBits.zero=new LongBits(0,0);zero.toNumber=function(){return 0},zero.zzEncode=zero.zzDecode=function(){return this},zero.length=function(){return 1};var zeroHash=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(e){if(0===e)return zero;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,4294967295<++r&&(r=0,4294967295<++n&&(n=0))),new LongBits(r,n)},LongBits.from=function(e){if("number"==typeof e)return LongBits.fromNumber(e);if(minimal.isString(e)){if(!minimal.Long)return LongBits.fromNumber(parseInt(e,10));e=minimal.Long.fromString(e)}return e.low||e.high?new LongBits(e.low>>>0,e.high>>>0):zero},LongBits.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},LongBits.prototype.toLong=function(e){return minimal.Long?new minimal.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var charCodeAt=String.prototype.charCodeAt;LongBits.fromHash=function(e){return e===zeroHash?zero:new LongBits((charCodeAt.call(e,0)|charCodeAt.call(e,1)<<8|charCodeAt.call(e,2)<<16|charCodeAt.call(e,3)<<24)>>>0,(charCodeAt.call(e,4)|charCodeAt.call(e,5)<<8|charCodeAt.call(e,6)<<16|charCodeAt.call(e,7)<<24)>>>0)},LongBits.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},LongBits.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},LongBits.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},LongBits.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0==r?0==t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10};var minimal=createCommonjsModule(function(e,t){var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i>>=7;t[r]=e}function VarintOp(e,t){this.len=e,this.next=void 0,this.val=t}function writeVarint64(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127>>7;t[r++]=e.lo}function writeFixed32(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}Writer.create=create(),Writer.alloc=function(e){return new minimal.Array(e)},minimal.Array!==Array&&(Writer.alloc=minimal.pool(Writer.alloc,minimal.Array.prototype.subarray)),Writer.prototype._push=function(e,t,r){return this.tail=this.tail.next=new Op(e,t,r),this.len+=t,this},VarintOp.prototype=Object.create(Op.prototype),VarintOp.prototype.fn=writeVarint32,Writer.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new VarintOp((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},Writer.prototype.int32=function(e){return e<0?this._push(writeVarint64,10,LongBits$1.fromNumber(e)):this.uint32(e)},Writer.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},Writer.prototype.uint64=function(e){var t=LongBits$1.from(e);return this._push(writeVarint64,t.length(),t)},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(e){var t=LongBits$1.from(e).zzEncode();return this._push(writeVarint64,t.length(),t)},Writer.prototype.bool=function(e){return this._push(writeByte,1,e?1:0)},Writer.prototype.fixed32=function(e){return this._push(writeFixed32,4,e>>>0)},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(e){var t=LongBits$1.from(e);return this._push(writeFixed32,4,t.lo)._push(writeFixed32,4,t.hi)},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(e){return this._push(minimal.float.writeFloatLE,4,e)},Writer.prototype.double=function(e){return this._push(minimal.float.writeDoubleLE,8,e)};var writeBytes=minimal.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;return r?(minimal.isString(e)&&(t=Writer.alloc(r=base64.length(e)),base64.decode(e,t,0),e=t),this.uint32(r)._push(writeBytes,r,e)):this._push(writeByte,1,0)},Writer.prototype.string=function(e){var t=utf8.length(e);return t?this.uint32(t)._push(utf8.write,t,e):this._push(writeByte,1,0)},Writer.prototype.fork=function(){return this.states=new State(this),this.head=this.tail=new Op(noop$2,0,0),this.len=0,this},Writer.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop$2,0,0),this.len=0),this},Writer.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},Writer.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},Writer._configure=function(e){BufferWriter=e,Writer.create=create(),BufferWriter._configure()};var writer_buffer=BufferWriter$1;function BufferWriter$1(){writer.call(this)}function writeStringBuffer(e,t,r){e.length<40?minimal.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}(BufferWriter$1.prototype=Object.create(writer.prototype)).constructor=BufferWriter$1,BufferWriter$1._configure=function(){BufferWriter$1.alloc=minimal._Buffer_allocUnsafe,BufferWriter$1.writeBytesBuffer=minimal.Buffer&&minimal.Buffer.prototype instanceof Uint8Array&&"set"===minimal.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(BufferWriter$1.writeBytesBuffer,t,e),this},BufferWriter$1.prototype.string=function(e){var t=minimal.Buffer.byteLength(e);return this.uint32(t),t&&this._push(writeStringBuffer,t,e),this},BufferWriter$1._configure();var reader=Reader,BufferReader,LongBits$2=minimal.LongBits,utf8$1=minimal.utf8;function indexOutOfRange(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function Reader(e){this.buf=e,this.pos=0,this.len=e.length}var create_array="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new Reader(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new Reader(e);throw Error("illegal buffer")},create$1=function(){return minimal.Buffer?function(e){return(Reader.create=function(e){return minimal.Buffer.isBuffer(e)?new BufferReader(e):create_array(e)})(e)}:create_array},Bga;function readLongVarint(){var e=new LongBits$2(0,0),t=0;if(!(4=this.len)throw indexOutOfRange(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,4>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw indexOutOfRange(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function readFixed32_end(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits$2(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader.create=create$1(),Reader.prototype._slice=minimal.Array.prototype.subarray||minimal.Array.prototype.slice,Reader.prototype.uint32=(Bga=4294967295,function(){if(Bga=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return Bga;if(Bga=(Bga|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return Bga;if(Bga=(Bga|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return Bga;if(Bga=(Bga|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return Bga;if(Bga=(Bga|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return Bga;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return Bga}),Reader.prototype.int32=function(){return 0|this.uint32()},Reader.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},Reader.prototype.bool=function(){return 0!==this.uint32()},Reader.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var e=minimal.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},Reader.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var e=minimal.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},Reader.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw indexOutOfRange(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},Reader.prototype.string=function(){var e=this.bytes();return utf8$1.read(e,0,e.length)},Reader.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw indexOutOfRange(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw indexOutOfRange(this)}while(128&this.buf[this.pos++]);return this},Reader.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},Reader._configure=function(e){BufferReader=e,Reader.create=create$1(),BufferReader._configure();var t=minimal.Long?"toLong":"toNumber";minimal.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[t](!1)},uint64:function(){return readLongVarint.call(this)[t](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[t](!1)},fixed64:function(){return readFixed64.call(this)[t](!0)},sfixed64:function(){return readFixed64.call(this)[t](!1)}})};var reader_buffer=BufferReader$1;function BufferReader$1(e){reader.call(this,e)}(BufferReader$1.prototype=Object.create(reader.prototype)).constructor=BufferReader$1,BufferReader$1._configure=function(){minimal.Buffer&&(BufferReader$1.prototype._slice=minimal.Buffer.prototype.slice)},BufferReader$1.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},BufferReader$1._configure();var service=Service;function Service(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");minimal.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(Service.prototype=Object.create(minimal.EventEmitter.prototype)).constructor=Service,Service.prototype.rpcCall=function e(r,t,n,i,a){if(!i)throw TypeError("request must be specified");var o=this;if(!a)return minimal.asPromise(e,o,r,t,n,i);if(o.rpcImpl)try{return o.rpcImpl(r,t[o.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(e,t){if(e)return o.emit("error",e,r),a(e);if(null!==t){if(!(t instanceof n))try{t=n[o.responseDelimited?"decodeDelimited":"decode"](t)}catch(e){return o.emit("error",e,r),a(e)}return o.emit("data",t,r),a(null,t)}o.end(!0)})}catch(e){return o.emit("error",e,r),void setTimeout(function(){a(e)},0)}else setTimeout(function(){a(Error("already ended"))},0)},Service.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this};var rpc_1=createCommonjsModule(function(e,t){t.Service=service}),roots={},indexMinimal=createCommonjsModule(function(e,t){var r=t;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=writer,r.BufferWriter=writer_buffer,r.Reader=reader,r.BufferReader=reader_buffer,r.util=minimal,r.rpc=rpc_1,r.roots=roots,r.configure=n,n()}),minimal$2=indexMinimal,minimal_1=minimal$2.util,minimal_2=minimal$2.Writer,minimal_3=minimal$2.Reader,$Reader=minimal_3,$Writer=minimal_2,$util=minimal_1,$root={},com=$root.com=(Fha={},Fha.auryc=((Gha={}).ubi=((Hha={}).core=((Iha={}).model=((Jha={}).Message=(Kha.prototype.cid="",Kha.prototype.uid="",Kha.prototype.sid="",Kha.prototype.domain="",Kha.prototype.context=null,Kha.prototype.packet=$util.emptyArray,Kha.create=function(e){return new Kha(e)},Kha.encode=function(e,t){if(t=t||$Writer.create(),null!=e.cid&&e.hasOwnProperty("cid")&&t.uint32(10).string(e.cid),null!=e.uid&&e.hasOwnProperty("uid")&&t.uint32(18).string(e.uid),null!=e.sid&&e.hasOwnProperty("sid")&&t.uint32(26).string(e.sid),null!=e.domain&&e.hasOwnProperty("domain")&&t.uint32(34).string(e.domain),null!=e.context&&e.hasOwnProperty("context")&&$root.com.auryc.ubi.core.model.Message.MessageContext.encode(e.context,t.uint32(42).fork()).ldelim(),null!=e.packet&&e.packet.length)for(var r=0;r>>3){case 1:n.cid=e.string();break;case 2:n.uid=e.string();break;case 3:n.sid=e.string();break;case 4:n.domain=e.string();break;case 5:n.context=$root.com.auryc.ubi.core.model.Message.MessageContext.decode(e,e.uint32());break;case 6:n.packet&&n.packet.length||(n.packet=[]),n.packet.push($root.com.auryc.ubi.core.model.Message.MessagePacket.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},Kha.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},Kha.verify=function(e){if("object"!==(void 0===e?"undefined":_typeof(e))||null===e)return"object expected";if(null!=e.cid&&e.hasOwnProperty("cid")&&!$util.isString(e.cid))return"cid: string expected";if(null!=e.uid&&e.hasOwnProperty("uid")&&!$util.isString(e.uid))return"uid: string expected";if(null!=e.sid&&e.hasOwnProperty("sid")&&!$util.isString(e.sid))return"sid: string expected";if(null!=e.domain&&e.hasOwnProperty("domain")&&!$util.isString(e.domain))return"domain: string expected";if(null!=e.context&&e.hasOwnProperty("context")){var t=$root.com.auryc.ubi.core.model.Message.MessageContext.verify(e.context);if(t)return"context."+t}if(null!=e.packet&&e.hasOwnProperty("packet")){if(!Array.isArray(e.packet))return"packet: array expected";for(var r=0;r>>3){case 1:n.ln=e.string();break;case 2:n.lv=e.string();break;case 3:n.ip=e.string();break;case 4:n.ref=e.string();break;case 5:n.ua=e.string();break;default:e.skipType(7&i)}}return n},sia.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},sia.verify=function(e){return"object"!==(void 0===e?"undefined":_typeof(e))||null===e?"object expected":null!=e.ln&&e.hasOwnProperty("ln")&&!$util.isString(e.ln)?"ln: string expected":null!=e.lv&&e.hasOwnProperty("lv")&&!$util.isString(e.lv)?"lv: string expected":null!=e.ip&&e.hasOwnProperty("ip")&&!$util.isString(e.ip)?"ip: string expected":null!=e.ref&&e.hasOwnProperty("ref")&&!$util.isString(e.ref)?"ref: string expected":null!=e.ua&&e.hasOwnProperty("ua")&&!$util.isString(e.ua)?"ua: string expected":null},sia.fromObject=function(e){if(e instanceof $root.com.auryc.ubi.core.model.Message.MessageContext)return e;var t=new $root.com.auryc.ubi.core.model.Message.MessageContext;return null!=e.ln&&(t.ln=String(e.ln)),null!=e.lv&&(t.lv=String(e.lv)),null!=e.ip&&(t.ip=String(e.ip)),null!=e.ref&&(t.ref=String(e.ref)),null!=e.ua&&(t.ua=String(e.ua)),t},sia.toObject=function(e,t){var r={};return(t=t||{}).defaults&&(r.ln="",r.lv="",r.ip="",r.ref="",r.ua=""),null!=e.ln&&e.hasOwnProperty("ln")&&(r.ln=e.ln),null!=e.lv&&e.hasOwnProperty("lv")&&(r.lv=e.lv),null!=e.ip&&e.hasOwnProperty("ip")&&(r.ip=e.ip),null!=e.ref&&e.hasOwnProperty("ref")&&(r.ref=e.ref),null!=e.ua&&e.hasOwnProperty("ua")&&(r.ua=e.ua),r},sia.prototype.toJSON=function(){return this.constructor.toObject(this,minimal_1.toJSONOptions)},sia),Kha.MessagePacket=(Wia.prototype.vid="",Wia.prototype.ts=$util.Long?$util.Long.fromBits(0,0,!1):0,Wia.prototype.status=0,Wia.prototype.size=0,Wia.prototype.data=$util.newBuffer([]),Wia.prototype.payload=$util.emptyObject,Wia.create=function(e){return new Wia(e)},Wia.encode=function(e,t){if(t=t||$Writer.create(),null!=e.vid&&e.hasOwnProperty("vid")&&t.uint32(10).string(e.vid),null!=e.ts&&e.hasOwnProperty("ts")&&t.uint32(16).int64(e.ts),null!=e.status&&e.hasOwnProperty("status")&&t.uint32(24).int32(e.status),null!=e.size&&e.hasOwnProperty("size")&&t.uint32(32).int32(e.size),null!=e.data&&e.hasOwnProperty("data")&&t.uint32(42).bytes(e.data),null!=e.payload&&e.hasOwnProperty("payload"))for(var r=Object.keys(e.payload),n=0;n>>3){case 1:i.vid=e.string();break;case 2:i.ts=e.int64();break;case 3:i.status=e.int32();break;case 4:i.size=e.int32();break;case 5:i.data=e.bytes();break;case 6:e.skip().pos++,i.payload===$util.emptyObject&&(i.payload={}),r=e.string(),e.pos++,i.payload[r]=e.bytes();break;default:e.skipType(7&a)}}return i},Wia.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},Wia.verify=function(e){if("object"!==(void 0===e?"undefined":_typeof(e))||null===e)return"object expected";if(null!=e.vid&&e.hasOwnProperty("vid")&&!$util.isString(e.vid))return"vid: string expected";if(null!=e.ts&&e.hasOwnProperty("ts")&&!($util.isInteger(e.ts)||e.ts&&$util.isInteger(e.ts.low)&&$util.isInteger(e.ts.high)))return"ts: integer|Long expected";if(null!=e.status&&e.hasOwnProperty("status")&&!$util.isInteger(e.status))return"status: integer expected";if(null!=e.size&&e.hasOwnProperty("size")&&!$util.isInteger(e.size))return"size: integer expected";if(null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||$util.isString(e.data)))return"data: buffer expected";if(null!=e.payload&&e.hasOwnProperty("payload")){if(!$util.isObject(e.payload))return"payload: object expected";for(var t=Object.keys(e.payload),r=0;r>>0,e.ts.high>>>0).toNumber())),null!=e.status&&(t.status=0|e.status),null!=e.size&&(t.size=0|e.size),null!=e.data&&("string"==typeof e.data?$util.base64.decode(e.data,t.data=$util.newBuffer($util.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),e.payload){if("object"!==_typeof(e.payload))throw TypeError(".com.auryc.ubi.core.model.Message.MessagePacket.payload: object expected");t.payload={};for(var r=Object.keys(e.payload),n=0;n>>0,e.ts.high>>>0).toNumber():e.ts),null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),null!=e.size&&e.hasOwnProperty("size")&&(n.size=e.size),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?$util.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data);var i=void 0;if(e.payload&&(i=Object.keys(e.payload)).length){n.payload={};for(var a=0;a>16&255,a[o++]=t>>8&255,a[o++]=255&t;return 2===i&&(t=revLookup[e.charCodeAt(c)]<<2|revLookup[e.charCodeAt(c+1)]>>4,a[o++]=255&t),1===i&&(t=revLookup[e.charCodeAt(c)]<<10|revLookup[e.charCodeAt(c+1)]<<4|revLookup[e.charCodeAt(c+2)]>>2,a[o++]=t>>8&255,a[o++]=255&t),a}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,r){for(var n,i=[],a=t;a>2]+lookup[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],i.push(lookup[t>>10]+lookup[t>>4&63]+lookup[t<<2&63]+"=")),i.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var base64Js={byteLength:byteLength_1,toByteArray:toByteArray_1,fromByteArray:fromByteArray_1},read=function(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,u=-7,g=r?i-1:0,d=r?-1:1,h=e[t+g];for(g+=d,a=h&(1<<-u)-1,h>>=-u,u+=s;0>=-u,u+=n;0>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),2<=(t+=1<=o+g?d/c:d*Math.pow(2,1-g))*c&&(o++,c/=2),u<=o+g?(s=0,o=u):1<=o+g?(s=(t*c-1)*Math.pow(2,i),o+=g):(s=t*Math.pow(2,g-1)*Math.pow(2,i),o=0));8<=i;e[r+h]=255&s,h+=p,s/=256,i-=8);for(o=o<>>1;case"base64":return P(e).length;default:if(i)return n?-1:_(e).length;t=(""+t).toLowerCase(),i=!0}}function h(e,t,r){var n,i,a,o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0);(!r||r<0||n=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=g.from(t,n)),g.isBuffer(t))return 0===t.length?-1:I(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):I(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function I(e,t,r,n,i){var a=1,o=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o/=a=2,s/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i)for(var l=-1,u=r;u>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function C(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i>>10&1023|55296),u=56320|1023&u),n.push(u),i+=g}return function(e){var t=e.length;if(t<=y)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nr.length?g.from(a).copy(r,n):Uint8Array.prototype.set.call(r,a,n);else{if(!g.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,n)}n+=a.length}return r},g.byteLength=d,g.prototype._isBuffer=!0,g.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},t&&(g.prototype[t]=g.prototype.inspect),g.prototype.compare=function(e,t,r,n,i){if(x(e,Uint8Array)&&(e=g.from(e,e.offset,e.byteLength)),!g.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=t)return 0;if(i<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),l=e.slice(t,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||ithis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var a,o,s,c,l,u,g=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;(!n||i<(n=Number(n)))&&(n=i);var a=t.length;a/2e.length)throw new RangeError("Index out of range")}function w(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function S(e,t,r,n,i){return t=+t,r>>>=0,i||w(e,0,r,4),ieee754.write(e,t,r,n,23,4),r+4}function k(e,t,r,n,i){return t=+t,r>>>=0,i||w(e,0,r,8),ieee754.write(e,t,r,n,52,8),r+8}g.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):r>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,a=0;++a>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e+--t],i=1;0>>=0,t||A(e,1,this.length),this[e]},g.prototype.readUint16LE=g.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},g.prototype.readUint16BE=g.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},g.prototype.readUint32LE=g.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},g.prototype.readUint32BE=g.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},g.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,a=0;++a>>=0,t>>>=0,r||A(e,t,this.length);for(var n=t,i=1,a=this[e+--n];0>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},g.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},g.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},g.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},g.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},g.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),ieee754.read(this,e,!0,23,4)},g.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),ieee754.read(this,e,!1,23,4)},g.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),ieee754.read(this,e,!0,52,8)},g.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),ieee754.read(this,e,!1,52,8)},g.prototype.writeUintLE=g.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||v(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||v(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;0<=--i&&(a*=256);)this[t+i]=e/a&255;return t+r},g.prototype.writeUint8=g.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},g.prototype.writeUint16LE=g.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},g.prototype.writeUint16BE=g.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},g.prototype.writeUint32LE=g.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},g.prototype.writeUint32BE=g.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},g.prototype.writeIntLE=function(e,t,r,n){var i;e=+e,t>>>=0,n||v(this,e,t,r,(i=Math.pow(2,8*r-1))-1,-i);var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},g.prototype.writeIntBE=function(e,t,r,n){var i;e=+e,t>>>=0,n||v(this,e,t,r,(i=Math.pow(2,8*r-1))-1,-i);var a=r-1,o=1,s=0;for(this[t+a]=255&e;0<=--a&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},g.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},g.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},g.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},g.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},g.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},g.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},g.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},g.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},g.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},g.prototype.copy=function(e,t,r,n){if(!g.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),t=t||0,0=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(a=t;a>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function P(e){return base64Js.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function x(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function R(e){return e!=e}var N=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()}),buffer_1=buffer.Buffer,buffer_2=buffer.SlowBuffer,buffer_3=buffer.INSPECT_MAX_BYTES,buffer_4=buffer.kMaxLength,CryptoJS=CryptoJS||function(u){var e={},t=e.lib={},r=t.Base={extend:function(e){n.prototype=this;var t=new n;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}};function n(){}var g=t.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||a).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=u.ceil(t/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(){}}),i=e.enc={},a=i.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new g.init(r,t/2)}},o=i.Latin1={stringify:function(){},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new g.init(r,t)}},s=i.Utf8={stringify:function(){},parse:function(e){return o.parse(unescape(encodeURIComponent(e)))}},c=t.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=s.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,r=t.words,n=t.sigBytes,i=this.blockSize,a=n/(4*i),o=(a=e?u.ceil(a):u.max((0|a)-this._minBufferSize,0))*i,s=u.min(4*o,n);if(o){for(var c=0;c>>7)^(r<<14|r>>>18)^r>>>3)+f[h-7]+((n<<15|n>>>17)^(n<<13|n>>>19)^n>>>10)+f[h-16]),r=d+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&u^~l&g)+p[h]+f[h],n=((a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22))+(a&o^a&s^o&s),d=g,g=u,u=l,l=c+r|0,c=s,s=o,o=a,a=r+n|0}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+s|0,i[3]=i[3]+c|0,i[4]=i[4]+l|0,i[5]=i[5]+u|0,i[6]=i[6]+g|0,i[7]=i[7]+d|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(64+n>>>9<<4)]=i.floor(r/4294967296),t[15+(64+n>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash}});r.SHA256=a._createHelper(o),r.HmacSHA256=a._createHmacHelper(o)}(Math),function(){function e(){return n.create.apply(n,arguments)}for(var t=CryptoJS,r=t.lib.Hasher,n=(i=t.x64).Word,i=(i.WordArray,t.algo),a=(e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591),[]),o=0;o<80;o++)a[o]=e();i=i.SHA512=r.extend({_doReset:function(){},_doProcessBlock:function(){},_doFinalize:function(){},clone:function(){},blockSize:32}),t.SHA512=r._createHelper(i),t.HmacSHA512=r._createHmacHelper(i)}(),rxa=CryptoJS,(sxa=rxa.x64).Word,sxa.WordArray,vxa=(sxa=rxa.algo).SHA512,sxa=sxa.SHA384=vxa.extend({}),rxa.SHA384=vxa._createHelper(sxa),rxa.HmacSHA384=vxa._createHmacHelper(sxa),xxa=CryptoJS.enc.Utf8,CryptoJS.algo.HMAC=CryptoJS.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=xxa.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,s=a.words,c=0;c>6)+b64map.charAt(63&t);if(n+1==e.length?(t=parseInt(e.substring(n,n+1),16),r+=b64map.charAt(t<<2)):n+2==e.length&&(t=parseInt(e.substring(n,n+2),16),r+=b64map.charAt(t>>2)+b64map.charAt((3&t)<<4)),b64pad$1)for(;0<(3&r.length);)r+=b64pad$1;return r}function BigInteger(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function nbi(){return new BigInteger(null)}BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<>8&255,rng_pool[rng_pptr++]^=e>>16&255,rng_pool[rng_pptr++]^=e>>24&255,rng_psize<=rng_pptr&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(null==rng_pool){var t,rng_pool=new Array,rng_pptr=0;if(void 0!==window&&(void 0!==window.crypto||void 0!==window.msCrypto)){var crypto=window.crypto||window.msCrypto;if(crypto.getRandomValues){var ua=new Uint8Array(32);for(crypto.getRandomValues(ua),t=0;t<32;++t)rng_pool[rng_pptr++]=ua[t]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5")for(var z=window.crypto.random(32),t=0;t>>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}function SecureRandom(){}var jsonParse=(bya=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),cya=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),dya=new String(""),function(e,t){var r,n=e.match(bya),i=n[0],a=!1;"{"===i?s={}:"["===i?s=[]:(s=[],a=!0);for(var o,s,c=[s],l=1-a,u=n.length;lthis.getEventCacheLimit()?logger.log("Exceeding the event cache limit. Skip"):(this.requestId++,this.eventCacheLength+=this.serialized.length,this.eventCache[this.requestId]=this.serialized)),this.initEventQueue())}},{key:"append",value:function(e,t,r,n){var i,a,o,s,c,l,u,g,d,h,p,f,I,m=3constants.storage.RETRY_LIMIT?(a.stopUploading(),a.initEventQueue()):a.uploadWaiting&&setTimeout(function(){a.serializeAndUpload(!0)},100)))},n)"Content-length"!==n&&"Connection"!==n&&o.setRequestHeader(s,n[s]);"POST"===i?o.send(e):o.send()}catch(e){}}},{key:"convertToProtobuf",value:function(e,t,r,n){var i=n.sessionId,a=n.viewId,o=n.userId,s=config.getSiteid();if(s&&o&&i){var c=$root.com.auryc.ubi.core.model.Message,l=new buffer_1(e),u=new c.MessagePacket({vid:a,ts:r,status:t,size:l.length,data:l}),g=new c({cid:s,uid:o,sid:i,domain:document.domain.toString(),context:new c.MessageContext({ln:"Web",lv:"4.7.17",ref:document.referrer}),packet:[u]}),d=c.verify(g);if(d)throw Error(d);return c.encode(g).finish()}return null}},{key:"getUTCTime",value:function(){var e=new Date,t=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return Math.floor(t/1e3)}},{key:"getStatusInt",value:function(e,t){var r=0;return 1===e&&(r|=1),1===t&&(r|=2),this.isUpgradedToCoBrowsing()&&(r|=4),r}},{key:"getJWTToken",value:function(){var e={};e.iss=config.getSiteid(),e.iat=this.getUTCTime()-12e4;var t=config.getSiteToken(),r=JSON.stringify({alg:"HS256",typ:"JWT"}),n=JSON.stringify(e);return jsrsasign.jws.JWS.sign("HS256",r,n,{rstr:t})}},{key:"getJWTToken2",value:function(e){var t=this.getUTCTime(),r=void 0,r=e?Math.floor((e+constants.record.upload.maxRetryTime)/1e3):t+Math.floor(constants.record.upload.maxRetryTime/1e3);e=Math.floor(e/1e3)||this.getUTCTime();var n={};n.iss=config.getSiteid(),n.iat=t,n.exp=r;var i=config.getSiteToken(),a=JSON.stringify({alg:"HS256",typ:"JWT"}),o=JSON.stringify(n);return jsrsasign.jws.JWS.sign("HS256",a,o,{rstr:i})}},{key:"splitEvents",value:function(e){var t=[];if(1===e.length)return[e];var r,n,i=Math.floor(e.length/2),a=e.slice(0,i),o=e.slice(i);return JSON.stringify(a).length>constants.storage.MAX_PACKET_SIZE&&1constants.storage.MAX_PACKET_SIZE&&1=u.sessionTime&&e._v===u.viewId&&e._s===u.sessionId&&t-e.t=this.lastEvtTime?(c=c.filter(function(e){return l.isDelayedEvent(e.d.et)?e.ct>=l.lastEvtTime:e.t>=l.lastEvtTime}),this.lastEvtTime=r||this.lastEvtTime):c=[]:this.lastEvtTime=r,c&&0!==c.length&&(n=(c=this.addDeviceInfoEvent(c))[0].t,c.forEach(function(e){e.t=e.t-n,delete e.ct}),i=JSON.stringify(c),a=function(e,t,r,n){var i,a,o,s=l.getStatusInt(n,l.cobrowsing),c=l.convertToProtobuf(e,s,r,u);c&&(logger.log("SIZE: pb data length: "+c.length,!0),i=l.getJWTToken(r),a=l.getUploadUri(),o={"Content-Type":"application/x-protobuf;charset=utf-8",Authorization:i},l.useProxy()&&(o["Payload-Type"]=0),config.isSelectiveRecording()&&(o["X-Message-Type"]=1),l.uploadToServer(c,t,a,o,"POST",r))},config.getCompress()&&!this.isCompressBlackList()?this.useWebWorker()?(o=this.getStatusInt(1,this.cobrowsing),s=this.createWorkerData("data",{data:i,properties:_extends({},u,{startTime:n,siteId:config.getSiteid(),siteToken:this.getJWTToken(n),referrer:document.referrer,flag:o,uploadUrl:this.getUploadUri(),useProxy:this.useProxy(),requestId:this.requestId,domain:document.domain.toString(),selectiveRecording:config.isSelectiveRecording()})}),this.worker.postMessage(s),this.worker.onmessage=function(e){l.eventCache[e.data]&&(l.eventCacheLength-=l.eventCache[e.data].length,delete l.eventCache[e.data])},this.resetSerialized()):Zlib.splitAndProcess(i,e,constants.record.upload.fragLength,this.browser,n,a):a(i,e,n,0))):logger.log("Empty event list. Skip")}}},{key:"resetSerialized",value:function(){this.serialized=""}},{key:"createWorkerData",value:function(e,t){return _extends({type:e},t)}},{key:"isCompressBlackList",value:function(){var e=getInstance(),t=config.getPerfBlacklist(),r=t.urls||[],n=(t.browser_cutoff||{})[e.browser.name];if(n&&e.browser.versiont.name?1:0}),t=t.concat(i));for(var c=1,l=1,u=previousElementSibling(e);u;)c++,u.tagName===e.tagName&&l++,u=previousElementSibling(u);return t.push({name:":nth-child",value:c}),t.push({name:":nth-of-type",value:l}),t}var ELEMENT_NODE=1;function previousElementSibling(e){if(e.previousElementSibling)return e.previousElementSibling;for(;(e=e.previousSibling)&&e.nodeType!==ELEMENT_NODE;);return e}var eventTargetParser={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;for(;(e=e.previousSibling)&&e.nodeType!==Node.ELEMENT_NODE;);return e},_loadScript:function(e,t){var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=t;var n=document.getElementsByTagName("script");0]*>[\s\S]*?<\/style>/gi,function(e){if(!e)return"";if(MATCH_COUNT_LIMITc&&(g.innerHTML="")}return config.shouldIncludeInputValuesInHTML()&&this.addValueAsAttributes(i),getPIIHandler().processMaskElement(i,n),getPIIHandler().processHiddenElement(i,n),getPIIHandler().processAttribute(i),this.handleDomHTML(this._getDocTag()+this.getOuterHTML(i),t)}catch(e){return logger.log("serialize error: ",e),null}}},{key:"getOuterHTML",value:function(e){if(config.supportsDeclarativeShadowDOM()){var t=document.implementation.createHTMLDocument("").createElement("html");return"function"!=typeof t.getInnerHTML?e.outerHTML:(t.appendChild(e),""+t.getInnerHTML({includeShadowRoots:!0}))}return e.outerHTML}},{key:"prepShadowDOMHTML",value:function(e,t){var r=getPIIHandler().tagDynamic(e,document);if("true"===r){getPIIHandler().addMaskAttributeToTags(e);var n=dom.cloneDomNode(e);return getPIIHandler().processMaskElement(n),getPIIHandler().processHiddenElement(n),getPIIHandler().processAttribute(n),this.handleDomHTML(n.innerHTML,t)||[]}if("false"!==r)return this.handleDomHTML(e.innerHTML,t)||[];var i=dom.cloneDomNode(e);return getPIIHandler().isAttributeProcessRequired(e)&&getPIIHandler().processAttribute(i),this.handleDomHTML(i.innerHTML,t)||[]}},{key:"processShadowDOM",value:function(e,t,r){for(var n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null,!1),i=n.nextNode();null!==i;){try{var a,o,s,c=i.shadowRoot;c&&(a=globalCacheObj.getNodeXPath(i),a=[].concat(toConsumableArray(a),["shadowRoot"]),o=this.prepShadowDOMHTML(c,a),(s={}).x=t.updateNodeDict(a),s.dom=o,s.v="",s._to=_.now(),t.append(EventType.MutNodeTextT(),s,r),this.processShadowDOM(c,t,r))}catch(e){}i=n.nextNode()}}},{key:"getBlobStyleCount",value:function(e){for(var t=e.querySelectorAll("link"),r=0;r")+":"+e.lineno+":"+e.colno;return r.length>MAX_VALUE_LENGTH&&(t=r.length-MAX_VALUE_LENGTH,r=r.subStr(t)),r}function getFileRelativeLocation(e){var t,r=(getUrlObject(e.filename).pathname||"")+":"+e.lineno+":"+e.colno;return r.length>MAX_VALUE_LENGTH&&(t=r.length-MAX_VALUE_LENGTH,r=r.subStr(t)),r}function trimLength(e){return(e||"").substr(1>(-2*i&6))))n=chars.indexOf(n);return o}InvalidCharacterError.prototype=new Error,InvalidCharacterError.prototype.name="InvalidCharacterError";var atob="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||polyfill;function b64DecodeUnicode(e){return decodeURIComponent(atob(e).replace(/(.)/g,function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}var base64_url_decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return b64DecodeUnicode(t)}catch(e){return atob(t)}};function InvalidTokenError(e){this.message=e}InvalidTokenError.prototype=new Error,InvalidTokenError.prototype.name="InvalidTokenError";var lib=function(e,t){if("string"!=typeof e)throw new InvalidTokenError("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(base64_url_decode(e.split(".")[r]))}catch(e){throw new InvalidTokenError("Invalid token specified: "+e.message)}},InvalidTokenError_1=InvalidTokenError;function normalizeStr(e){return e&&_.isString(e)?e.replace(/\u00a0/g," "):e}function getRegEx(e){return e instanceof Array||(e=[e]),new RegExp(e[0])}lib.InvalidTokenError=InvalidTokenError_1;var subdomainRegex=/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/i;function getObjectProperty(e,t){var r=2this.throttleInterval)&&(n=!0),n&&Object.keys(this.lastSent).lengthpossible_click&&click_events.splice(0,click_events.length-possible_click),5<=click_events.length&&(null!=(t=detectXClicks(no_of_clicks,time$1))&&(removeUsedClickPoints(5),r(t)))}},map={rageClick:rageClick};function getListener(e){return map[e]}function setupCutomDataCollection(){var e=0this.childCharMutsCntLimit?this.setLimit():this.childCharMutsCnt++,e&&e.innerHTML&&(this.childCharMutsLength+e.innerHTML.length>this.childCharMutsSizeLimit?this.setLimit():this.childCharMutsLength+=e.innerHTML.length))}},{key:"setLimit",value:function(){this.childCharMutsLimitEnabled&&(this.childCharMutsLimit=!0)}},{key:"resetState",value:function(){var e;this.childCharMutsLimitEnabled&&(e=config.getConfig("mutation","record")||{},this.childCharMutsLimitEnabled=!0===e.throttled,this.childCharMutsLimitEnabled&&(this.mutationWl.some(function(e){return-1n&&(n=o.index,i=o)}return{minIndex:t,maxIndex:n,minNodeWrapper:r,maxNodeWrapper:i}}},{key:"findCommonAncestor",value:function(e){var t=[];if(1constants.record.throttler.IMG_SRC_LENGTH||d.src&&d.src.length>constants.record.throttler.IMG_SRC_LENGTH){u=c=!0;break}}var h=config.getMaxInlineSVGLength();if(h)for(var p=E.querySelectorAll("svg"),f=0;fconstants.record.throttler.IMG_SRC_LENGTH&&b.setAttribute("alt",""),b.src&&b.src.length>constants.record.throttler.IMG_SRC_LENGTH&&b.setAttribute("src","")}}if(l)for(var C=config.getMaxInlineSVGLength(),y=dom.querySelectorAll(I,"svg")||[],A=0;AC&&(v.innerHTML="")}}if("style"===o)a=DomSerialize.getInstance().handleDomHTML((I||E).outerHTML,n);else if("head"===o)a=DomSerialize.getInstance().handleDomHTML((I||E).outerHTML,n);else if("true"===i){getPIIHandler().addMaskAttributeToTags(T.getDocObj());var w=I||dom.cloneDomNode(E);getPIIHandler().processMaskElement(w,T.getDocObj()),getPIIHandler().processHiddenElement(w,T.getDocObj()),getPIIHandler().processAttribute(w),a="body"===o?DomSerialize.getInstance().handleDomHTML(w.outerHTML,n):DomSerialize.getInstance().handleDomHTML(w.innerHTML,n)}else if("false"===i){var S=I||E;getPIIHandler().isAttributeProcessRequired(T.getDocObj())&&(S=I||dom.cloneDomNode(E),getPIIHandler().processAttribute(S)),a="body"===o?DomSerialize.getInstance().handleDomHTML(S.outerHTML,n):DomSerialize.getInstance().handleDomHTML(S.innerHTML,n)}else if("skip"===i)return;if(!a)return;var k={};k.x=P.eventWriter.updateNodeDict(n,P.processor),k.dom=a,k.v="",k._to=t,globalSessionTracker.isSpaSendPV()&&(k.pvid=globalSessionTracker.getPV()),P.eventWriter.append(EventType.MutNodeTextT(),k,T),P.processor.notifyDomUpdated(E),P.processor.trackNodeDictionary(),P.customDataDefs.length&&userProperty.collectCustomData(P.customDataDefs,!0,E,P.processor.getWinObj())}catch(e){}})}}}]),kVa);function kVa(e){if(classCallCheck(this,kVa),this.processor=e,this.customDataDefs=[],this.eventWriter=EventWriter.getInstance(),this.headPath="",this.bodyPath="",this.shadowDOMOverride=!1,this.setupCustomConfig(),this.mutBlacklist=config.getPerfBlacklist(),this.mutExclude=config.getMutExcludeList(),!this.isMutationBlackList())try{this.registerMutationEvents(this.processor)}catch(e){}this.mutNodeIdx=0,this.evtProcessIndex=0,this.blocked=!1,this.mutsToProcess=[],this.prevMutNode=null,this.duplicateStyle={};var t=config.getConfig("mutation","record")||{};this.mutationBl=(t.ignore||"").split(","),this.mutationWl=(t.allowUrl||"").split(","),this.processingDelay=t.delay||constants.record.throttler.DOM_MUT_DELAY,this.timeOffsetBaseTime=0,this.childCharMutsCnt=0,this.childCharMutsLength=0,this.childCharMutsLimit=!1,this.limitNotified=!1,this.mutationWl.some(function(e){return-1t&&(e=e.substring(0,t),e+="..."),e}catch(e){return""}}},{key:"getExceedLimitMsg",value:function(e){return{l:"warn",m:"Number of messages reached the limit.",s:"",src:e.src,p:_extends({},e.p,{internal:!0})}}},{key:"addToCache",value:function(e,t){var r=this;if(100<=Object.keys(this.cacheEvent))for(var n=Object.keys(this.cacheEvent).sort(function(e,t){return r.cacheEvent[e]-r.cacheEvent[t]}),i=0;i<20;i++)delete this.cacheEvent[n[i]];this.cacheEvent[e]=t}},{key:"exceedLimit",value:function(){var e=this.totalMsg>constants.storage.MAX_DEV_CONSOLE_EVENT;return e&&(this.disabled=!0),e}},{key:"appendEvent",value:function(e,r){var t,n,i,a,o=this;this.disabled||(t=this.getEventProperties(),e.p=_extends({},e.p,t),n=encoder.hashCode(JSON.stringify(e)),i=_.now(),this.exceedLimit()?(a=this.getExceedLimitMsg(e),this.eventWriter.append(EventType.ConsoleT(),a,this.rcProcessor)):this.isExpired(n,i)&&(this.addToCache(n,i),this.eventWriter.append(EventType.ConsoleT(),e,this.rcProcessor),this.totalMsg++,this.rule&&this.rule.properties&&r&&this.rule.properties.forEach(function(e){var t=handleJSError(r,e,o.rcProcessor.getWinObj()||window,!0);null!==t&&sendCustomData(e,t)})))}},{key:"getValidPromiseReason",value:function(e){if(_.isString(e))return"Uncaught exception (in promise) "+e;try{return"Uncaught exception (in promise) "+JSON.stringify(e)}catch(e){return"Uncaught exception (in promise)"}}},{key:"trackPromiseErrors",value:function(){try{_.addEventListener(this.rcProcessor.getWinObj(),"unhandledrejection",this.unhandledrejectionHandler)}catch(e){}}},{key:"saveConsoleEvent",value:function(e,t){if(!globalSessionTracker.isCanceled()){var r=Array.prototype.slice.call(e).join(","),n="";if(config.isStackTraceEnabledForConsole())try{n=(new Error).stack}catch(e){}var i={l:t,m:this.truncateMsg(r,constants.storage.CONSOLE_MSG_LENGTH),s:this.truncateMsg(n,constants.storage.CONSOLE_MSG_STACKTRACE_LENGTH),src:browser$1.locationInfo(),p:{}};this.appendEvent(i)}}},{key:"trackConsole",value:function(){var e,t,r,n,i=this;void 0!==window.console&&(e=console.log,t=console.error,r=console.warn,n=console.info,console.error=function(){try{i.saveConsoleEvent(arguments,"error")}catch(e){}t.apply(console,arguments)},console.log=function(){try{i.saveConsoleEvent(arguments,"log")}catch(e){}e.apply(console,arguments)},console.warn=function(){try{i.saveConsoleEvent(arguments,"warn")}catch(e){}r.apply(console,arguments)},console.info=function(){try{i.saveConsoleEvent(arguments,"info")}catch(e){}n.apply(console,arguments)})}},{key:"pause",value:function(){console.log=this._originalLog,console.error=this._originalError,console.warn=this._originalWarn,console.info=this._originalInfo,_.removeEventListener(this.rcProcessor.getWinObj(),"error",this.windowErrorHandler),_.removeEventListener(this.rcProcessor.getWinObj(),"unhandledrejection",this.unhandledrejectionHandler),browser$1.setItem("sessionStorage",constants.api.disable_console,"true"),this.paused=!0}},{key:"resume",value:function(){this.paused&&(this.trackWindowErrors(),this.trackPromiseErrors(),this.trackConsole(),browser$1.setItem("sessionStorage",constants.api.disable_console,"false"),this.paused=!1)}}]),k2a);function k2a(e){var c=this;classCallCheck(this,k2a),this.windowErrorHandler=function(e){var t,r,n,i,a,o,s;globalSessionTracker.isCanceled()||(r=void 0===(t=e.filename)?"":t,n=e.lineno,i=e.colno,a=e.message,o="",e.error&&(a=e.error.message||a,o=e.error.stack),s={l:"exception",m:c.truncateMsg(a,constants.storage.CONSOLE_MSG_LENGTH),s:c.truncateMsg(o,constants.storage.CONSOLE_MSG_STACKTRACE_LENGTH),src:c.eventGenerator.getConsoleTarget(e),p:{filename:r,lineno:n,colno:i}},_.isDefined(s.m)&&-1===r.indexOf("auryc")&&c.appendEvent(s,e))},this.trackWindowErrors=function(){try{_.addEventListener(c.rcProcessor.getWinObj(),"error",c.windowErrorHandler)}catch(e){}},this.isExpired=function(e,t){var r=c.cacheEvent[e];return!r||5e3constants.ajax_proxy.limits.size&&(c={content:l.substring(0,constants.ajax_proxy.limits.size)+"...",notice:"Only partial content is shown because it has exceeded the size limit of 1MB."}),t[r]=c}return t}},{key:"assignBody",value:function(e,t,r){var n=t.shift();if(r[n]||(r[n]={}),0===t.length)return r[n]=e[n],r;this.assignBody(e[n],t,r[n])}},{key:"isResponseText",value:function(e){return!_.isUndefined(e)&&("text"===e||""===e)}},{key:"isJsonType",value:function(e){if(!e)return!1;var t="";return e.headers?t=e.headers.get("content-type")||e.headers.get("Content-Type")||"":e._header&&(t=config.getParameterCaseInsensitive(e._header,"content-type")||""),-1"+Math.floor(constants.storage.MAX_LATENCY/1e3)+"s"}},{key:"getEventProperties",value:function(){return superProperties.getSuperEventProperties(DataLayer.getInstance(constants.symbols.SESSION),DataLayer.getInstance(constants.symbols.PERMANENT))}},{key:"ajaxProxyHandler",value:function(){config.isAjaxProxyEnabled()&&!config.isAjaxBlacklist()&&setupAjaxProxy(this,this.processor.getWinObj())}},{key:"viewChageHandler",value:function(){var e,n=this,i=this.processor.getDocObj(),a=browser$1.visibilityEventPrefix(),o=_.isObject(history.state)&&history.state&&history.state.title||getDocumentTitle(document),s=globalSessionTracker.getSessionMetadata().viewId;_.addEventListener(i,a+"visibilitychange",function(){var e,t,r;n.processor&&(globalSessionTracker.getSessionMetadata().isOver||(e="hidden"===i[(""===a?"v":a+"V")+"isibilityState"],t=1,r=EventType.ViewChangeT(),e&&(t=2),n.eventWriter.append(r,{k:"vc",v:{sid:s,status:t,url:obfuscateUrl(location.href),title:o}},n.processor)))}),browser$1.canUseVisibilityChange()?_.addEventListener(i,a+"visibilitychange",function(){n.processor&&"hidden"===i[(""===a?"v":a+"V")+"isibilityState"]&&(logger.log("visibility hidden. commit data",!0),n.eventWriter.syncToServerAndPersist(getInstance().isPhoneOrTablet()))}):(e=getInstance().isPhoneOrTablet()?"unload":"beforeunload",_.addEventListener(this.processor.getWinObj(),e,function(){n.processor&&(logger.log("befoerunload fires. commit",!0),n.eventWriter.syncToServerAndPersist(!0))})),browser$1.isSafari()&&getInstance().isPhoneOrTablet()&&_.addEventListener(this.processor.getWinObj(),"pagehide",function(){n.processor&&(logger.log("pagehid fires.commit data",!0),n.eventWriter.syncToServerAndPersist(!1))}),_.addEventListener(this.processor.getWinObj(),"mouseout",function(e){if(n.processor){var t=(e=e||n.eventWriter.getWinObj().event).relatedTarget||e.toElement,r=void 0;try{t&&(r=t.nodeName)}catch(e){}(!t||r&&"HTML"===r)&&n.eventWriter.syncToServerAndPersist(!0)}})}},{key:"initMobileCapture",value:function(e){return this.hammer||(this.hammer=new Hammer(e,{touchAction:"auto"}),this.hammer.get("pan").set({direction:Hammer.DIRECTION_ALL}),this.hammer.get("pinch").set({enable:!0})),this.hammer}},{key:"getSizes",value:function(e){if(this.processor){var t,r,n,i,a=dom.getSize(this.processor.getWinObj()),o=this.processor.doc,s=dom.getDocSize(o),c={w:s.width,h:s.height},l=0;return getInstance().isPhoneOrTablet()&&(t=a,a=c,c=t,270===(l=screen&&screen.orientation?screen.orientation.angle:window.orientation)&&(l=-90),0!==l?(c.wc.h&&(i=c.w,c.w=c.h,c.h=i)),0getMaxWinHeight()-100&&(o.scrollToBottomFlag||(o.scrollToBottomFlag=!0,config.checkDomOnloadSampling()&&o.processor.generateHTML(null,null,getMaxWinHeight())))))},constants.record.throttler.WIN_EVENT_THROTTLE))}},{key:"getRelatedTarget",value:function(e,t){return e.relatedTarget?e.relatedTarget:"to"===t?e.toElement||null:"from"===t&&e.fromElement||null}},{key:"trackMouseEnterLeave",value:function(){var n=this;this.processor.mouseEnter(),_.addEventListener(this.processor.getDocObj(),"mouseover",function(e){n.processor&&(n.processor.hasMouse()||n.getRelatedTarget(e||n.processor.getWinObj().event,"from")||(n.eventWriter.append(EventType.MouseLeaveEntryT(),{v:1,trusted:e&&e.isTrusted},n.processor),n.processor.mouseEnter()))}),_.addEventListener(this.processor.getDocObj(),"mouseout",function(e){var t,r;n.processor&&(r=(t=n.getRelatedTarget(e||n.processor.getWinObj().event,"to"))&&"HTML"===t.nodeName,!n.processor.hasMouse()||t&&!r||(n.eventWriter.append(EventType.MouseLeaveEntryT(),{v:0,trusted:e&&e.isTrusted},n.processor),n.processor.mouseOut()))})}},{key:"monitorPointingDevice",value:function(e){getInstance().isPhoneOrTablet()?this.trackMobileActions(e):this.trackDesktopActions(),this.processor.isTopMostProc()&&this.trackMouseEnterLeave()}},{key:"seriaCalBack",value:function(t){setTimeout(function(){for(var e=0;e"+getDocumentTitle(this.currWindow.document)+"Not Recorded"}:DomSerialize.getInstance().serialize(this.currWindow,this.getProcXPath(),d),l=(c=_.get(this,"currWindow.location.href"))?obfuscateUrl(c.toString()):"",_.isUndefined(r)||(l="ScrollToBottom_"+r),logger.liveDebug("generate HTML on "+l,this.myXPath.join(",")),_.isNumber(o)||(o=_.now()),u={"cD:nO:lM":s,comp:1,"hId:cId":a,"sCurr:kTime":o,"tLoc:qHref:k":l,jType:DomSerialize.getInstance().getDocType(),"sTime:cLat":this.getPerfLantecy()},g=d.updateNodeDict(this.getProcXPath()),_.disableEvent(EventType.HTMLTextT())||(d.append(EventType.HTMLTextT(),u,g),this.trackNodeDictionary(),config.supportsDeclarativeShadowDOM()||DomSerialize.getInstance().processShadowDOM(this.currWindow.document,d,g)))}},{key:"notifyDomUpdated",value:function(e){this.domUpdatedEvent&&this.domUpdatedEvent.publishTopic(e)}},{key:"notifyPauseResume",value:function(e){this.pauseResumeEvent&&this.pauseResumeEvent.publishTopic(e)}},{key:"notifyModuleEvent",value:function(e){this.toggleModuleEvent&&this.toggleModuleEvent.publishTopic(e)}},{key:"getMyCoordinates",value:function(){return this.myCoordinates}},{key:"isCrossDomainIframe",value:function(){return this.crossDomainIframe}},{key:"initCapture",value:function(e,t){var r=this;this.rcEventMonitor||(this.domUpdatedEvent=new PubSubTopic,this.rcEventMonitor=new RcEventMonitor(this,getInstance()),this.domUpdatedEvent.addListener(function(e){e=e||r.currWindow.document.body,r.rcFrame&&r.rcFrame.handleIframe(r,e),r.rcEventMonitor.handleFormInputs(e),r.trackDocSizeChange()}),AurycPubSub.addListener(constants.events.ENDSESSION,function(e){r.rcFrame&&r.rcFrame.handleIframeEndSession(r)}),this.pauseResumeEvent=new PubSubTopic,this.pauseResumeEvent.addListener(function(e){r.rcFrame&&r.rcFrame.handleIframePauseResume(r,e)}),this.rcFrame=RcFrame.getInstance(),!0===e&&(logger.liveDebug("call generateHTML for iframe:"+this.currWindow.location.href),this.generateHTML(null,null,null,!t)),this.toggleModuleEvent=new PubSubTopic,this.toggleModuleEvent.addListener(function(e){r.rcEventMonitor.handleToggleEvent(e)}))}},{key:"trackNodeDictionary",value:function(){}},{key:"sendFramePage",value:function(e){this.currWindow&&(this.generateHTML(null,null,null,e),this.isCrossDomainIframe()&&globalSessionTracker.setSessionCrossDomainFrame(!0))}}],[{key:"getInstance",value:function(e,t){var r;return e=e||window,_9a.instance||(t?(r=t.fpath.split(","),_9a.instance=new _9a(e,r,null,!0,t.myCoordinates)):_9a.instance=new _9a(e)),_9a.instance}}]),_9a);function _9a(e){var t=1"+baseIcon+""):(e.fontColor&&_.isValidColor(e.fontColor)&&(n='style="fill:'+e.fontColor+";color:"+e.fontColor+'"'),'"),a=document.createElement("div"),a=toDomNode('
'+r+"
");t.isPhone()&&!i?a.addCssCls("auryc-feedback-tab-dt-"+t.getDT().toLowerCase()+"-new"):a.addCssCls("auryc-feedback-tab-dt-"+t.getDT().toLowerCase());var o=this.getLocationCss(t.isPhone()&&e.fblocation_mobile?e.fblocation_mobile:e.fblocation);return t.isPhone()&&i&&(o=this.getLocationCss("bottomright")),t.isPhone()&&i||"horizontal"===e.fbdirection?a.addCssCls("auryc-feedback-tab-loc-"+o+"-horizontal"):a.addCssCls("auryc-feedback-tab-loc-"+o),e.backgroundColor&&_.isValidColor(e.backgroundColor)&&a.css({backgroundColor:e.backgroundColor}),a}},{key:"getLocationCss",value:function(e){switch(e){case"bottomright":return"br";case"bottomleft":return"bl";case"middleleft":return"cl";case"middleright":return"cr";case"topright":return"tr";case"topleft":return"tl"}}},{key:"getFBTabDomNode",value:function(){return this.fbTabEl}},{key:"render",value:function(e){e&&document.body.appendChild(this.getFBTabDomNode()),this.cfg.preview?(this.cfg.badgeTemplate&&this.setChatVisible(!0),this.setVisible(!0)):this.setVisible(!1),this.applyCustomProperties(this.cfg)}},{key:"setClicked",value:function(){this.clicked=!0,this.cfg&&!1===this.cfg.autoHide||this.setFeedbackVisible(!1)}},{key:"setFeedbackVisible",value:function(e){var t,r=e?"block":"none",n=void 0;(n=0<=this.fbTabEl.id.indexOf("auryc-feedback-tab")?[this.fbTabEl]:this.fbTabEl.sel("#auryc-feedback-tab"))&&0r)}var r,n=this.fbTab,i=this.config;void 0!==i.projectId&&!1!==i.showBadge&&feedbackAPI._getFeedbackEnabled()||(e=!1),"D"===i.triggerbehavior?(this.delayFBTabTimer&&clearTimeout(this.delayFBTabTimer),e&&(this.delayFBTabTimer=setTimeout(function(){feedbackAPI._getFeedbackEnabled()&&n.setFeedbackVisible(!0)},1e3*i.triggerdelayseconds))):"T"===i.triggerbehavior||"S"===i.triggerbehavior?e?(r=browser$1.getWinSize(window),document.body.scrollHeight<=r.h?n.setFeedbackVisible(!0):browser$1.addDomEvent(window,"scroll",t)):(browser$1.removeDomEvent(window,"scroll",t),n.setFeedbackVisible(!1)):n.setFeedbackVisible(e)}},{key:"isPopupEnabled",value:function(e){return e.disabled?(logger.warn("Feedback is not enabled in config for project "+e.projectId),!1):!!this.criteria.isDelayedPopupActive(e)||(logger.warn("deplayed popup is not active in this session for project "+e.projectId),!1)}},{key:"setupDelayedPopup",value:function(e){if(!this.hasDelayedPopup(e))return!1;this.startTimer(this.siteId,e.projectId);var t=this;return unloadEvent.addListener(function(){t.handlePageUnload()}),!0}},{key:"setupExitPopup",value:function(e){var o=this;if(this.hasExitPopup(e))if(browser$1.getInstance().isPhoneOrTablet()){if(browser$1.isMobileSafariIOS15Plus())return;var s=constants.exit_popup.scrollPercent,t=constants.exit_popup.scrollInterval,c=browser$1.getScroll(window).y,l=dom.getDocSize(document).height,u=!1,g=globalSessionTracker.getSessionMetadata(),d=+(this.config.exitPopupDelay||"10"),h=!1;01.2*e;h&&(a||i>parseFloat(s)/100)&&(clearInterval(o.exitPopupMobileHandler),o.exitPopupMobileHandler=null,u||(n=(new Date).getTime()-g.sessionTime,d<=n/1e3&&o.launchFeedback(),u=!0))}catch(e){}},t))}else this.exitPopupHandler=function(e){var t=e.relatedTarget,r=(new Date).getTime(),n=globalSessionTracker.getSessionMetadata();if(n.isOver||!n.sessionTime)return!1;var i=+(o.config.exitPopupDelay||"10"),a=r-n.sessionTime;(!t||t!==document&&!dom.nodeBelongsTo(t,document))&&e.clientY<10&&i<=a/1e3&&o.launchFeedback()},browser$1.addDomEvent(document,"mouseout",this.exitPopupHandler)}},{key:"clearExitPopupHandler",value:function(){clearInterval(this.exitPopupMobileHandler),this.exitPopupHandler=null,this.exitPopupMobileHandler=null}},{key:"launchFeedback",value:function(){var e=this.config;if(this.criteria.isFeedbackShown(e)||!feedbackAPI._getFeedbackEnabled()||!this.criteria.passExtraConditions(e)||!this.criteria.passURLFilter(e))return!1;window.launchAurycFeedback(e.projectId,!1,!0)}},{key:"setup",value:function(e){if(!this.hasDelayedPopup(e))return!1;this.startTimer(this.siteId,e.projectId);var t=this;return unloadEvent.addListener(function(){t.handlePageUnload()}),!0}},{key:"handlePageUnload",value:function(){this.suspendTimer(this.siteId,this.config.projectId)}},{key:"handleTimeout",value:function(){var e=this.config,t=this.siteId;this.criteria.isDelayedPopupActive(e)&&null!==this.getTimeRemain(t,e.projectId)&&(this.setTimeRemain(t,e.projectId,null),this.launchFeedback())}},{key:"handleNavigation",value:function(e){var t=this,r=this.config;this.fbTab&&setTimeout(function(){t.fbTab.isValid()?t.displayFBTab(e):e&&t.setupFBTab()},1e3),this.hasDelayedPopup(r)&&(this.suspendTimer(this.siteId,r.projectId),e&&this.startTimer(this.siteId,r.projectId)),this.hasExitPopup(r)&&(this.clearExitPopupHandler(),e&&this.setupExitPopup(r))}},{key:"hasDelayedPopup",value:function(e){return e.popupDelayEnabled?!!this.isPopupEnabled(e)&&(logger.warn("delayed popup is enabled for project "+e.projectId+", delay: "+e.popupDelaySeconds+" seconds"),!0):(logger.warn("delayed popup is not enabled in config for project "+e.projectId),!1)}},{key:"hasExitPopup",value:function(e){return!(!e.exitPopupEnabled||!this.isPopupEnabled(e)||(logger.warn("exit popup is enabled for project "+e.projectId),0))}},{key:"startTimer",value:function(e,t){var r,n;this.criteria.isFeedbackShown(this.config)||(this.delayedPopupTimer&&clearTimeout(this.delayedPopupTimer),(r=this.getTimeRemain(e,t))||0===r||(r=1e3*this.config.popupDelaySeconds,this.setTimeRemain(e,t,r)),(n=this).startTime=(new Date).getTime(),this.delayedPopupTimer=setTimeout(function(){n.handleTimeout()},r))}},{key:"suspendTimer",value:function(e,t){var r,n=(new Date).getTime()-this.startTime,i=this.getTimeRemain(e,t);null!==i&&(r=n=constants.css.TEXT_LIMIT?l.substr(0,constants.css.TEXT_LIMIT-1):l}else if(1<=s.length){var u=s[0],g=u.getAttribute("type");if(g===constants.css.HIDDEN.toLowerCase())a.answerId=u.value;else if(g!==constants.css.RADIO.toLowerCase())a.answerText=u.value;else for(var d=0;d)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):cache[e]=cache[e]||Pob.tmpl(document.getElementById(e).innerHTML);return t?r(t):r}},{key:"instantiate",value:function(e,t){return Pob.tmpl(e,t)}}]),Pob);function Pob(){classCallCheck(this,Pob)}function setBodyFocus(e){e||(document.body.hasAttribute("tabindex")?document.body.focus():(document.body.setAttribute("tabindex","-1"),document.body.focus(),setTimeout(function(){document.body.removeAttribute("tabindex")},2e3)))}var accessibility={setBodyFocus:setBodyFocus},FBView=(createClass(Zob,[{key:"fbInviteNoFn",value:function(){this.cfg.preview||(this.handleCloseInvite(),this.trackInviteEvent("InviteDecline"))}},{key:"initSpinner",value:function(){this.spinnerNode=toDomNode('')}},{key:"getModalDomNode",value:function(){return this.modalInnerContent}},{key:"getModalContainerDomNode",value:function(){return this.rootNode}},{key:"handleFBInteractions",value:function(r,t){var n=this;if(this.fbmodel){this.renderFB();var e=window.auryc.getFBShownHandler(this.fbmodel.fb.id);if(this.formName=this.fbmodel.fb.name,e)try{e({formName:this.formName})}catch(e){}}else r.getFeedbackData(function(e){n.fbmodel=e,r.fbConfig.launchedFromTimer&&n.init(),n.renderFB();var t=window.auryc.getFBShownHandler(e.fb.id);if(n.formName=e.fb.name,t)try{t({formName:n.formName})}catch(e){}});r.setupFBDoneHandler(function(e){n.modalInnerContent.replaceCssCls("auryc-fbmodal-body","auryc-fbmodal-body-enabled"),n.isFbSubmitted=!0,n.displayTYPage(),t&&t(e)})}},{key:"adjustSpinnerPos",value:function(){var e=getWinSize(window),t=this.getModalContainerDomNode();t.appendChild(this.spinnerNode);var r=t.offsetWidth-this.spinnerNode.offsetWidth,n={};n[constants.css.TOP]=(e.h-this.spinnerNode.offsetHeight)/2+constants.css.PX,n[constants.css.LEFT]=r/2+constants.css.PX,this.spinnerNode.css(n)}},{key:"removeSpinner",value:function(){this.spinnerNode&&this.spinnerNode.parentNode&&(this.spinnerNode.parentNode.removeChild(this.spinnerNode),this.spinnerNode=null)}},{key:"addSpinner",value:function(){this.removeSpinner(),this.initSpinner(),this.adjustSpinnerPos()}},{key:"hideMyself",value:function(e){this.rootNode.parentNode&&this.rootNode.parentNode.removeChild(this.rootNode),this.enableBodyOverflow(!0,e),accessibility.setBodyFocus(this.browser.isPhoneOrTablet())}},{key:"trackAbandoned",value:function(){AurycPubSub.publish(constants.events.FEEDBACKTRACKER,{eventType:constants.events.CUSTOM_EVENT,eventName:"Feedback Abandoned",tagName:"FeedbackAbandoned",eventProperties:{formid:this.cfg.projectId,name:"Feedback Abandoned",et:"abandoned"}})}},{key:"trackInviteEvent",value:function(e){AurycPubSub.publish(constants.events.FEEDBACKTRACKER,{eventType:constants.events.CUSTOM_EVENT,eventName:e,tagName:e,eventProperties:{formid:this.cfg.projectId,name:e,et:e}})}},{key:"trackAbandonEvents",value:function(t){var r=this;this.cfg.preview||this.cfg.popupDelayEnabled||this.cfg.exitPopupEnabled||this.cfg.fbStandalone||addDomEvent(t,"mousedown",function(e){e.target===t&&(r.isFbSubmitted||r.model.isSubmitting()||(r.trackAbandoned(r),r.fbCanceledFn&&r.fbCanceledFn({formid:r.cfg.projectId,formName:r.formName})),r.hideMyself())})}},{key:"displayTYPage",value:function(){var e=this,t=this.getModalDomNode();t.innerHTML=Templater.instantiate(this.tyTmpl,this.fbmodel);var r,n=t.querySelectorAll(".auryc-close-btn")[0],i=t.querySelectorAll('div[role="dialog"]')[0];i.setAttribute("tabindex","-1"),i.focus(),this.customizeTYStyles(),this.adjustModalPos(),this.cfg.fbStandalone?(i.blur(),n.parentNode.innerHTML="",this.cfg.redirectUrl&&(r='You are being redirect to '+this.cfg.redirectUrl+". If you are not redirect in 5 seconds, please click here.",i.innerHTML=i.innerHTML+r,setTimeout(function(){location.href=e.cfg.redirectUrl},5e3))):addDomEvent(n,"click",function(){e.hideMyself()}),n&&setTimeout(function(){n.focus()},500)}},{key:"customizeTYStyles",value:function(){this.cfg.customCss&&"center"===this.cfg.customCss.align&&this.addCenterStyle(".auryc-feedback-fblogo")}},{key:"init",value:function(){var t=this,e="Feedback Form Opens",r=document.createElement("div"),n='';this.cfg.fbStandalone&&(n=""),r.innerHTML='
\n
\n
\n \n
\n
',r=r.firstChild,this.rootNode=addDomMethods(r),this.headElem=addDomMethods(r.querySelectorAll(".auryc-fbmodal-head")[0]),this.modalInnerContent=addDomMethods(r.querySelectorAll(".auryc-fbmodal-body")[0]),document.body.appendChild(r),this.enableBodyOverflow(!1,window),addDomEvent(r.querySelectorAll(".auryc-fb-modal-closebtn")[0],"click",function(){return t.handleClose()}),this.cfg.fbStandalone||addDomEvent(document,"keydown",function(e){e.which===constants.keyCodes.esc&&(t.handleClose(),e.stopPropagation(),e.preventDefault())}),this.cfg.launchedFromTimer||this.addSpinner();var i=r.querySelectorAll(".auryc-fbmodal-bground")[0];-1===i.className.indexOf("enabled")&&(this.cfg.fbStandalone||(i.className="auryc-fbmodal-bground-enabled"),i.focus()),this.trackAbandonEvents(r.querySelectorAll("."+constants.css.FBMODAL_CONTAINER)[0])}},{key:"getTemplateContent",value:function(e,t){t&&"desktop"===t.toLowerCase()&&(e=e===constants.symbols.FEEDBACKINVITE?constants.symbols.FEEDBACKINVITE_DESKTOP:constants.symbols.FEEDBACKCONTENT_DESKTOP);var r=window[e];return encoder.decodeBase64(r)}},{key:"enableBodyOverflow",value:function(e){var t=toDomNode(window.document.body);e?this.bodyOverflowStyle&&(t.css(this.bodyOverflowStyle),this.browser.isPhoneOrTablet()&&(t.scrollTop=this.bodyScrollTop,t.css({position:this.bodyStylePosition,width:this.bodyStyleWidth})),this.bodyOverflowStyle=null,this.bodyScrollTop=0):(this.bodyOverflowStyle||(this.bodyOverflowStyle={overflow:t.style.overflow},this.browser.isPhoneOrTablet()&&(this.bodyScrollTop=t.scrollTop,this.bodyStylePosition=t.style.position,this.bodyStyleWidth=t.style.width)),t.css({overflow:"hidden"}),this.browser.isPhoneOrTablet()&&setTimeout(function(){t.css({position:"fixed",width:"100vw"})},200))}},{key:"validColor",value:function(){this.cfg&&(this.cfg.fontColor&&_.isValidColor(this.cfg.fontColor)&&(this.fbmodel.formConfig.btnFontColor=this.cfg.fontColor),this.cfg.backgroundColor&&_.isValidColor(this.cfg.backgroundColor)&&(this.fbmodel.formConfig.btnBackgroundColor=this.cfg.backgroundColor))}},{key:"renderFB",value:function(){var n=this;this.isFbSubmitted=!1,this.cfg.preview||AurycPubSub.publish(constants.events.FEEDBACKTRACKER,{eventType:constants.events.CUSTOM_EVENT,eventName:"Feedback Started",tagName:"FeedbackStarted",eventProperties:{formid:this.cfg.projectId,name:"Feedback Started",et:"started"}}),this.removeSpinner(),this.headElem.replaceCssCls("auryc-fbmodal-head","auryc-fbmodal-head-enabled"),this.validColor();var e=Templater.instantiate(this.fbFormTmpl,this.fbmodel);this.modalInnerContent.innerHTML=e,this.model.render(this,this.modalInnerContent),this.customizeStyles(),"desktop"===this.cfg.deviceType.toLowerCase()&&(addDomEvent(this.rootNode,"keydown",function e(t){var r;t.keyCode===constants.keyCodes.tab&&((r=n.rootNode.querySelectorAll(".fb-desktop")[0])&&(toDomNode(r).addCssCls("user-is-tabing"),n.model.setIsTabbing(!0)),removeDomEvent(n.rootNode,"keydown",e))}),setTimeout(function(){var e=n.rootNode.querySelectorAll(".auryc-fbmodal-content")[0];e&&e.removeAttribute("title")},3e3))}},{key:"addCenterStyle",value:function(e){var t=this.rootNode.querySelectorAll(e);t&&0\n
\n
\n \n
\n ',r=r.firstChild,o.rootNode=addDomMethods(r),o.validColor();var a=Templater.instantiate(o.inviteTmpl,o.fbmodel);o.modalInnerContent=r.querySelectorAll(".auryc-fbmodal-body-enabled")[0],o.modalInnerContent.innerHTML=a,o.customizeStyles(),document.body.appendChild(r),o.enableBodyOverflow(!1,window),addDomEvent(r.querySelectorAll(".auryc-fb-modal-closebtn")[0],"click",function(){return o.handleCloseInvite()}),addDomEvent(r.querySelectorAll("#invite-fb-yes-button")[0],"click",function(){return o.fbInviteYesFn()}),addDomEvent(r.querySelectorAll("#invite-fb-no-button")[0],"click",function(){return o.fbInviteNoFn()}),o.cfg.fbStandalone||addDomEvent(document,"keydown",function(e){e.which===constants.keyCodes.esc&&(o.handleCloseInvite(),e.stopPropagation(),e.preventDefault())});addDomEvent(o.rootNode,"keydown",function e(t){var r;t.keyCode===constants.keyCodes.tab&&((r=o.rootNode.querySelectorAll(".fb-desktop")[0])&&(toDomNode(r).addCssCls("user-is-tabing"),o.model.setIsTabbing(!0)),removeDomEvent(o.rootNode,"keydown",e))})}},ScreenShot$1=(createClass($qb,[{key:"mark",value:function(){}}]),$qb);function $qb(){classCallCheck(this,$qb)}var PopupController=function e(){var s=this;classCallCheck(this,e),this.getPopup=function(e){for(var t=s.popups.length,r=0;rconstants.storage.MAX_PROPERTIES&&(r[i]=r[i].slice(0,constants.storage.MAX_PROPERTIES)),t[i]=[];for(var a=0;as.value&&(s.value=g,s.entries=h,a()))}var a,s=r("CLS",0),g=0,h=[],f=a$1("layout-shift",i);f&&(a=c(n,s,e),o(function(){f.takeRecords().map(i),a(!0)}),u(function(){l=-1,s=r("CLS",g=0),a=c(n,s,e)}))},T={passive:!0,capture:!0},y=new Date,g=function(t,r){e||(e=r,t$1=t,n=new Date,w(removeEventListener),E())},E=function(){var t;0<=t$1&&t$1performance.now())return;n.entries=[e],t(n)}catch(e){}};"complete"===document.readyState?setTimeout(e,0):addEventListener("load",function(){return setTimeout(e,0)})},webvitals={},wvtimeoutid=null;function trackCoreWebVitals(){function e(e){var t,r=e.name,n=e.value,i=r&&r.toLowerCase();"cls"===i&&(n*=1e3),webvitals[r]=n,config.isEnhancedHM()&&("lcp"!==i||(t=ReplayProcessor.getInstance(window))&&(window.auryc&&window.auryc.track&&"function"==typeof window.auryc.track&&window.auryc.track("HM_LCP",{_auryc_intl_:!0}),t.generateHTML(!0,null,null,!0))),wvtimeoutid&&window.clearTimeout(wvtimeoutid),wvtimeoutid=setTimeout(function(){webvitals._auryc_intl_=!0,window.auryc&&window.auryc.track&&"function"==typeof window.auryc.track&&window.auryc.track("WebVitals",webvitals),webvitals={}},3e3)}h$1(e),d(e),L(e),F(e),P(e)}function trackNetworkInfo(){var t,r,e=0MAX_MEMORY_LIMIT&&(r=!0,unregister(t)),t.performance.memory.usedJSHeapSize>MAX_PERCENT_THRESHOLD/100*t.performance.memory.jsHeapSizeLimit&&(r=!0,unregister(t)),r||setTimeout(e,CHECK_INTERVAL)},CHECK_INTERVAL)}var isInitAuRecord=!1;function initModules(e){var t,r=1>>0,i=arguments[1],a=0;a>>0,i=0;i