@eclicktech/js-sdk
Version:
The JavaScript browser client library for DataEye
1 lines • 93.6 kB
JavaScript
import{JSEncrypt as t}from"jsencrypt";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function s(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o,c="1.0.3",h=Array.prototype,u=Object.prototype,l=h.slice,p=u.toString,f=u.hasOwnProperty,d=h.forEach,_={},g=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],m={};m.each=function(t,e,r){if(null!==t)if(d&&t.forEach===d)t.forEach(e,r);else if(t.length===+t.length){for(var n=0,i=t.length;n<i;n++)if(n in t&&e.call(r,t[n],n,t)===_)return}else for(var s in t)if(f.call(t,s)&&e.call(r,t[s],s,t)===_)return},m.extend=function(t){return m.each(l.call(arguments,1),(function(e){for(var r in e)void 0!==e[r]&&(t[r]=e[r])})),t},m.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getFullYear()+"-"+e(t.getMonth()+1)+"-"+e(t.getDate())+" "+e(t.getHours())+":"+e(t.getMinutes())+":"+e(t.getSeconds())+"."+((r=t.getMilliseconds())<10?"00"+r:r<100?"0"+r:r);var r},m.formatTimeZone=function(t,e){if("number"!=typeof e)return t;var r=t.getTime(),n=6e4*t.getTimezoneOffset();return new Date(r+n+36e5*e)},m.formatJsonString=function(t){try{return JSON.stringify(t,null,8)}catch(e){return JSON.stringify(t)}},m.searchObjDate=function(t,e){(m.check.isObject(t)||m.check.isArray(t))&&m.each(t,(function(r,n){m.check.isObject(r)||m.check.isArray(r)?m.searchObjDate(t[n],e):m.check.isDate(r)&&(t[n]=m.formatDate(m.formatTimeZone(r,e)))}))},m.check={isUndefined:function(t){return void 0===t},isObject:function(t){return"[object Object]"===p.call(t)&&null!==t},isEmptyObject:function(t){if(m.check.isObject(t)){for(var e in t)if(f.call(t,e))return!1;return!0}return!1},isArray:function(t){return"[object Array]"===p.call(t)},isString:function(t){return"[object String]"===p.call(t)},isDate:function(t){return"[object Date]"===p.call(t)},isNumber:function(t){return"[object Number]"===p.call(t)},isBoolean:function(t){return"[object Boolean]"===p.call(t)},isJSONString:function(t){try{JSON.parse(t)}catch(t){return!1}return!0}},m.UUID=(o=function(){for(var t=1*new Date,e=0;t===1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=String(screen.height*screen.width);t=t&&/\d{5,}/.test(t)?t.toString(16):String(31242*Math.random()).replace(".","").slice(0,8);var e=o()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,r=navigator.userAgent,n=[],i=0;function s(t,e){var r,i=0;for(r=0;r<e.length;r++)i|=n[r]<<8*r;return t^i}for(t=0;t<r.length;t++)e=r.charCodeAt(t),n.unshift(255&e),n.length>=4&&(i=s(i,n),n=[]);return n.length>0&&(i=s(i,n)),i.toString(16)}()+"-"+t+"-"+o();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}),m.UUIDv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},m.getReferrer=function(t){var e=t||document.referrer;return"string"!=typeof e?"referrer exception"+String(e):(0===e.indexOf("https://www.baidu.com/")&&(e=e.split("?")[0]),"string"==typeof(e=e.slice(0,200))?e:"")},m.url=function(){function t(){return new RegExp(/(.*?)\.?([^\.]*?)\.(com|net|org|biz|ws|in|me|co\.uk|co|org\.uk|ltd\.uk|plc\.uk|me\.uk|edu|mil|br\.com|cn\.com|eu\.com|hu\.com|no\.com|qc\.com|sa\.com|se\.com|se\.net|us\.com|uy\.com|ac|co\.ac|gv\.ac|or\.ac|ac\.ac|af|am|as|at|ac\.at|co\.at|gv\.at|or\.at|asn\.au|com\.au|edu\.au|org\.au|net\.au|id\.au|be|ac\.be|adm\.br|adv\.br|am\.br|arq\.br|art\.br|bio\.br|cng\.br|cnt\.br|com\.br|ecn\.br|eng\.br|esp\.br|etc\.br|eti\.br|fm\.br|fot\.br|fst\.br|g12\.br|gov\.br|ind\.br|inf\.br|jor\.br|lel\.br|med\.br|mil\.br|net\.br|nom\.br|ntr\.br|odo\.br|org\.br|ppg\.br|pro\.br|psc\.br|psi\.br|rec\.br|slg\.br|tmp\.br|tur\.br|tv\.br|vet\.br|zlg\.br|br|ab\.ca|bc\.ca|mb\.ca|nb\.ca|nf\.ca|ns\.ca|nt\.ca|on\.ca|pe\.ca|qc\.ca|sk\.ca|yk\.ca|ca|cc|ac\.cn|net\.cn|com\.cn|edu\.cn|gov\.cn|org\.cn|bj\.cn|sh\.cn|tj\.cn|cq\.cn|he\.cn|nm\.cn|ln\.cn|jl\.cn|hl\.cn|js\.cn|zj\.cn|ah\.cn|gd\.cn|gx\.cn|hi\.cn|sc\.cn|gz\.cn|yn\.cn|xz\.cn|sn\.cn|gs\.cn|qh\.cn|nx\.cn|xj\.cn|tw\.cn|hk\.cn|mo\.cn|cn|cx|cz|de|dk|fo|com\.ec|tm\.fr|com\.fr|asso\.fr|presse\.fr|fr|gf|gs|co\.il|net\.il|ac\.il|k12\.il|gov\.il|muni\.il|ac\.in|co\.in|org\.in|ernet\.in|gov\.in|net\.in|res\.in|is|it|ac\.jp|co\.jp|go\.jp|or\.jp|ne\.jp|ac\.kr|co\.kr|go\.kr|ne\.kr|nm\.kr|or\.kr|li|lt|lu|asso\.mc|tm\.mc|com\.mm|org\.mm|net\.mm|edu\.mm|gov\.mm|ms|nl|no|nu|pl|ro|org\.ro|store\.ro|tm\.ro|firm\.ro|www\.ro|arts\.ro|rec\.ro|info\.ro|nom\.ro|nt\.ro|se|si|com\.sg|org\.sg|net\.sg|gov\.sg|sk|st|tf|ac\.th|co\.th|go\.th|mi\.th|net\.th|or\.th|tm|to|com\.tr|edu\.tr|gov\.tr|k12\.tr|net\.tr|org\.tr|com\.tw|org\.tw|net\.tw|ac\.uk|uk\.com|uk\.net|gb\.com|gb\.net|vg|sh|kz|ch|info|ua|gov|name|pro|ie|hk|com\.hk|org\.hk|net\.hk|edu\.hk|us|tk|cd|by|ad|lv|eu\.lv|bz|es|jp|cl|ag|mobi|eu|co\.nz|org\.nz|net\.nz|maori\.nz|iwi\.nz|io|la|md|sc|sg|vc|tw|travel|my|se|tv|pt|com\.pt|edu\.pt|asia|fi|com\.ve|net\.ve|fi|org\.ve|web\.ve|info\.ve|co\.ve|tel|im|gr|ru|net\.ru|org\.ru|hr|com\.hr|ly|xyz)$/)}function e(t,e){var r=t.charAt(0),n=e.split(r);return r===t?n:n[(t=parseInt(t.substring(1),10))<0?n.length+t:t-1]}function r(t,e){for(var r,n=t.charAt(0),i=e.split("&"),s=[],a={},o=[],c=t.substring(1),h=0,u=i.length;h<u;h++)if((s=i[h].match(/(.*?)=(.*)/))||(s=[i[h],i[h],""]),""!==s[1].replace(/\s/g,"")){if(s[2]=(r=s[2]||"",m.decodeURIComponent(r.replace(/\+/g," "))),c===s[1])return s[2];(o=s[1].match(/(.*)\[([0-9]+)\]/))?(a[o[1]]=a[o[1]]||[],a[o[1]][o[2]]=s[2]):a[s[1]]=s[2]}return n===t?a:a[c]}return function(n,i){var s,a={};if("tld?"===n)return t();if(i=i||window.location.toString(),!n)return i;if(n=n.toString(),s=i.match(/^mailto:([^\/].+)/))a.protocol="mailto",a.email=s[1];else{if((s=i.match(/(.*?)\/#\!(.*)/))&&(i=s[1]+s[2]),(s=i.match(/(.*?)#(.*)/))&&(a.hash=s[2],i=s[1]),a.hash&&n.match(/^#/))return r(n,a.hash);if((s=i.match(/(.*?)\?(.*)/))&&(a.query=s[2],i=s[1]),a.query&&n.match(/^\?/))return r(n,a.query);if((s=i.match(/(.*?)\:?\/\/(.*)/))&&(a.protocol=s[1].toLowerCase(),i=s[2]),(s=i.match(/(.*?)(\/.*)/))&&(a.path=s[2],i=s[1]),a.path=(a.path||"").replace(/^([^\/])/,"/$1").replace(/\/$/,""),n.match(/^[\-0-9]+$/)&&(n=n.replace(/^([^\/])/,"/$1")),n.match(/^\//))return e(n,a.path.substring(1));if((s=e("/-1",a.path.substring(1)))&&(s=s.match(/(.*?)\.(.*)/))&&(a.file=s[0],a.filename=s[1],a.fileext=s[2]),(s=i.match(/(.*)\:([0-9]+)$/))&&(a.port=s[2],i=s[1]),(s=i.match(/(.*?)@(.*)/))&&(a.auth=s[1],i=s[2]),a.auth&&(s=a.auth.match(/(.*)\:(.*)/),a.user=s?s[1]:a.auth,a.pass=s?s[2]:void 0),a.hostname=i.toLowerCase(),"."===n.charAt(0))return e(n,a.hostname);t()&&(s=a.hostname.match(t()))&&(a.tld=s[3],a.domain=s[2]?s[2]+"."+s[3]:void 0,a.sub=s[1]||void 0);var o=a.port?":"+a.port:"";a.protocol=a.protocol||window.location.protocol.replace(":",""),a.port=a.port||("https"===a.protocol?"443":"80"),a.protocol=a.protocol||("443"===a.port?"https":"http"),a.basic=a.protocol+"://"+a.hostname+o}return n in a?a[n]:"{}"===n?a:""}}(),m.hashCode=function(t){if("string"!=typeof t)return 0;var e=0;if(0===t.length)return e;for(var r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return e},m.decodeURIComponent=function(t){var e="";try{e=decodeURIComponent(t)}catch(r){e=t}return e},m.encodeURIComponent=function(t){var e="";try{e=encodeURIComponent(t)}catch(r){e=t}return e},m.utf8Encode=function(t){var e,r,n,i,s="";for(e=r=0,n=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<n;i++){var a=t.charCodeAt(i),o=null;a<128?r++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==o&&(r>e&&(s+=t.substring(e,r)),s+=o,e=r=i+1)}return r>e&&(s+=t.substring(e,t.length)),s},m.base64Encode=function(t){var e,r,n,i,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,c=0,h="",u=[];if(!t)return t;t=m.utf8Encode(t);do{e=(s=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,r=s>>12&63,n=s>>6&63,i=63&s,u[c++]=a.charAt(e)+a.charAt(r)+a.charAt(n)+a.charAt(i)}while(o<t.length);switch(h=u.join(""),t.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h},m.cookie={get:function(t){for(var e=t+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return m.decodeURIComponent(i.substring(e.length,i.length))}return null},set:function(t,e,r,n,i){var s="",a="",o="";if(r=null===r?73e3:r,n){var c=m.url("domain",location.href);s=c?"; domain=."+c:""}if(r){var h=new Date;"s"===String(r).slice(-1)?h.setTime(h.getTime()+1e3*Number(String(r).slice(0,-1))):h.setTime(h.getTime()+24*r*60*60*1e3),a="; expires="+h.toGMTString()}i&&(o="; secure");var u=t+"="+encodeURIComponent(e)+a+"; path=/"+s+o;return document.cookie=u,u},remove:function(t,e){m.cookie.set(t,"",-1,e)}},m.localStorage={get:function(t){try{return window.localStorage.getItem(t)}catch(t){m.localStorage.error(t)}},parse:function(t){var e;try{e=JSON.parse(m.localStorage.get(t))||null}catch(t){m.localStorage.error(t)}return e},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){m.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){m.localStorage.error(t)}},error:function(t){console.error("localStorage error: "+t)},isSupported:function(){var t=!0;try{var e="__funsdatasupport__",r="testIsSupportStorage";m.localStorage.set(e,r),m.localStorage.get(e)!==r&&(t=!1),m.localStorage.remove(e)}catch(e){t=!1}return t}},m.stripEmptyProperties=function(t){var e={};return m.each(t,(function(t,r){m.check.isString(t)&&t.length>0&&(e[r]=t)})),e},m.info={os:function(){var t=navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},browser:function(){var t={type:"",version:""};try{var e=navigator.userAgent.toLowerCase(),r=[];if(null!==e.match(/baidubrowser/)?(t.type="baidu",r.push(/baidubrowser\/([\d.]+)/)):null!==e.match(/bidubrowser/)?(t.type="baidu",r.push(/bidubrowser\/([\d.]+)/)):null!==e.match(/edga/)?(t.type="edge",r.push(/edga\/([\d.]+)/)):null!==e.match(/edgios/)?(t.type="edge",r.push(/edgios\/([\d.]+)/)):null!==e.match(/liebaofast/)?(t.type="liebao",r.push(/liebaofast\/([\d.]+)/)):null!==e.match(/sogoumobilebrowser/)?(t.type="sogou",r.push(/sogoumobilebrowser\/([\d.]+)/)):null!==e.match(/lbbrowser/)?(t.type="liebao",r.push(/lbbrowser\/([\d.]+)/)):null!==e.match(/crios/)?(t.type="chrome",r.push(/crios\/([\d.]+)/)):null!==e.match(/qihoobrowser/)?(t.type="360",r.push(/qihoobrowser\/([\d.]+)/)):null!==e.match(/mxios/)?(t.type="maxthon",r.push(/mxios\/([\d.]+)/)):null!==e.match(/fxios/)?(t.type="firefox",r.push(/fxios\/([\d.\w]+)/)):null!==e.match(/edge/)?(t.type="edge",r.push(/edge\/([\d.]+)/)):null!==e.match(/metasr/)?(t.type="sogou",r.push(/metasr ([\d.]+)/)):null!==e.match(/micromessenger/)?(t.type="micromessenger",r.push(/micromessenger\/([\d.]+)/)):null!==e.match(/mqqbrowser/)?(t.type="qq",r.push(/mqqbrowser\/([\d.]+)/)):null!==e.match(/qqbrowserlite/)?(t.type="qq",r.push(/qqbrowserlite\/([\d.]+)/)):null!==e.match(/tencenttraveler/)?(t.type="qq",r.push(/tencenttraveler\/([\d.]+)/)):null!==e.match(/qqbrowser/)?(t.type="qq",r.push(/qqbrowser\/([\d.]+)/)):null!==e.match(/maxthon/)?(t.type="maxthon",r.push(/maxthon\/([\d.]+)/)):null!==e.match(/ubrowser/)?(t.type="uc",r.push(/ubrowser\/([\d.]+)/)):null!==e.match(/ucbrowser/)?(t.type="uc",r.push(/ucbrowser\/([\d.]+)/)):null!==e.match(/firefox/)?(t.type="firefox",r.push(/firefox\/([\d.]+)/)):null!==e.match(/opera/)?(t.type="opera",r.push(/opera\/([\d.]+)/)):null!==e.match(/opr/)?(t.type="opera",r.push(/opr\/([\d.]+)/)):null!==e.match(/chrome/)?(t.type="chrome",r.push(/chrome\/([\d.]+)/)):null!==e.match(/safari/)?(t.type="safari",r.push(/version\/([\d.]+)/)):null===e.match(/trident/)&&null===e.match(/msie/)||(t.type="ie"),"ie"===t.type){var n=e.match(/trident\/([\d.]+)/)?e.match(/trident\/([\d.]+)/)[1]:"",i=e.match(/msie ([\d.]+)/)?e.match(/msie ([\d.]+)/)[1]:"";""!==n?t.version=String(parseInt(n)+4):""!==i&&(t.version=i)}else r&&(t.version=e.match(r[0])?e.match(r[0])[1]:"")}catch(t){v.w("getting browser info failed due to ",t)}return t},properties:function(){var t=m.info.browser();return m.extend({"#os":m.info.os(),"#lib_version":c,"#lib":"js","#screen_height":screen.height,"#screen_width":screen.width,"#browser":t.type,"#browser_version":t.version,"#system_language":m.check.isString(navigator.languages[1])?navigator.languages[1].toLowerCase():"Value exception","#ua":m.check.isString(navigator.userAgent)?navigator.userAgent.toLowerCase():"Value exception","#utm":m.getUtm()})},pageProperties:function(){var t=m.getReferrer();return m.stripEmptyProperties({"#referrer":t,"#referrer_host":t?m.url("hostname",t):t,"#url":location.href,"#url_path":location.pathname,"#title":document.title})}},m.getUtm=function(){var t={};return m.each(g,(function(e){var r=m.getQueryParam(location.href,e);r.length&&(t[e]=r)})),JSON.stringify(t)},m.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=m.decodeURIComponent(t);var r=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":m.decodeURIComponent(r[1])},m.createString=function(t){for(var e=t,r=Math.random().toString(36).substr(2);r.length<e;)r+=Math.random().toString(36).substr(2);return r=r.substr(0,t)},m.createAesKey=function(){return m.createString(16)},m.generateEncryptyData=function(t,e){if(void 0===e)return t;var r=e.publicKey,n=e.version;if(void 0===r||void 0===n)return t;if("undefined"==typeof CryptoJS||"undefined"==typeof JSEncrypt)return t;var i=m.createAesKey();try{var s=CryptoJS.enc.Utf8.parse(i),a=CryptoJS.enc.Utf8.parse(JSON.stringify(t)),o=CryptoJS.AES.encrypt(a,s,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7}).toString(),c=new JSEncrypt;c.setPublicKey(r);var h=c.encrypt(i);return!1===h?(v.w("encryption failed"),t):{pkv:n,ekey:h,payload:o}}catch(t){v.w("encryption failed")}return t},m.paramType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","")},m.addEvent=function(t,e,r,n){if(document.addEventListener)if("Array"!==this.paramType(t)&&"HTMLCollection"!==this.paramType(t)||!t.length||t===window)t.addEventListener(e,r,n);else for(var i=0;i<t.length;i++)this.addEvent(t[i],e,r,n);else if(t.length&&t!==window)for(var s=0;s<t.length;s++)this.addEvent(t[s],e,r);else t.attachEvent("on"+e,(function(){return r.call(t,window.event)}))},m.getRandom=function(){return(new Date).getTime()+"_"+Math.floor(1e6*Math.random())},m.safeJSONParse=function(t){var e=null;try{e=JSON.parse(t)}catch(e){return t}return e},m.saveObjectVal=function(t,e){m.check.isString(e)||(e=JSON.stringify(e)),m.localStorage.set(t,e)},m.readObjectVal=function(t){var e=m.localStorage.get(t);return e?m.safeJSONParse(e):null},m.indexOf=function(t,e){var r=t.indexOf;if(r)return r.call(t,e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1},m.hasEncrypty=function(t){return!!m.check.isObject()&&("undefined"!==t.pkv&&"undefined"!==t.ekey&&"undefined"!==t.payload)},m.addSiteEvent=function(t,e,r,n){function i(t){return t&&(t.preventDefault=i.preventDefault,t.stopPropagation=i.stopPropagation,t._getPath=i._getPath),t}i._getPath=function(){var t;return this.path||this.composedPath&&this.composedPath()||(t=this.target,new s(t)).getParents()};var s=function(t){this.ele=t};i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};(function(t,e,r){if(void 0===n&&"click"===e&&(n=!0),t&&t.addEventListener)t.addEventListener(e,(function(t){t._getPath=i._getPath,r.call(this,t)}),n);else{var s="on"+e,a=t[s];t[s]=function(t,e,r,n){var s=function(s){if(s=s||i(window.event)){s.target=s.srcElement;var a,o,c=!0;return"function"==typeof r&&(a=r(s)),o=e.call(t,s),"beforeunload"!==n?(!1!==a&&!1!==o||(c=!1),c):void 0}};return s}(t,r,a,e)}}).apply(null,arguments)},m.getURLSearchParams=function(t){for(var e={},r=(t=t||"").substring(1).split("&"),n=0;n<r.length;n++){var i=r[n].indexOf("=");if(-1!==i){var s=r[n].substring(0,i),a=r[n].substring(i+1);s=m.decodeURIComponent(s),a=m.decodeURIComponent(a),e[s]=a}}return e},m.urlParse=function(t){var e=function(t){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==t&&this._parse(t)};return e.prototype.setUrl=function(t){this._parse(t)},e.prototype._initValues=function(){for(var t in this._fields)this._values[t]=""},e.prototype.addQueryString=function(t){if("object"!==r(t))return!1;var e=this._values.QueryString||"";for(var n in t)e=new RegExp(n+"[^&]+").test(e)?e.replace(new RegExp(n+"[^&]+"),n+"="+t[n]):"&"===e.slice(-1)?e+n+"="+t[n]:""===e?n+"="+t[n]:e+"&"+n+"="+t[n];this._values.QueryString=e},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Port?":"+this._values.Port:"",t+=this._values.Path,t+=this._values.QueryString?"?"+this._values.QueryString:"",t+=this._values.Fragment?"#"+this._values.Fragment:""},e.prototype._parse=function(t){this._initValues();var e=this._regex.exec(t);e||v.i("URLParser::_parse -> Invalid URL");var r=t.split("#"),n=r[0],i=r.slice(1).join("#");for(var s in e=this._regex.exec(n),this._fields)void 0!==e[this._fields[s]]&&(this._values[s]=e[this._fields[s]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new e(t)},m.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},m.URL=function(t){var e,r={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())(r=new URL(t)).searchParams||(r.searchParams=(e=m.getURLSearchParams(r.search),{get:function(t){return e[t]}}));else{m.check.isString(t)||(t=String(t)),t=m.trim(t);if(!1===/^https?:\/\/.+/.test(t))return void v.w("Invalid URL");var n=m.urlParse(t);r.hash=n._values.Fragment,r.host=n._values.Host?n._values.Host+(n._values.Port?":"+n._values.Port:""):"",r.href=n._values.URL,r.password=n._values.Password,r.pathname=n._values.Path,r.port=n._values.Port,r.search=n._values.QueryString?"?"+n._values.QueryString:"",r.username=n._values.Username,r.hostname=n._values.Hostname,r.protocol=n._values.Protocol?n._values.Protocol+":":"",r.origin=n._values.Origin?n._values.Origin+(n._values.Port?":"+n._values.Port:""):"",r.searchParams=function(){var t=m.getURLSearchParams("?"+n._values.QueryString);return{get:function(e){return t[e]}}}()}return r},m.normalizeTopLevelKeys=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("object"!==r(t)||null===t||Array.isArray(t))return{};var n={};for(var i in t){if(Object.hasOwnProperty.call(t,i))n[e&&Object.keys(m.info.pageProperties()).includes(i)?i:i.replace(/^#+/,"").toLowerCase()]=t[i]}return n};var v=function(){return s((function t(){e(this,t)}),null,[{key:"i",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=m.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":r(console))&&console.log)try{return console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}}},{key:"w",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=m.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":r(console))&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}])}(),y=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/,b=function(){return s((function t(){e(this,t)}),null,[{key:"stripProperties",value:function(t){return m.check.isObject(t)?(m.each(t,(function(t,e){m.check.isString(t)||m.check.isNumber(t)||m.check.isDate(t)||m.check.isBoolean(t)||m.check.isArray(t)||m.check.isObject(t)||v.w("The format of Data-",e,t," does not meet the requirements and may not be stored correctly. The attribute value only supports String, Number, Date, Boolean, Array,Object")})),t):t}},{key:"_checkPropertiesKey",value:function(t){var e=!0;return m.each(t,(function(t,r){y.test(r)||(v.w("invalid key: "+r),e=!1)})),e}},{key:"event",value:function(t){return!(!m.check.isString(t)||!y.test(t))||(v.w("Please check the parameter format, eventName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}},{key:"propertyName",value:function(t){return!(!m.check.isString(t)||!y.test(t))||(v.w("Please check the parameter format, propertyName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}},{key:"properties",value:function(t){return this.stripProperties(t),!t||!!m.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(v.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1))}},{key:"propertiesMust",value:function(t){return this.stripProperties(t),void 0===t||!m.check.isObject(t)||m.check.isEmptyObject(t)?(v.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(v.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1)}},{key:"userId",value:function(t){return!(!m.check.isString(t)||!/^.{1,63}$/.test(t))||(v.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}}])}(),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function k(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var S,x,C,z,P,O,E,D,A,I,T={},U={},R={};function B(){if(S)return R;S=1;function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,r=286,n=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);t(h);const u=new Array(60);t(u);const l=new Array(512);t(l);const p=new Array(256);t(p);const f=new Array(29);t(f);const d=new Array(n);function _(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let g,m,v;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const b=t=>t<256?l[t]:l[256+(t>>>7)],w=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},k=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},x=(t,e,r)=>{k(t,r[2*e],r[2*e+1])},C=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},z=(t,e,r)=>{const n=new Array(16);let s,a,o=0;for(s=1;s<=i;s++)o=o+r[s-1]<<1,n[s]=o;for(a=0;a<=e;a++){let e=t[2*a+1];0!==e&&(t[2*a]=C(n[e]++,e))}},P=t=>{let e;for(e=0;e<r;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},O=t=>{t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},E=(t,e,r,n)=>{const i=2*e,s=2*r;return t[i]<t[s]||t[i]===t[s]&&n[e]<=n[r]},D=(t,e,r)=>{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i<t.heap_len&&E(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!E(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},A=(t,r,n)=>{let i,o,c,h,u=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+u++],i+=(255&t.pending_buf[t.sym_buf+u++])<<8,o=t.pending_buf[t.sym_buf+u++],0===i?x(t,o,r):(c=p[o],x(t,c+e+1,r),h=s[c],0!==h&&(o-=f[c],k(t,o,h)),i--,c=b(i),x(t,c,n),h=a[c],0!==h&&(i-=d[c],k(t,i,h)))}while(u<t.sym_next);x(t,256,r)},I=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.elems;let o,c,h,u=-1;for(t.heap_len=0,t.heap_max=573,o=0;o<a;o++)0!==r[2*o]?(t.heap[++t.heap_len]=u=o,t.depth[o]=0):r[2*o+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=u<2?++u:0,r[2*h]=1,t.depth[h]=0,t.opt_len--,s&&(t.static_len-=n[2*h+1]);for(e.max_code=u,o=t.heap_len>>1;o>=1;o--)D(t,r,o);h=a;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],D(t,r,1),c=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=c,r[2*h]=r[2*o]+r[2*c],t.depth[h]=(t.depth[o]>=t.depth[c]?t.depth[o]:t.depth[c])+1,r[2*o+1]=r[2*c+1]=h,t.heap[1]=h++,D(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,h=e.stat_desc.max_length;let u,l,p,f,d,_,g=0;for(f=0;f<=i;f++)t.bl_count[f]=0;for(r[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],f=r[2*r[2*l+1]+1]+1,f>h&&(f=h,g++),r[2*l+1]=f,l>n||(t.bl_count[f]++,d=0,l>=c&&(d=o[l-c]),_=r[2*l],t.opt_len+=_*(f+d),a&&(t.static_len+=_*(s[2*l+1]+d)));if(0!==g){do{for(f=h-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[h]--,g-=2}while(g>0);for(f=h;0!==f;f--)for(l=t.bl_count[f];0!==l;)p=t.heap[--u],p>n||(r[2*p+1]!==f&&(t.opt_len+=(f-r[2*p+1])*r[2*p],r[2*p+1]=f),l--)}})(t,e),z(r,u,t.bl_count)},T=(t,e,r)=>{let n,i,s=-1,a=e[1],o=0,c=7,h=4;for(0===a&&(c=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++o<c&&i===a||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=i,0===a?(c=138,h=3):i===a?(c=6,h=3):(c=7,h=4))},U=(t,e,r)=>{let n,i,s=-1,a=e[1],o=0,c=7,h=4;for(0===a&&(c=138,h=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++o<c&&i===a)){if(o<h)do{x(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==s&&(x(t,i,t.bl_tree),o--),x(t,16,t.bl_tree),k(t,o-3,2)):o<=10?(x(t,17,t.bl_tree),k(t,o-3,3)):(x(t,18,t.bl_tree),k(t,o-11,7));o=0,s=i,0===a?(c=138,h=3):i===a?(c=6,h=3):(c=7,h=4)}};let B=!1;const j=(t,e,r,n)=>{k(t,0+(n?1:0),3),O(t),w(t,r),w(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};return R._tr_init=t=>{B||((()=>{let t,e,c,y,b;const w=new Array(16);for(c=0,y=0;y<28;y++)for(f[y]=c,t=0;t<1<<s[y];t++)p[c++]=y;for(p[c-1]=y,b=0,y=0;y<16;y++)for(d[y]=b,t=0;t<1<<a[y];t++)l[b++]=y;for(b>>=7;y<n;y++)for(d[y]=b<<7,t=0;t<1<<a[y]-7;t++)l[256+b++]=y;for(e=0;e<=i;e++)w[e]=0;for(t=0;t<=143;)h[2*t+1]=8,t++,w[8]++;for(;t<=255;)h[2*t+1]=9,t++,w[9]++;for(;t<=279;)h[2*t+1]=7,t++,w[7]++;for(;t<=287;)h[2*t+1]=8,t++,w[8]++;for(z(h,287,w),t=0;t<n;t++)u[2*t+1]=5,u[2*t]=C(t,5);g=new _(h,s,257,r,i),m=new _(u,a,0,n,i),v=new _(new Array(0),o,0,19,7)})(),B=!0),t.l_desc=new y(t.dyn_ltree,g),t.d_desc=new y(t.dyn_dtree,m),t.bl_desc=new y(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,P(t)},R._tr_stored_block=j,R._tr_flush_block=(t,r,n,i)=>{let s,a,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let r,n=4093624447;for(r=0;r<=31;r++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*r])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(r=32;r<e;r++)if(0!==t.dyn_ltree[2*r])return 1;return 0})(t)),I(t,t.l_desc),I(t,t.d_desc),o=(t=>{let e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=s&&(s=a)):s=a=n+5,n+4<=s&&-1!==r?j(t,r,n,i):4===t.strategy||a===s?(k(t,2+(i?1:0),3),A(t,h,u)):(k(t,4+(i?1:0),3),((t,e,r,n)=>{let i;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),i=0;i<n;i++)k(t,t.bl_tree[2*c[i]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),A(t,t.dyn_ltree,t.dyn_dtree)),P(t),i&&O(t)},R._tr_tally=(t,r,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=r,t.pending_buf[t.sym_buf+t.sym_next++]=r>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===r?t.dyn_ltree[2*n]++:(t.matches++,r--,t.dyn_ltree[2*(p[n]+e+1)]++,t.dyn_dtree[2*b(r)]++),t.sym_next===t.sym_end),R._tr_align=t=>{k(t,2,3),x(t,256,h),(t=>{16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)},R}function j(){return E?O:(E=1,O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"})}function L(){return A?D:(A=1,D={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8})}function N(){if(I)return U;I=1;const{_tr_init:t,_tr_stored_block:e,_tr_flush_block:r,_tr_tally:n,_tr_align:i}=B(),s=C?x:(C=1,x=(t,e,r,n)=>{let i=65535&t,s=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,s=s+i|0}while(--a);i%=65521,s%=65521}return i|s<<16}),a=function(){if(P)return z;P=1;const t=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());return z=(e,r,n,i)=>{const s=t,a=i+n;e^=-1;for(let t=i;t<a;t++)e=e>>>8^s[255&(e^r[t])];return~e}}(),o=j(),{Z_NO_FLUSH:c,Z_PARTIAL_FLUSH:h,Z_FULL_FLUSH:u,Z_FINISH:l,Z_BLOCK:p,Z_OK:f,Z_STREAM_END:d,Z_STREAM_ERROR:_,Z_DATA_ERROR:g,Z_BUF_ERROR:m,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:y,Z_HUFFMAN_ONLY:b,Z_RLE:w,Z_FIXED:k,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:O,Z_DEFLATED:E}=L(),D=258,A=262,T=42,R=113,N=666,M=(t,e)=>(t.msg=o[e],e),H=t=>2*t-(t>4?9:0),F=t=>{let e=t.length;for(;--e>=0;)t[e]=0},q=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let Z=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const J=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},K=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,J(t.strm)},W=(t,e)=>{t.pending_buf[t.pending++]=e},V=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},X=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=s(t.adler,e,i,r):2===t.state.wrap&&(t.adler=a(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Q=(t,e)=>{let r,n,i=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match;const c=t.strstart>t.w_size-A?t.strstart-(t.w_size-A):0,h=t.window,u=t.w_mask,l=t.prev,p=t.strstart+D;let f=h[s+a-1],d=h[s+a];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(r=e,h[r+a]===d&&h[r+a-1]===f&&h[r]===h[s]&&h[++r]===h[s+1]){s+=2,r++;do{}while(h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&s<p);if(n=D-(p-s),s=p-D,n>a){if(t.match_start=e,a=n,n>=o)break;f=h[s+a-1],d=h[s+a]}}}while((e=l[e&u])>c&&0!=--i);return a<=t.lookahead?a:t.lookahead},$=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-A)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),q(t),n+=e),0===t.strm.avail_in)break;if(r=X(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Z(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Z(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<A&&0!==t.strm.avail_in)},Y=(t,r)=>{let n,i,s,a=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,h=t.strm.avail_in;do{if(n=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s)break;if(s=t.strm.avail_out-s,i=t.strstart-t.block_start,n>i+t.strm.avail_in&&(n=i+t.strm.avail_in),n>s&&(n=s),n<a&&(0===n&&r!==l||r===c||n!==i+t.strm.avail_in))break;o=r===l&&n===i+t.strm.avail_in?1:0,e(t,0,0,o),t.pending_buf[t.pending-4]=n,t.pending_buf[t.pending-3]=n>>8,t.pending_buf[t.pending-2]=~n,t.pending_buf[t.pending-1]=~n>>8,J(t.strm),i&&(i>n&&(i=n),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,n-=i),n&&(X(t.strm,t.strm.output,t.strm.next_out,n),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n)}while(0===o);return h-=t.strm.avail_in,h&&(h>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=h&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-h,t.strm.next_in),t.strstart),t.strstart+=h,t.insert+=h>t.w_size-t.insert?t.w_size-t.insert:h),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:r!==c&&r!==l&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(s=t.window_size-t.strstart,t.strm.avail_in>s&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,s+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),s>t.strm.avail_in&&(s=t.strm.avail_in),s&&(X(t.strm,t.window,t.strstart,s),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.high_water<t.strstart&&(t.high_water=t.strstart),s=t.bi_valid+42>>3,s=t.pending_buf_size-s>65535?65535:t.pending_buf_size-s,a=s>t.w_size?t.w_size:s,i=t.strstart-t.block_start,(i>=a||(i||r===l)&&r!==c&&0===t.strm.avail_in&&i<=s)&&(n=i>s?s:i,o=r===l&&0===t.strm.avail_in&&n===i?1:0,e(t,t.block_start,n,o),t.block_start+=n,J(t.strm)),o?3:1)},G=(t,e)=>{let r,i;for(;;){if(t.lookahead<A){if($(t),t.lookahead<A&&e===c)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Z(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-A&&(t.match_length=Q(t,r)),t.match_length>=3)if(i=n(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Z(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Z(t,t.ins_h,t.window[t.strstart+1]);else i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2},tt=(t,e)=>{let r,i,s;for(;;){if(t.lookahead<A){if($(t),t.lookahead<A&&e===c)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Z(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-A&&(t.match_length=Q(t,r),t.match_length<=5&&(t.strategy===y||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){s=t.strstart+t.lookahead-3,i=n(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=s&&(t.ins_h=Z(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(K(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=n(t,0,t.window[t.strstart-1]),i&&K(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2};function et(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const rt=[new et(0,0,0,0,Y),new et(4,4,8,4,G),new et(4,5,16,8,G),new et(4,6,32,32,G),new et(4,4,16,16,tt),new et(8,16,32,32,tt),new et(8,16,128,128,tt),new et(8,32,128,256,tt),new et(32,128,258,1024,tt),new et(32,258,258,4096,tt)];function nt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=E,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),F(this.dyn_ltree),F(this.dyn_dtree),F(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),F(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),F(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const it=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==T&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==R&&e.status!==N?1:0},st=e=>{if(it(e))return M(e,_);e.total_in=e.total_out=0,e.data_type=O;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=2===r.wrap?57:r.wrap?T:R,e.adler=2===r.wrap?0:1,r.last_flush=-2,t(r),f},at=t=>{const e=st(t);var r;return e===f&&((r=t.state).window_size=2*r.w_size,F(r.head),r.max_lazy_match=rt[r.level].max_lazy,r.good_match=rt[r.level].good_length,r.nice_match=rt[r.level].nice_length,r.max_chain_length=rt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},ot=(t,e,r,n,i,s)=>{if(!t)return _;let a=1;if(e===v&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==E||n<8||n>15||e<0||e>9||s<0||s>k||8===n&&1!==a)return M(t,_);8===n&&(n=9);const o=new nt;return t.state=o,o.strm=t,o.status=T,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=r,at(t)};return U.deflateInit=(t,e)=>ot(t,e,E,15,8,S),U.deflateInit2=ot,U.deflateReset=at,U.deflateResetKeep=st,U.deflateSetHeader=(t,e)=>it(t)||2!==t.state.wrap?_:(t.state.gzhead=e,f),U.deflate=(t,r)=>{if(it(t)||r>p||r<0)return t?M(t,_):_;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===N&&r!==l)return M(t,0===t.avail_out?m:_);const o=s.last_flush;if(s.last_flush=r,0!==s.pending){if(J(t),0===t.avail_out)return s.last_flush=-1,f}else if(0===t.avail_in&&H(r)<=H(o)&&r!==l)return M(t,m);if(s.status===N&&0!==t.avail_in)return M(t,m);if(s.status===T&&0===s.wrap&&(s.status=R),s.status===T){let e=E+(s.w_bits-8<<4)<<8,r=-1;if(r=s.strategy>=b||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=r<<6,0!==s.strstart&&(e|=32),e+=31-e%31,V(s,e),0!==s.strstart&&(V(s,t.adler>>>16),V(s,65535&t.adler)),t.adler=1,s.status=R,J(t),0!==s.pending)return s.last_flush=-1,f}if(57===s.status)if(t.adler=0,W(s,31),W(s,139),W(s,8),s.gzhead)W(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),W(s,255&s.gzhead.time),W(s,s.gzhead.time>>8&255),W(s,s.gzhead.time>>16&255),W(s,s.gzhead.time>>24&255),W(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),W(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(W(s,255&s.gzhead.extra.length),W(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=a(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(W(s,0),W(s,0),W(s,0),W(s,0),W(s,0),W(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),W(s,3),s.status=R,J(t),0!==s.pending)return s.last_flush=-1,f;if(69===s.status){if(s.gzhead.extra){let e=s.pending,r=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+r>s.pending_buf_size;){let n=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+n),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=a(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=n,J(t),0!==s.pending)return s.last_flush=-1,f;e=0,r-=n}let n=new Uint8Array(s.gzhead.extra);s.pending_buf.set(n.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending+=r,s.gzhead.hcrc&&s.pending>e&&(t.adler=a(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=a(t.adler,s.pending_buf,s.pending-r,r)),J(t),0!==s.pending)return s.last_flush=-1,f;r=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,W(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=a(t.adler,s.pending_buf,s.pending-r,r)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=a(t.adler,s.pending_buf,s.pending-r,r)),J(t),0!==s.pending)return s.last_flush=-1,f;r=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,W(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=a(t.adler,s.pending_buf,s.pending-r,r))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(J(t),0!==s.pending))return s.last_flush=-1,f;W(s,255&t.adler),W(s,t.adler>>8&255),t.adler=0}if(s.status=R,J(t),0!==s.pending)return s.last_flush=-1,f}if(0!==t.avail_in||0!==s.lookahead||r!==c&&s.status!==N){let a=0===s.level?Y(s,r):s.strategy===b?((t,e)=>{let r;for(;;){if(0===t.lookahead&&($(t),0===t.lookahead)){if(e===c)return 1;break}if(t.match_length=0,r=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2})(s,r):s.strategy===w?((t,e)=>{let r,i,s,a;const o=t.window;for(;;){if(t.lookahead<=D){if($(t),t.lookahead<=D&&e===c)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=t.strstart-1,i=o[s],i===o[++s]&&i===o[++s]&&i===o[++s])){a=t.strstart+D;do{}while(i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&s<a);t.match_length=D-(a-s),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2})(s,r):rt[s.level].func(s,r);if(3!==a&&4!==a||(s.status=N),1===a||3===a)return 0===t.avail_out&&(s.last_flush=-1),f;if(2===a&&(r===h?i(s):r!==p&&(e(s,0,0,!1),r===u&&(F(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),J(t),0===t.avail_out))return s.last_flush=-1,f}return r!==l?f:s.wrap<=0?d:(2===s.wrap?(W(s,255&t.adler),W(s,t.adler>>8&255),W(s,t.adler>>16&255),W(s,t.adler>>24&255),W(s,255&t.total_in),W(s,t.total_in>>8&255),W(s,t.total_in>>16&255),W(s,t.total_in>>24&255)):(V(s,t.adler>>>16),V(s,65535&t.adler)),J(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?f:d)},U.deflateEnd=t=>{if(it(t))return _;const e=t.state.status;return t.state=null,e===R?M(t,g):f},U.deflateSetDictionary=(t,e)=>{let r=e.length;if(it(t))return _;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==T||n.lookahead)return _;if(1===i&&(t.adler=s(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(F(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const a=t.avail_in,o=t.next_in,c=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,$(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Z(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,$(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=c,t.avail_in=a,n.wrap=i,f},U.deflateInfo="pako deflate (from Nodeca project)",U}var M,H={};var F,q,Z,J,K={};function W(){if(F)return K;F=1;let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const e=new Uint8Array(256);for(let t=0;t<256;t++)e[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;e[254]=e[254]=1,K.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,s,a=t.length,o=0;for(i=0;i<a;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(o),s=0,i=0;s<o;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e};return K.buf2string=(r,n)=>{const i=n||r.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(r.subarray(0,n));let s,a;const o=new Array(2*i);for(a=0,s=0;s<i;){let t=r[s++];if(t<128){o[a++]=t;continue}let n=e[t];if(n>4)o[a++]=65533,s+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&s<i;)t=t<<6|63&r[s++],n--;n>1?o[a++]=65533:t<65536?o[a++]=t:(t-=65536,o[a++]=55296|t>>10&1023,o[a++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t<r;t++)n+=String.fromCharCode(e[t]);return n})(o,a)},K.utf8border=(t,r)=>{(r=r||t.length)>t.length&&(r=t.length);let n=r-1;for(;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?r:n+e[t[n]]>r?n:r},K}var V=function(){if(J)return T;J=1;const t=N(),e=function(){if(M)return H;M=1;const t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return H.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},H.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,i=t.length;e<i;e++){let i=t[e];r.set(i,n),n+=i.length}return r},H}(),r=W(),n=j(),i=Z?q:(Z=1,q=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}),s=Object.prototype.toString,{Z_NO_FLUSH:a,Z_SYNC_FLUSH:o,Z_FULL_FLUSH:c,Z_FINISH:h,Z_OK:u,Z_STREAM_END:l,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:f,Z_DEFLATED:d}=L();function _(a){this.options=e.assign({level:p,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:f},a||{});let o=this.options;o.raw&&o.windowBits>0?o.windowBits=-o.windowBits:o.gzip&&o.windowBits>0&&o.windowBits<16&&(o.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;let c=t.deflateInit2(this.strm,o.level,o.method,o.windowBits,o.memLevel,o.strategy);if(c!==u)throw new Error(n[c]);if(o.header&&t.deflateSetHeader(this.strm,o.header),o.dictionary){let e;if(e="string"==typeof o.dictionary?r.string2buf(o.dictionary):"[obje