(function(){var define=undefined;(function(){function h(a,s,o){function u(r,e){if(!s[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=s[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,h,a,s,o)}return s[r].exports}for(var l="function"==typeof require&&require,e=0;e>>0};n.prototype.nodeId=function(t){var r=t[n.ID_PROP];if(!r&&t.dataset){r=parseInt(t.dataset[n.ID_PROP]||"0")}if(!r){try{r=t[n.ID_PROP]=n.nextId_++}catch(e){r=t.dataset[n.ID_PROP]=n.nextId_++}}return r};n.prototype.set=function(e,t){var r=this.nodeId(e);this.nodes[r]=e;this.values[r]=t};n.prototype.get=function(e){var t=this.nodeId(e);return this.values[t]};n.prototype.has=function(e){return this.nodeId(e)in this.nodes};n.prototype.delete=function(e){var t=this.nodeId(e);delete this.nodes[t];this.values[t]=undefined};n.prototype.keys=function(){var e=[];for(var t in this.nodes){if(!this.isIndex(t))continue;e.push(this.nodes[t])}return e};n.ID_PROP="__uxl_node_map_id_"+parseInt(Math.random()*1e4)+"__";n.nextId_=1;return n}();var f;(function(e){e[e["STAYED_OUT"]=0]="STAYED_OUT";e[e["ENTERED"]=1]="ENTERED";e[e["STAYED_IN"]=2]="STAYED_IN";e[e["REPARENTED"]=3]="REPARENTED";e[e["REORDERED"]=4]="REORDERED";e[e["EXITED"]=5]="EXITED"})(f||(f={}));function a(e){return e===f.ENTERED||e===f.EXITED}var s=function(){function e(e,t,r,n,i,a,s,o){if(t===void 0){t=false}if(r===void 0){r=false}if(n===void 0){n=false}if(i===void 0){i=null}if(a===void 0){a=false}if(s===void 0){s=null}if(o===void 0){o=null}this.node=e;this.childList=t;this.attributes=r;this.characterData=n;this.oldParentNode=i;this.added=a;this.attributeOldValues=s;this.characterDataOldValue=o;this.isCaseInsensitive=this.node.nodeType===Node.ELEMENT_NODE&&this.node instanceof HTMLElement&&this.node.ownerDocument instanceof HTMLDocument}e.prototype.getAttributeOldValue=function(e){if(!this.attributeOldValues)return undefined;if(this.isCaseInsensitive)e=e.toLowerCase();return this.attributeOldValues[e]};e.prototype.getAttributeNamesMutated=function(){var e=[];if(!this.attributeOldValues)return e;for(var t in this.attributeOldValues){e.push(t)}return e};e.prototype.attributeMutated=function(e,t){this.attributes=true;this.attributeOldValues=this.attributeOldValues||{};if(e in this.attributeOldValues)return;this.attributeOldValues[e]=t};e.prototype.characterDataMutated=function(e){if(this.characterData)return;this.characterData=true;this.characterDataOldValue=e};e.prototype.removedFromParent=function(e){this.childList=true;if(this.added||this.oldParentNode)this.added=false;else this.oldParentNode=e};e.prototype.insertedIntoParent=function(){this.childList=true;this.added=true};e.prototype.getOldParent=function(){if(this.childList){if(this.oldParentNode)return this.oldParentNode;if(this.added)return null}return this.node.parentNode};return e}();var o=function(){function e(){this.added=new h;this.removed=new h;this.maybeMoved=new h;this.oldPrevious=new h;this.moved=undefined}return e}();var u=function(o){n(e,o);function e(e,t){o.call(this);this.rootNode=e;this.reachableCache=undefined;this.wasReachableCache=undefined;this.anyParentsChanged=false;this.anyAttributesChanged=false;this.anyCharacterDataChanged=false;for(var r=0;r1)throw Error("Invalid request option. all has no options.");r.queries.push({all:true});continue}if("attribute"in i){var a={attribute:g(i.attribute)};a.elementFilter=p.parseSelectors("*["+a.attribute+"]");if(Object.keys(i).length>1)throw Error("Invalid request option. attribute has no options.");r.queries.push(a);continue}if("element"in i){var s=Object.keys(i).length;var a={element:i.element,elementFilter:p.parseSelectors(i.element)};if(i.hasOwnProperty("elementAttributes")){a.attributeList=m(i.elementAttributes);s--}if(s>1)throw Error("Invalid request option. element only allows elementAttributes option.");r.queries.push(a);continue}if(i.characterData){if(Object.keys(i).length>1)throw Error("Invalid request option. characterData has no options.");r.queries.push({characterData:true});continue}throw Error("Invalid request option. Unknown query request.")}return r};o.prototype.createSummaries=function(e){if(!e||!e.length)return[];var t=new l(this.root,e,this.elementFilter,this.calcReordered,this.options.oldPreviousSibling);var r=[];for(var n=0;n=1<<28){throw new RangeError("repeat count must not overflow maximum string size")}var r=t.length*e;e=Math.floor(Math.log(e)/Math.log(2));while(e){t+=t;e--}t+=t.substring(0,r-t.length);return t}}},{}],"/home/jarvis/nodeapp/client/js/record/browser_size.js":[function(e,t,r){"use strict";function n(){var e=window,t=document,r=t.documentElement,n=document.body,i=e.innerWidth||r.clientWidth||n.clientWidth,a=e.innerHeight||r.clientHeight||n.clientHeight;return[i,a]}t.exports={getDimensions:n}},{}],"/home/jarvis/nodeapp/client/js/record/camera.js":[function(e,t,r){"use strict";var u=Object.assign||function(e){for(var t=1;tn){t[s]=a.value}else{window.localStorage.removeItem(r[i])}}}return t}},{key:"beginStoring",value:function e(){this.canStore=true}},{key:"beginSending",value:function e(){this.canSendData=true;this.canStore=false;this.toStorage("send",1)}},{key:"post",value:function e(t,r,n,i,a){var s=this;var o=JSON.stringify(r);l.deflate(o).then(function(e){if(!i){i=function e(){}}if(!a){a={}}if(a.toStorage){s.toStorage("post",l.arrayToBinString(e));n({failedSheets:[]})}else{fetch(t,{method:"POST",body:e,headers:u({"Content-Type":"application/octet-jstream","Content-Encoding":"deflate","api-key":s.apiKey},s.getCookies()),credentials:"include"}).then(function(e){return e.json()}).then(n).catch(i)}})}},{key:"prepareSocketData",value:function e(t){var r=this;return c.deflate(JSON.stringify({headers:{"api-key":r.apiKey,websiteId:r.websiteId},body:t}),{to:"string"})}},{key:"send",value:function e(t){var r=this;if(r.socket&&r.canSendData&&r.socket.readyState===WebSocket.OPEN){if(r.messageBuffer.length>0){r.socket.send(r.prepareSocketData(r.messageBuffer.splice(0,r.messageBuffer.length)))}r.socket.send(r.prepareSocketData([t]))}else{r.messageBuffer.push(t)}}},{key:"upgradeToWebsocket",value:function e(){if(this.socket)return;this.stopPosting=true;var t=this.cameraURL.replace("http","ws");this.socket=new WebSocket(t)}},{key:"bulkSend",value:function e(a){if(this.stopPosting){return}if(!a){a={}}var t=this.canStore||this.canSendData;var s=this;var o=function e(){};a.toStorage=this.canStore;if(t&&this.messageBuffer.length>0){var r=this.messageBuffer.splice(0,this.messageBuffer.length);s.post(this.cameraURL,r,function(e){if(e.success===false){o();return}if(a.callback){a.callback(e)}if(e.failedSheets&&e.failedSheets.length){for(var t=0;t0){for(var e=0;e=0;i--){if(n[i].getAttribute("data-main")==="__SREC__"){a.host=n[i].src.replace(/(\/\/.*?\/).*/g,"$1");break}}}a.transporter=new w(t,a.host,r);a.metaData.init();if(a.apiKey){a.siteConfigPromise=new Promise(function(n,i){a.transporter.post(a.transporter.configURL,{srecSession:b("SREC_SESSION")},function(e){if(e.success){var r=e;document.cookie=r.srecSession;if(r.newSession){a.transporter.clearStorage();a.tag("new")}a.metaData.onReady(function(){a.metaData.state.uid=a.metaData.state.uid||r.uid;a.socketSend({a_uid:a.metaData.state.uid,ua:a.metaData.state.ua,url:a.metaData.state.url,utm_source:a.metaData.state.utm_source,utm_medium:a.metaData.state.utm_medium,utm_campaign:a.metaData.state.utm_campaign,referrer:a.metaData.state.referrer},"userData");a.startMirroring.apply(a);setTimeout(function(){a.stopMirroring.apply(a);a.transporter.canSendData=false},1e3*60*60);a.transporter.websiteId=r.websiteId;var e=r.cookies||{};for(var t in r.cookies){a.transporter.setCookie(t,r.cookies[t])}a.postInit(r);n(r)});a.transporter.storeRequestParams();a.transporter.bulkSend({});a.finishInit()}else{i(e);for(var t=0;t0?"#"+e.id:"";var r=e.className||"";if(typeof r!=="string"){r=r.baseVal||""}r=r.trim().length>0?r.split(" "):[];r=r.sort().map(function(e){return"."+e}).join("");return e.nodeName.toLowerCase()+t+r}var o=Event.prototype.stopPropagation;Event.prototype.stopPropagation=function(){o.apply(this,arguments);try{var e=this.target;var t=a[this.eventPhase];var r=[];while(e){var n=s(e);if(t){n+="%"+t}if(t===a[2]){n+="%"+a[3]}r.push(n);if(e===this.currentTarget){t=a[1]}e=e.parentNode}i.clicked({path:r.reverse(),text:this.target&&this.target.innerText})}catch(e){i.socketSend({message:e.message,filename:e.filename,line:e.lineno},"errors")}};document.addEventListener("click",function(e){var t=e.target;var r=[];while(t){var n=s(t);n+="%"+a[3];r.push(n);t=t.parentNode}i.clicked({path:r.reverse(),text:e.target&&e.target.innerText})});document.addEventListener("change",function(e){var t=e.target;var r=[];while(t){var n=s(t);n+="%"+a[3];r.push(n);t=t.parentNode}i.changed({path:r.reverse()})})}},{key:"firstLevelText",value:function e(t){var r=t.firstChild,n=[];while(r){if(r.nodeType==3){n.push(r.data)}r=r.nextSibling}var i=this.shorten(n.join("").trim());if(i.length>0)return i;return null}},{key:"shorten",value:function e(t){var r=70;var n=t.substr(0,r);if(t.length>r){n=n.substr(0,Math.min(n.length,n.lastIndexOf(" ")))}return n}},{key:"textClicked",value:function e(t){var r=this;var n=r.firstLevelText(t.target);if(n){r.socketSend({type:"textClick",text:n,dt:(new Date).getTime()-r.metaData.starttime},"textClick")}}},{key:"recordScrollPosition",value:function e(t,r,n){if(!t)return;if(!t.setAttribute&&t.setAttributeNode){var i=document.createAttribute("srScrollLeft");i.nodeValue=r;t.setAttributeNode(i);var a=document.createAttribute("srScrollRight");a.nodeValue=right;t.setAttributeNode(a)}else if(t.setAttribute){t.setAttribute("sr-scroll-left",r);t.setAttribute("sr-scroll-top",n)}}},{key:"getDebouncedScrollRecorder",value:function e(t){var i=this;return a(function(e){if(!i.mirroring){return}var t=e.target;if(t.srcElement){t=t.srcElement}if(t.scrollingElement){t=t.scrollingElement}if(!t){return}var r,n;r=t.scrollLeft;n=t.scrollTop;if((e.pageY||window.pageYOffset)&&(t===document||t===p||t===v)){r=e.pageX||window.pageXOffset;n=e.pageY||window.pageYOffset;i.recordScrollPosition(v,r,n);i.recordScrollPosition(p,r,n)}else{i.recordScrollPosition(t,r,n)}},200)}},{key:"recordMouseEvent",value:function e(t,r){r.socketSend({type:t.type,x:t.clientX,y:t.clientY,px:t.pageX/document.body.scrollWidth,py:t.pageY/document.body.scrollHeight,dt:(new Date).getTime()-r.metaData.starttime},"mouse")}},{key:"getMouseRecorder",value:function e(t){var r=this;return function(e){r.mirroring&&r.recordMouseEvent(e,r)}}},{key:"getDebouncedMouseRecorder",value:function e(t){var r=this;return a(function(e){r.mirroring&&r.recordMouseEvent(e,r)},100)}},{key:"addListenerMulti",value:function e(t,r,n){r.split(" ").forEach(function(e){t.addEventListener(e,n,false)})}},{key:"getKeyUpHandler",value:function e(){var t=this;return function(e){if(l.isSensitive(e.target)){return}if(l.isFormElement(e.target)){e.target.setAttribute("sr-value",l.maskedAttributeValue(e.target,e.target.value));if(e.target.tagName==="INPUT"&&(e.target.type==="radio"||e.target.type==="radio")){e.target.setAttribute("sr-checked",l.maskedAttributeValue(e.target,e.target.checked))}}}}},{key:"tagSession",value:function e(t){var r=this;return function(e){if(!r.flags[t]){r.flags[t]=true;r.transporter.post(r.transporter.taggingUrl,{type:t},function(){})}}}}]);return t}();var S=window;var E="SrecObject";if(!S[E]&&window.__SREC__&&window.__SREC__.api_key){var C=S[E]="srec";S[C]=function(){(S[C].q=S[C].q||[]).push(arguments)};S[C]("init",window.__SREC__.api_key);if(window.__SREC__.uid){S[C]("uid",window.__SREC__.uid)}if(window.__SREC__.tags){for(var N=0;N0){var e=i.q.shift(0);var t=e[0];var r=[];for(var n=1;n=0){var t=n.attributes[e];var r=e.split(":")[0];var e=e.split(":")[1];r=i.recursiveGetNS(s,r);a.setAttributeNS(r,e,t)}else{try{a.setAttribute(e,n.attributes[e]);i.setSRAttribute(a,e,n.attributes[e])}catch(e){console.log(e)}}}});break}if(!a){console.log("ouch");return a}this.idMap[n.id]=a;if(e)e.appendChild(a);if(n.childNodes){for(var o=0;o1&&arguments[1]!==undefined?arguments[1]:"text";var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var n;if(t==="number"){n="0".repeat(e.toString().length)}else{if(r){n=e.toString().replace(/[^\s]/g,"*")}else{n="*".repeat(e.toString().length)}}return n}function h(e){return["TEXTAREA","INPUT","SELECT"].indexOf(e.tagName)>=0}function c(e,t){if(h(e)){if(u(e))return null;if(e.dataset&&e.dataset.hasOwnProperty("srecNomask"))return t;return l(t,e.type)}return t}function d(e,t){var r=t.getMaskStatus(e);if(r!==undefined){return r}if(e&&e.dataset&&e.dataset.hasOwnProperty("srecMask")){t.setMaskStatus(e,true);return true}if(e&&e.dataset&&e.dataset.hasOwnProperty("srecNomask")){t.setMaskStatus(e,false);return false}if(e.parentNode){var r=d(e.parentNode,t);t.setMaskStatus(e,r);return r}t.setMaskStatus(e,false);return false}function f(e){return e.toString().replace(/\s/g,"").toLowerCase()}function p(e){return Object.values(e).reduce(function(e,t){var r=t!==null&&t!==undefined;return e+((typeof t==="undefined"?"undefined":n(t))==="object"&&t!==null?f(p(t)):r?f(t):"")},"")}function v(t,e){return e.filter(function(e){return!!t.length?p(e).includes(f(t)):true})}function g(e){var t=navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(window.CompressionStream==undefined||t){return Promise.resolve(o.deflate(e))}var r=new CompressionStream("deflate");var n=r.writable.getWriter();var i=new TextEncoder;n.write(i.encode(e));n.close();var l=[];var a=r.readable.getReader();var h=0;var s=Promise.resolve(1);return a.read().then(function e(t){var r=t.value,n=t.done;if(n)return;l.push(r);h+=r.byteLength;return a.read().then(e)}).then(function(e){var t=new Uint8Array(h);var r=0;var n=true;var i=false;var a=undefined;try{for(var s=l[Symbol.iterator](),o;!(n=(o=s.next()).done);n=true){var u=o.value;t.set(u,r);r+=u.byteLength}}catch(e){i=true;a=e}finally{try{if(!n&&s.return){s.return()}}finally{if(i){throw a}}}return t})}function m(e){var t,r=e.length,n="";for(t=0;t>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return h(e,e.length)},r.binstring2buf=function(e){for(var t=new u.Buf8(e.length),r=0,n=t.length;r>10&1023,o[n++]=56320|1023&i)}return h(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+l[e[r]]>t?r:t}},{"./common":1}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,a=n+r;e^=-1;for(var s=n;s>>8^i[255&(e^t[s])];return-1^e}},{}],5:[function(e,t,r){"use strict";var u,d=e("../utils/common"),l=e("./trees"),f=e("./adler32"),p=e("./crc32"),n=e("./messages"),h=0,c=4,v=0,g=-2,m=-1,_=4,i=2,b=8,y=9,a=286,s=30,o=19,w=2*a+1,k=15,S=3,E=258,C=E+S+1,N=42,x=113,T=1,A=2,O=3,D=4;function R(e,t){return e.msg=n[t],t}function z(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(d.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function M(e,t){l._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,I(e.strm)}function q(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,a=e.strstart,s=e.prev_length,o=e.nice_match,u=e.strstart>e.w_size-C?e.strstart-(e.w_size-C):0,l=e.window,h=e.w_mask,c=e.prev,d=e.strstart+E,f=l[a+s-1],p=l[a+s];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(l[(r=t)+s]===p&&l[r+s-1]===f&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&au&&0!=--i);return s<=e.lookahead?s:e.lookahead}function H(e){var t,r,n,i,a,s,o,u,l,h,c=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=c+(c-C)){for(d.arraySet(e.window,e.window,c,c,0),e.match_start-=c,e.strstart-=c,e.block_start-=c,t=r=e.hash_size;n=e.head[--t],e.head[t]=c<=n?n-c:0,--r;);for(t=r=c;n=e.prev[--t],e.prev[t]=c<=n?n-c:0,--r;);i+=c}if(0===e.strm.avail_in)break;if(s=e.strm,o=e.window,u=e.strstart+e.lookahead,l=i,h=void 0,h=s.avail_in,l=S)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<=S&&(e.ins_h=(e.ins_h<=S)if(n=l._tr_tally(e,e.strstart-e.match_start,e.match_length-S),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=S){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=S&&(e.ins_h=(e.ins_h<=S&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-S,n=l._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-S),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(H(e),0===e.lookahead&&t===h)return T;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,M(e,!1),0===e.strm.avail_out))return T;if(e.strstart-e.block_start>=e.w_size-C&&(M(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===c?(M(e,!0),0===e.strm.avail_out?O:D):(e.strstart>e.block_start&&(M(e,!1),e.strm.avail_out),T)}),new B(4,4,8,4,V),new B(4,5,16,8,V),new B(4,6,32,32,V),new B(4,4,16,16,U),new B(8,16,32,32,U),new B(8,16,128,128,U),new B(8,32,128,256,U),new B(32,128,258,1024,U),new B(32,258,258,4096,U)],r.deflateInit=function(e,t){return W(e,t,b,15,8,0)},r.deflateInit2=W,r.deflateReset=F,r.deflateResetKeep=X,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?g:(e.state.gzhead=t,v):g},r.deflate=function(e,t){var r,n,i,a;if(!e||!e.state||5>8&255),q(n,n.gzhead.time>>16&255),q(n,n.gzhead.time>>24&255),q(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),q(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(q(n,255&n.gzhead.extra.length),q(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(q(n,0),q(n,0),q(n,0),q(n,0),q(n,0),q(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),q(n,3),n.status=x);else{var s=b+(n.w_bits-8<<4)<<8;s|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=x,P(n,s),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),I(e),i=n.pending,n.pending!==n.pending_buf_size));)q(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),I(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}q(n,a=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===a&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),I(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}q(n,a=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===a&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&I(e),n.pending+2<=n.pending_buf_size&&(q(n,255&e.adler),q(n,e.adler>>8&255),e.adler=0,n.status=x)):n.status=x),0!==n.pending){if(I(e),0===e.avail_out)return n.last_flush=-1,v}else if(0===e.avail_in&&z(t)<=z(r)&&t!==c)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==h&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(H(e),0===e.lookahead)){if(t===h)return T;break}if(e.match_length=0,r=l._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(M(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===c?(M(e,!0),0===e.strm.avail_out?O:D):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?T:A}(n,t):3===n.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=E){if(H(e),e.lookahead<=E&&t===h)return T;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=S&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=S?(r=l._tr_tally(e,1,e.match_length-S),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=l._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(M(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===c?(M(e,!0),0===e.strm.avail_out?O:D):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?T:A}(n,t):u[n.level].func(n,t);if(o!==O&&o!==D||(n.status=666),o===T||o===O)return 0===e.avail_out&&(n.last_flush=-1),v;if(o===A&&(1===t?l._tr_align(n):5!==t&&(l._tr_stored_block(n,0,0,!1),3===t&&(j(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),I(e),0===e.avail_out))return n.last_flush=-1,v}return t!==c?v:n.wrap<=0?1:(2===n.wrap?(q(n,255&e.adler),q(n,e.adler>>8&255),q(n,e.adler>>16&255),q(n,e.adler>>24&255),q(n,255&e.total_in),q(n,e.total_in>>8&255),q(n,e.total_in>>16&255),q(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),I(e),0=r.w_size&&(0===a&&(j(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new d.Buf8(r.w_size),d.arraySet(l,t,h-r.w_size,r.w_size,0),t=l,h=r.w_size),s=e.avail_in,o=e.next_in,u=e.input,e.avail_in=h,e.next_in=0,e.input=t,H(r);r.lookahead>=S;){for(n=r.strstart,i=r.lookahead-(S-1);r.ins_h=(r.ins_h<>>7)]}function q(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>i-r?(e.bi_buf|=t<>i-e.bi_valid,e.bi_valid+=r-i):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function V(e,t,r){var n,i,a=new Array(m+1),s=0;for(n=1;n<=m;n++)a[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=H(a[o]++,o))}}function U(e){var t;for(t=0;t>1;1<=r;r--)X(e,a,r);for(i=u;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],X(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,X(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,s,o,u=t.dyn_tree,l=t.max_code,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return l;for(t=32;t>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?$(e,t,r,n):4===e.strategy||a===i?(P(e,2+(n?1:0),3),F(e,N,x)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+c+1)]++,e.dyn_dtree[2*M(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){var t;P(e,2,3),L(e,_,N),16===(t=e).bi_valid?(q(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":1}],8:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(e,t,r){"use strict";var s=e("./zlib/deflate"),o=e("./utils/common"),u=e("./utils/strings"),i=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString,h=0,c=-1,d=0,f=8;function p(e){if(!(this instanceof p))return new p(e);this.options=o.assign({level:c,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&01){for(var r=1;r0){self._completeHandlers.shift()(e)}}function success(resp){var type=o["type"]||resp&&setType(resp.getResponseHeader("Content-Type"));resp=type!=="jsonp"?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r){switch(type){case"json":try{resp=context.JSON?context.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML;break}}self._responseArgs.resp=resp;self._fulfilled=true;fn(resp);self._successHandler(resp);while(self._fulfillmentHandlers.length>0){resp=self._fulfillmentHandlers.shift()(resp)}complete(resp)}function timedOut(){self._timedOut=true;self.request.abort()}function error(e,t,r){e=self.request;self._responseArgs.resp=e;self._responseArgs.msg=t;self._responseArgs.t=r;self._erred=true;while(self._errorHandlers.length>0){self._errorHandlers.shift()(e,t,r)}complete(e)}this.request=getRequest.call(this,success,error)}Reqwest.prototype={abort:function(){this._aborted=true;this.request.abort()},retry:function(){init.call(this,this.o,this.fn)},then:function(e,t){e=e||function(){};t=t||function(){};if(this._fulfilled){this._responseArgs.resp=e(this._responseArgs.resp)}else if(this._erred){t(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t)}else{this._fulfillmentHandlers.push(e);this._errorHandlers.push(t)}return this},always:function(e){if(this._fulfilled||this._erred){e(this._responseArgs.resp)}else{this._completeHandlers.push(e)}return this},fail:function(e){if(this._erred){e(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t)}else{this._errorHandlers.push(e)}return this},catch:function(e){return this.fail(e)}};function reqwest(e,t){return new Reqwest(e,t)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,t){var r=e.name,n=e.tagName.toLowerCase(),i=function(e){if(e&&!e["disabled"])t(r,normalize(e["attributes"]["value"]&&e["attributes"]["value"]["specified"]?e["value"]:e["text"]))},a,s,o,u;if(e.disabled||!r)return;switch(n){case"input":if(!/reset|button|image|file/i.test(e.type)){a=/checkbox/i.test(e.type);s=/radio/i.test(e.type);o=e.value;(!(a||s)||e.checked)&&t(r,normalize(a&&o===""?"on":o))}break;case"textarea":t(r,normalize(e.value));break;case"select":if(e.type.toLowerCase()==="select-one"){i(e.selectedIndex>=0?e.options[e.selectedIndex]:null)}else{for(u=0;e.length&&u