anys-web 6.3.0 → 6.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){var t={d:function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};!function(){"use strict";function r(t){return Array.isArray(t)}function n(t,e){return"function"==typeof t&&(!e||!function(t,e){if("function"!=typeof t)return!1;if(t===Symbol)return!1;if(!t.prototype)return!1;var r=t+"",n=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim(),o=0===r.indexOf("class "),i="[native code]"===n,u=o||i;if(e>=4)return u;var a=n.replace(/function.*?\{.*?\}/gm,"").replace(/return/gm,"").replace(/\n+/gm,";").replace(/\s+/gm,"").replace(/;;/gm,";"),c=/^_classCallCheck\(this,/.test(a),f=/^\(.*?_classCallCheck.*?\)\(this,/.test(a),s=/^[0-9a-zA-Z_;!?:]*?\(this,/.test(a),l=u||c||f||s;if(3==e)return l;var p=Object.getOwnPropertyDescriptors(t.prototype),y=!!Object.keys(p).filter((function(t){return"constructor"!==t})).length,v=l||y;if(2==e)return v;var m=0===a.indexOf("this.")||a.indexOf(";this.")>-1||a.indexOf("=this;")>-1,d=v||m;if(1==e)return d;return!0}(t,2))}function o(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,e="0123456789abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ",r="",n=0;n<t;n++)r+=e.charAt(Math.floor(Math.random()*e.length));return r}function i(t,e,n){var o;return n?(o=Object.getOwnPropertyDescriptors(t),void Object.keys(o).forEach((function(r){var n=o[r],i=n.get,u=n.set,a=n.enumerable,c=n.configurable,f=n.writable;(a||i||u||c&&f)&&e(n,r,t)}))):void(r(t)?t.forEach(e):Object.keys(t).forEach((function(r){var n=t[r];e(n,r,t)})))}t.r(e),t.d(e,{createTracer:function(){return ce}});Symbol("Proxy");var u=["filters","plugins"],a=["filters","plugins","defines"];function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){return s="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},s(t)}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(t,e,r){return(e=d(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function d(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}var b=function(){function t(e){var f=this;this._events=[],this._queue=[];var l,y=(l=this,Object.getPrototypeOf(l).constructor),m=p(p({},t.defaultOptions),y.defaultOptions||{}),d=m.filters,b=void 0===d?[]:d,w=m.plugins,O=void 0===w?[]:w,S=v(m,u),j=e||{},P=j.filters,E=void 0===P?[]:P,_=j.plugins,A=void 0===_?[]:_,I=j.defines,L=void 0===I?[]:I,k=v(j,a),T={},x=[],D={},N=A&&!r(A)&&"object"===s(A),q=N?h(A):r(A)?A:[],M=N?Object.keys(A).map((function(t){return{key:t,value:A[t]}})):[],B=[].concat(c(O),c(q));!function t(e){e.forEach((function(e){var r=e.dependencies||[];r.forEach((function(t){B.unshift(t)})),t(r)}))}(B);var U=B.filter((function(t,e){return e===B.indexOf(t)})),R=[],C={};U.forEach((function(t){var e,r,n,o=null===(e=M.find((function(e){return e.value===t})))||void 0===e?void 0:e.key;if(o&&C[o])return n="plugin named '".concat(r=o,"' has been registered"),void(C[r]instanceof t?console.debug(n,t,C):console.error(n,t,C));var i=(t.dependencies||[]).map((function(t){return R.find((function(e){return e instanceof t}))})),u=new t(f,i);u.options&&g(T,u.options()),u.defines&&g(D,u.defines()),u.filters&&x.push.apply(x,c(u.filters())),R.push(u),o&&(C[o]=u)})),this._pluginList=R,this.plugins=C,this.options=p(p(p({},S),T),k),this.filters=[].concat(c(b),x,c(E));var K=h(this.options).find((function(t){return t&&t instanceof Error}));if(K)throw K;var $=p(p({},D),L);this.definitions=$,this.clientId=$.client?$.client():o(8),this.traceId=$.trace?$.trace():o(8),this.requestId=o(8);var z={};Object.defineProperties(z,function(t,e){if(r(t))return t.map(e);var n={};return i(t,(function(r,o){n[o]=e(r,o,t)})),n}($,(function(t){return{get:n(t)?t:function(){return t},enumerable:!0,configurable:!0}}))),Object.defineProperties(z,{client:{get:function(){return f.clientId},enumerable:!0,configurable:!0},trace:{get:function(){return f.traceId},enumerable:!0,configurable:!0},request:{get:function(){return f.requestId},enumerable:!0,configurable:!0}}),this._basicLog=z,this.invoke("init"),this._inited=!0,this.invoke("ready"),this.options.autoStart&&this.start()}var e,f,l,y=t.prototype;return y.define=function(t,e){Object.defineProperty(this._basicLog,t,{get:e,enumerable:!0,configurable:!0})},y.on=function(t,e){this._events.push([t,e])},y.off=function(t,e){var r=this;this._events.forEach((function(n,o){n[0]===t&&n[1]===e&&r._events.splice(o,1)}))},y.emit=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];this._events.forEach((function(e){e[0]!==t&&"*"!==e[0]||e[1].apply(e,r)}))},y.invoke=function(t){for(var e=[],r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];for(var u=0,a=this._pluginList.length;u<a;u+=1){var c=this._pluginList[u];if(c[t]&&n(c[t])){var f=c[t].apply(c,o);f instanceof Promise&&e.push(f)}}return Promise.all(e).then((function(){}))},y.refreshTraceId=function(){var t=this.traceId;this.invoke("refreshTraceId"),this.traceId=this.definitions.trace?this.definitions.trace():o(8),this.emit("refreshTraceId",{prev:t,next:this.traceId})},y.refreshRequestId=function(){var t=this.requestId;this.requestId=o(8),this.emit("refreshRequestId",{prev:t,next:this.requestId})},y.start=function(){this.invoke("start"),this.emit("start")},y.write=function(t){if(!this._inited)throw new Error("could not write before ready");for(var e=p(p({},this._basicLog),t),r=this.filters,o=0,i=r.length;o<i;o+=1){if(!(0,r[o])(e))return}for(var u=0,a=this._pluginList.length;u<a;u+=1){var c=this._pluginList[u];n(c.filter)&&!c.filter(e)||n(c.write)&&c.write(e)}this.emit("write",e)},y.report=function(t){var e,r,o=this;if(!this._inited)throw new Error("could not report before ready");var i=new Promise((function(t,n){e=t,r=n})),u={message:t,resolve:e,reject:r};this._queue.push(u);var a=function(e){return function(r){var n=[],i=[];if(e.forEach((function(e){if(e.read){var r=function(t){e.data=t,null!=t&&t.length&&n.push.apply(n,c(t))},o=e.read(t);o instanceof Promise?(o.then(r),i.push(o)):r(o)}})),i.length)return Promise.all(i).then((function(){o.emit("read",t,n),r(n)}));o.emit("read",t,n),r(n)}},f=function(e){return function(r,n){var i=[];if(e.forEach((function(t){if(t.arrange){var e=function(e){t.chunks=e},r=t.arrange(t.data,n);r instanceof Promise?(r.then(e),i.push(r)):e(r)}})),i.length)return Promise.all(i).then((function(){o.emit("arrage",t,e.map((function(t){return t.chunks}))),r(n)}));o.emit("arrage",t,e.map((function(t){return t.chunks}))),r(n)}},s=function(e){return function(r,n){var i=[];if(e.forEach((function(t){t.send&&(t.chunks||[n]).forEach((function(e){var r=t.send(e);r instanceof Promise&&i.push(r)}))})),i.length)return Promise.all(i).then((function(){o.emit("send",t,e.map((function(t){return t.chunks}))),r(n)}));o.emit("send",t,e.map((function(t){return t.chunks}))),r(n)}},l=function(e){return function(r,n){var i=[];if(e.forEach((function(t){t.clear&&(t.chunks||[n]).forEach((function(e){var r=t.clear(e);r&&r instanceof Promise&&i.push(r)}))})),i.length)return Promise.all(i).then((function(){o.emit("clear",t,e.map((function(t){return t.chunks}))),r()}));o.emit("clear",t,e.map((function(t){return t.chunks}))),r()}};this._reporting=!1;return function t(){if(!o._reporting){o._reporting=!0;var e=o._queue.shift();if(e){var r=e.message,i=e.resolve,u=e.reject;o.emit("report",r);for(var c=[],p=[],y=0,v=o._pluginList.length;y<v;y+=1){var m=o._pluginList[y],d={},b=0;n(m.read)&&(d.read=m.read.bind(m),b++),n(m.arrange)&&(d.arrange=m.arrange.bind(m),b++),n(m.send)&&(d.send=m.send.bind(m),b++),n(m.clear)&&(d.clear=m.clear.bind(m),b++),4===b?p.push(d):b&&c.push(d)}!function(t,e){var r,n,o=e.onError,i=e.onSuccess,u=e.onComplete;function a(t){r=t,c()}function c(){if(!n){var e=t.shift();if(!e)return i(),void u();try{var c=e(a,r);c instanceof Promise&&c.catch((function(t){n=t,o(t),u()}))}catch(t){n=t,o(t),u()}}}c()}([a(p),a(c),f([].concat(p,c)),s([].concat(p,c)),l([].concat(p,c))],{onError:u,onSuccess:i,onComplete:function(){o._reporting=!1,t()}})}}}(),i},y.send=function(t){t=r(t)?t:[t];var e=this.invoke("send",t);return this.emit("send",t),e},y.stop=function(){this.invoke("stop"),this.emit("stop")},e=t,f&&m(e.prototype,f),l&&m(e,l),Object.defineProperty(e,"prototype",{writable:!1}),e}();function h(t){return Object.keys(t).map((function(e){return t[e]}))}function g(t,e){return Object.keys(e).forEach((function(r){var n=e[r];t[r]=n})),t}function w(t){return w="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},w(t)}function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function j(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===w(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _(t){return _="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},_(t)}function A(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,I(n.key),n)}}function I(t){var e=function(t,e){if("object"!==_(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===_(e)?e:String(e)}b.defaultOptions={autoStart:!0};var L=function(){function t(t){this.anys=t,this.$effects={}}var e,r,n,o=t.prototype;return o.start=function(){var t=this;if(this.options){var e=this.options(),r=Object.keys(e),n=this.anys.options;r.forEach((function(e){n[e]&&function(e){var r="register".concat(e.replace(e[0],e[0].toUpperCase()));if(t[r]){var n=t[r]();t.$effects[e]=n}}(e)}))}},o.stop=function(){var t=this;if(this.options){var e=this.options(),r=Object.keys(e),n=this.anys.options;r.forEach((function(e){var r=t.$effects[e];n[e]&&r&&r(),t.$effects[e]=null}))}},e=t,r&&A(e.prototype,r),n&&A(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function k(t){return k="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},k(t)}function T(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,x(n.key),n)}}function x(t){var e=function(t,e){if("object"!==k(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===k(e)?e:String(e)}var D=function(){function t(t){this.anys=t}var e,r,n,i=t.prototype;return i.options=function(){return{namespace:new Error("options.namespace is required!")}},i.defines=function(){var t=this;return{client:function(){var e=t.anys.options.namespace,r="Anys.".concat(e,".clientId"),n=localStorage.getItem(r);return n||(n=o(8),localStorage.setItem(r,n)),n},trace:function(){var e=t.anys.options.namespace,r="Anys.".concat(e,".traceId"),n=sessionStorage.getItem(r);return n||(n=o(8),sessionStorage.setItem(r,n)),n}}},i.refreshTraceId=function(){var t=this.anys.options.namespace,e="Anys.".concat(t,".traceId"),r=o(8);sessionStorage.setItem(e,r)},e=t,r&&T(e.prototype,r),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement,r=t.nodeName,n=t.path;if(n)return n;if("BODY"===r||"HTML"===r||"HEAD"===r)return r;var o=[],i=t,u=t.parentNode,a=function(t){var e=t.nodeName,r=t.parentNode;return r?[].filter.call(r.childNodes,(function(t){return t.nodeName===e})).indexOf(t):-1};if("#"===r[0]){var c=a(t);o.push("".concat(r,":").concat(c)),u=(i=u).parentNode}for(;u&&i!==e;){var f=i.nodeName;if("BODY"===f||"HTML"===f||"HEAD"===f)o.push(f);else{var s=a(i);o.push("".concat(f.toLowerCase(),":").concat(s))}u=(i=u).parentNode}return o.reverse(),o.join("/")}function q(t){return q="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},q(t)}function M(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,B(n.key),n)}}function B(t){var e=function(t,e){if("object"!==q(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===q(e)?e:String(e)}function U(t,e){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},U(t,e)}var R=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{input:!0}},i.registerInput=function(){var t=this,e=function(e){return function(r){var n=r.target,o=r.type,i=r.inputType,u=r.data;if("insertCompositionText"!==i&&("compositionend"!==o||u)){var a=n.tagName,c=n.value;if(!n.getAttribute("data-ignore")){var f=n.getAttribute("type"),s=e({tagName:a,value:c,type:f,target:n});if(s){var l={type:"input",time:Date.now(),el:N(n),detail:s};t.anys.write(l)}}}}},r=e((function(t){var e=t.tagName,r=t.value,n=t.type;return"INPUT"===e&&"radio"!==n&&"checkbox"!==n&&"password"!==n?{value:r,type:n}:"INPUT"===e&&"password"===n?{value:"***",type:n}:"TEXTAREA"===e?{value:r,type:"textarea"}:void 0})),n=e((function(t){var e=t.tagName,r=t.value,n=t.type;return"SELECT"===e?{value:r,type:"select"}:"INPUT"!==e||"radio"!==n&&"checkbox"!==n?void 0:{value:r,type:n}})),o=e((function(t){var e=t.tagName,r=t.value,n=t.type;return"TEXTAREA"===e?{value:r,type:"textarea"}:"INPUT"===e?{value:r,type:n}:void 0}));return document.addEventListener("input",r,!0),document.addEventListener("compositionend",r,!0),document.addEventListener("change",n,!0),document.addEventListener("paste",o,!0),function(){document.removeEventListener("input",r),document.removeEventListener("compositionend",r),document.removeEventListener("change",n),document.removeEventListener("paste",o)}},r=e,n&&M(r.prototype,n),o&&M(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function C(t){return C="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},C(t)}function K(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$(n.key),n)}}function $(t){var e=function(t,e){if("object"!==C(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===C(e)?e:String(e)}function z(t,e){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},z(t,e)}var H=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&z(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{mouse:!("ontouchend"in document),click:!0,mousemove:!1,mousedown:!1,mouseup:!1,wheel:!1,contextmenu:!1}},i.addEventListener=function(t,e){if(this.anys.options.mouse){var r=this.createThrottleListener((function(e){var r=window,n=r.innerWidth,o=r.innerHeight,i=e.target,u=e.button,a=e.pageX,c=e.pageY;return{type:t,time:Date.now(),detail:{e:N(i),w:n,h:o,x:a,y:c,button:u}}}),e);return document.addEventListener(t,r,!0),function(){return document.removeEventListener(t,r)}}},i.registerClick=function(){return this.addEventListener("click")},i.registerMouseup=function(){return this.addEventListener("mouseup")},i.registerMousedown=function(){return this.addEventListener("mousedown")},i.registerContextmenu=function(){return this.addEventListener("contextmenu")},i.registerMousemove=function(){return this.addEventListener("mousemove",100)},i.registerWheel=function(){if(this.anys.options.mouse){var t="wheel",e=this.createThrottleListener((function(e){var r=e.target,n=e.deltaX,o=e.deltaY,i=e.deltaZ,u=e.deltaMode;return{type:t,time:Date.now(),detail:{e:N(r),deltaX:n,deltaY:o,deltaZ:i,mode:u}}}),100);return document.addEventListener(t,e),function(){return document.removeEventListener(t,e)}}},i.createThrottleListener=function(t,e){var r=this,n=0,o=0;return function(i){if(!n){var u=Date.now();if(!(e&&o+e>u)){var a=t(i);requestAnimationFrame((function(){r.anys.write(a),n=0,o=Date.now()})),n=1}}}},r=e,n&&K(r.prototype,n),o&&K(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function X(t){return X="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},X(t)}function Y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,W(n.key),n)}}function W(t){var e=function(t,e){if("object"!==X(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===X(e)?e:String(e)}function F(t,e){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},F(t,e)}var Z={type:"window_activity.enter",time:Date.now()},V=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{activity:!0,deadTimeout:0}},i.ready=function(){this.anys.options.activity&&this.anys.write(Z)},i.registerActivity=function(){var t=this,e=function(){if("hidden"===document.visibilityState){var e={type:"window_activity.focusout",time:Date.now()};t.anys.write(e)}else{var r={type:"window_activity.focusin",time:Date.now()};t.anys.write(r)}},r=function(){var e={type:"window_activity.unload",time:Date.now()};t.anys.write(e)};return window.addEventListener("beforeunload",r,!0),document.addEventListener("visibilitychange",e,!0),function(){window.removeEventListener("beforeunload",r),document.removeEventListener("visibilitychange",e)}},i.registerDeadTimeout=function(){var t=this,e=this.anys.options.deadTimeout;if(e){var r,n=function(){clearTimeout(r),r=setTimeout((function(){var e={type:"window_activity.dead",time:Date.now()};t.anys.write(e)}),e)};return document.addEventListener("keydown",n,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("touchstart",n,!0),document.addEventListener("touchmove",n,!0),document.addEventListener("mousemove",n,!0),document.addEventListener("scroll",n,!0),window.addEventListener("resize",n,!0),function(){document.removeEventListener("keydown",n),document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n),document.removeEventListener("touchmove",n),document.removeEventListener("mousemove",n),document.removeEventListener("scroll",n),window.removeEventListener("resize",n)}}},r=e,n&&Y(r.prototype,n),o&&Y(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function G(t){return G="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},G(t)}function J(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Q(n.key),n)}}function Q(t){var e=function(t,e){if("object"!==G(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===G(e)?e:String(e)}function tt(t,e){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tt(t,e)}var et=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tt(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{url:!0}},i.registerUrl=function(){var t=this,e=function(){t.recordUrl()};return window.addEventListener("hashchange",e),window.addEventListener("popstate",e),this.recordUrl(),function(){window.removeEventListener("hashchange",e),window.removeEventListener("popstate",e)}},i.recordUrl=function(){var t=window.location.href,e=new URL(t),r=e.pathname.replace(/^([^/])/,"/$1"),n={type:"url",time:Date.now(),url:t,detail:{uri:r+(e.search?"?".concat(e.search):""),path:r,protocol:e.protocol.replace(":",""),host:e.hostname,port:e.port,search:e.search,hash:e.hash.replace("#","")}};this.anys.write(n)},r=e,n&&J(r.prototype,n),o&&J(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function rt(t){return rt="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},rt(t)}function nt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ot(n.key),n)}}function ot(t){var e=function(t,e){if("object"!==rt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===rt(e)?e:String(e)}function it(t,e){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},it(t,e)}var ut=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&it(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){var t="ontouchend"in document;return{touch:t,touchstart:t,touchend:t,touchmove:t}},i.addEventListener=function(t){var e=this;if(this.anys.options.touch){var r=0,n=function(n){if(!r){var o=window,i=o.innerWidth,u=o.innerHeight,a=n.target,c=n.identifier,f=n.force,s=n.pageX,l=n.pageY,p={type:t,time:Date.now(),detail:{e:N(a),width:i,height:u,x:s,y:l,identifier:c,force:f}};requestAnimationFrame((function(){e.anys.write(p),r=0})),r=1}};return document.addEventListener(t,n,!0),function(){return document.removeEventListener(t,n)}}},i.registerTouchmove=function(){return this.addEventListener("touchmove")},i.registerTouchend=function(){return this.addEventListener("touchend")},i.registerTouchstart=function(){return this.addEventListener("touchstart")},r=e,n&&nt(r.prototype,n),o&&nt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function at(t){return at="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},at(t)}function ct(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ft(n.key),n)}}function ft(t){var e=function(t,e){if("object"!==at(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===at(e)?e:String(e)}var st=function(){function t(){this.queue=[],this.status=0}var e,r,n;return t.prototype.push=function(t){var e,r,n=this,o=new Promise((function(t,n){e=t,r=n})),i={runner:t,resolve:e,reject:r};this.queue.push(i);return this.status||function t(){setTimeout((function(){if(n.queue.length){var e=n.queue.shift(),r=e.runner,o=e.resolve,i=e.reject;r().then(o,i).finally(t)}else n.status=0}),0),n.status=1}(),o},e=t,r&&ct(e.prototype,r),n&&ct(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function lt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yt(t){return yt="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},yt(t)}function vt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dt(n.key),n)}}function mt(t,e,r){return e&&vt(t.prototype,e),r&&vt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function dt(t){var e=function(t,e){if("object"!==yt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===yt(e)?e:String(e)}var bt=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.name,r=t.version,n=void 0===r?1:r,o=t.stores,i=!e;e||(e="__indb__"),o&&Array.isArray(o)&&o.length||(o=[{name:"__indb__",isKv:!0}]),this.cache={},this.connection=null,this.name=e,this.version=n,this.stores=o;var u=indexedDB.open(e,n);if(u.onupgradeneeded=function(t){var e=t.target.result,r=Array.from(e.objectStoreNames),n=[];o.forEach((function(o){var i=null;if(r.indexOf(o.name)>-1)i=t.target.transaction.objectStore(o.name);else{var u=o.isKv?"key":o.primaryKeyPath,a=!o.isKv&&o.autoIncrement;i=e.createObjectStore(o.name,{keyPath:u,autoIncrement:a})}var c=i.indexNames;c&&c.length&&Array.from(c).forEach((function(t){return i.deleteIndex(t)})),o.indexes&&o.indexes.length&&o.indexes.forEach((function(t){i.createIndex(t.name,t.keyPath||t.name,{unique:t.unique,multiEntry:Array.isArray(t.keyPath)})})),n.push(o.name)})),r&&r.forEach((function(t){-1===n.indexOf(t)&&e.deleteObjectStore(t)}))},u.onblocked=function(t){console.error(wt(new Error("indexedDB "+e+" is blocked")))},i)return this.use(e)}var e=t.prototype;return e.connect=function(){var t=this;return new Promise((function(e,r){var n=indexedDB.open(t.name,t.version);n.onerror=function(t){r(wt(t))},n.onsuccess=function(t){e(t.target.result)}}))},e.use=function(t){var e=this.stores.find((function(e){return e.name===t}));if(!e)throw new Error("[InDB]: store ".concat(t," is not existing."));if(this.cache[t])return this.cache[t];var r=new ht({db:this,store:e});return e.isKv&&Object.defineProperties(r,{key:{value:function(t){return r.keys().then((function(e){return e&&e[t]}))}},getItem:{value:function(t){return r.get(t).then((function(t){return t&&t.value}))}},setItem:{value:function(t,e){return r.put({key:t,value:e})}},removeItem:{value:function(t){return r.delete(t)}}}),this.cache[t]=r,r},e.close=function(){return this.cache=null,this.stores=null,this.connect().then((function(t){t.close()}))},t.deleteDatabase=function(t){return new Promise((function(e,r){var n=indexedDB.deleteDatabase(t);n.onsuccess=function(){e()},n.onerror=function(t){r(t)}}))},t.databases=function(){return indexedDB.databases()},mt(t)}(),ht=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.store,r=t.db;if("object"!==yt(e)||!e.name||"string"!=typeof e.name)throw new Error("[InDBStore]: options.store should be a store config object.");if(!(r instanceof bt))throw new Error("[InDBStore]: options.db should be an instanceof InDB.");this.db=r,this.store=e,this.name=e.name,this.primaryKeyPath=e.isKv?"key":e.primaryKeyPath,this._queue=[]}var e=t.prototype;return e.transaction=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=function(){var r=t.name,n=e?"readwrite":"readonly",o=t.db.connection;return(o?Promise.resolve(o):t.db.connect()).then((function(e){t.db.connection=e;var o=e.transaction(r,n),i=function(){t.db.connection=null,t._queue.shift()};return o.oncomplete=i,o.onabort=i,o.onerror=i,o}))},n=this._queue[this._queue.length-1],o=n?n.then((function(){return r()})):r();return this._queue.push(o),o},e.objectStore=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.name;return this.transaction(t).then((function(t){return t.objectStore(e)}))},e.cursor=function(t){var e=t.index,r=t.range,n=t.direction,o=t.onTouch,i=t.onDone,u=t.onError,a=t.writable,c=void 0!==a&&a;return this.objectStore(c).then((function(t){var a=e?t.index(e):t,c=a.openCursor(r,n);c.onsuccess=function(t){var e=t.target.result;e?o(e,a):i(e,a)},c.onerror=function(t){u(wt(t))}}))},e.request=function(t){var e=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).writable,n=void 0!==r&&r;return new Promise((function(r,o){e.objectStore(n).then((function(e){var n=t(e);n.onsuccess=function(t){var e=t.target.result;r(e)},n.onerror=function(t){o(wt(t))}}))}))},e.iterate=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.index,o=r.range,i=r.writable,u=void 0!==i&&i,a=r.direction,c=void 0===a?"next":a;return new Promise((function(r,i){e.cursor({index:n,range:o,writable:u,direction:c,onTouch:function(e,n){t(e,(function(){return e.continue()}),(function(){n.transaction.commit(),r()}))},onDone:function(){r()},onError:function(t){i(t)}})}))},e.batch=function(t){var e=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).writable,n=void 0===r||r;return this.transaction(n).then((function(r){var n=e.name,o=[],i=r.objectStore(n);return t.forEach((function(t){var e=new Promise((function(e,r){var n=t(i);n.onsuccess=function(t){var r=t.target.result;e(r)},n.onerror=function(t){r(wt(t))}}));o.push(e)})),Promise.all(o)}))},e.get=function(t){if(!Array.isArray(t))return this.request((function(e){return e.get(t)}));var e=t.map((function(t){return function(e){return e.get(t)}}));return this.batch(e,{writable:!1})},e.keys=function(){var t=this.primaryKeyPath,e=[];return this.each((function(r){var n=gt(r,t);e.push(n)})).then((function(){return e}))},e.all=function(){var t=[];return this.each((function(e){t.push(e)})).then((function(){return t}))},e.count=function(){return this.request((function(t){return t.count()}))},e.each=function(t){return this.iterate((function(e,r){var n=e.value;t(n),r()}))},e.reverse=function(t){return this.iterate((function(e,r){var n=e.value;t(n),r()}),{direction:"prev"})},e.some=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(n,o){var i,u=[],a=0,c=r,f=r+e;r<0&&(i="prev",e=Math.min(e,-r),f=(c=-(r+e)||0)+e),t.iterate((function(t,e,r){a<c?(a++,e()):a<f?(u.push(t.value),a++,e()):r()}),{direction:i}).then((function(){r<0&&u.reverse(),n(u)})).catch(o)}))},e.first=function(){return this.some(1).then((function(t){return t[0]}))},e.last=function(){return this.some(1,-1).then((function(t){return t[0]}))},e.find=function(t,e){return this.request((function(r){return r.index(t).get(e)}))},e.query=function(t,e,r){var n=this,o=function(){switch(r){case">":return IDBKeyRange.lowerBound(e,!0);case">=":return IDBKeyRange.lowerBound(e);case"<":return IDBKeyRange.upperBound(e,!0);case"<=":return IDBKeyRange.upperBound(e);case"%":case"!=":case"in":return;default:return IDBKeyRange.only(e)}}(),i=[];return new Promise((function(u,a){n.cursor({index:t,range:o,onTouch:function(t,n){var o=t.value,u=gt(o,n.keyPath);"!="===r?u!==e&&i.push(o):"%"===r?"string"==typeof u&&u.indexOf(e)>-1&&i.push(o):"in"===r?Array.isArray(e)&&e.indexOf(u)>-1&&i.push(o):i.push(o),t.continue()},onDone:function(){u(i)},onError:function(t){a(t)}})}))},e.select=function(){var t=this.store.indexes||[],e={};t.forEach((function(t){var r=t.name,n=t.keyPath;e[r]=n}));for(var r=function(t,e,r){if(void 0===t)return!1;switch(r){case">":return t>e;case">=":return t>=e;case"<":return t<e;case"<=":return t<=e;case"!=":return t!==e;case"%":return"string"==typeof t&&t.indexOf(e)>-1;case"in":return Array.isArray(e)&&e.indexOf(t)>-1;default:return t===e}},n=function(t,e,n){if(!e.length&&!n.length)return!1;for(var o=0,i=e.length;o<i;o++){var u=e[o],a=u.keyPath,c=u.value,f=u.compare,s=gt(t,a);if(!r(s,c,f))return!1}if(!n.length)return!0;for(var l=0,p=n.length;l<p;l++){var y=n[l],v=y.keyPath,m=y.value,d=y.compare,b=gt(t,v);if(r(b,m,d))return!0}return!1},o=[],i=arguments.length,u=new Array(i),a=0;a<i;a++)u[a]=arguments[a];u.forEach((function(t){for(var r=[],n=[],i=0,u=t.length;i<u;i++){var a=t[i],c=a.key,f=a.value,s=a.compare,l=a.optional,p=e[c]||c;l?r.push({keyPath:p,value:f,compare:s}):n.push({keyPath:p,value:f,compare:s})}o.push([n,r])}));var c=[];return this.each((function(t){(function(t){for(var e=0,r=o.length;e<r;e++){var i=lt(o[e],2),u=i[0],a=i[1];if(n(t,u,a))return!0}return!1})(t)&&c.push(t)})).then((function(){return c}))},e.add=function(t,e){if(Array.isArray(t)){var r=t;if(r.length<2)return this.add(t[0],e);var n=r.map((function(t){return function(r){return r.add(t,e)}}));return this.batch(n)}return t?this.request((function(r){return r.add(t,e)}),{writable:!0}):Promise.resolve()},e.put=function(t,e){if(Array.isArray(t)){var r=t;if(r.length<2)return this.put(r[0],e);var n=r.map((function(t){return function(r){return r.put(t,e)}}));return this.batch(n)}return t?this.request((function(r){return r.put(t,e)}),{writable:!0}):Promise.resolve()},e.delete=function(t){if(Array.isArray(t)){var e=t;if(e.length<2)return this.delete(e[0]);var r=e.map((function(t){return function(e){return e.delete(t)}}));return this.batch(r)}return t?this.request((function(e){return e.delete(t)}),{writable:!0}):Promise.resolve()},e.remove=function(t){var e=this.primaryKeyPath;if(Array.isArray(t)){var r=t;if(r.length<2)return this.remove(r[0]);var n=r.map((function(t){var r=gt(t,e);return function(t){return t.delete(r)}}));return this.batch(n)}if(!t)return Promise.resolve();var o=gt(t,e);return o?this.delete(o):Promise.resolve()},e.clear=function(){return this.request((function(t){return t.clear()}),{writable:!0})},mt(t)}();function gt(t,e){if(null!=e){if(!Array.isArray(e)){var r=function(t){return t.toString().split(/\.|\[|\]/).filter((function(t){return!!t}))}(e);if(!r.length)return t;for(var n=t,o=0,i=r.length;o<i;o++){var u=r[o];if(void 0===n[u])return;n=n[u]}return n}for(var a=0,c=e.length;a<c;a++){var f=gt(t,e[a]);if(void 0!==f)return f}}}function wt(t){var e=t.message;return t.message=-1===e.indexOf("[IndexedDB]")?"[IndexedDB]: "+e:e,t}function Ot(t){return Ot="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},Ot(t)}function St(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jt(n.key),n)}}function jt(t){var e=function(t,e){if("object"!==Ot(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Ot(e)?e:String(e)}var Pt=function(){function t(t){this.anys=t,this.queue=new st}var e,r,n,o=t.prototype;return o.options=function(){return{namespace:new Error("options.namespace is required!"),autoReport:!1,expireTime:1728e5}},o.init=function(){var t="logs",e=new bt({name:this.anys.options.namespace,version:2,stores:[{name:t,primaryKeyPath:"_id",autoIncrement:!0}]});this.db=e.use(t)},o.ready=function(){var t=this,e=this.anys.options.expireTime;if(e)var r=0,n=setInterval((function(){t.queue.push((function(){return t.db.some(100,r)})).then((function(o){if(o.length){var i=Date.now(),u=[];o.forEach((function(t){var r=t._id,n=t.time;i-n>e&&u.push(r)})),u.length&&t.queue.push((function(){return t.db.delete(u)})),r+=100,r-=u.length}else clearInterval(n)}))}),1e4)},o.write=function(t){var e=this;this.queue.push((function(){return e.db.add(t)})).then((function(r){e.anys.emit("writeOfflineLog",{id:r,data:t})}))},o.read=function(t){if(t){if(!Array.isArray(t))return;if(t.some((function(t){return!t.key})))return}else t=[{key:"client",value:this.anys.clientId},{key:"trace",value:this.anys.traceId}];return this.select(t)},o.clear=function(t){var e=this;return this.queue.push((function(){return e.db.remove(t)})).catch((function(){}))},o.select=function(t){var e=this;return this.queue.push((function(){return e.db.select(t)}))},o.remove=function(t){var e=this;return this.queue.push((function(){return e.db.delete(t)})).catch((function(){}))},e=t,r&&St(e.prototype,r),n&&St(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function Et(t){return Et="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},Et(t)}function _t(t){return function(t){if(Array.isArray(t))return It(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||At(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function At(t,e){if(t){if("string"==typeof t)return It(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?It(t,e):void 0}}function It(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kt(n.key),n)}}function kt(t){var e=function(t,e){if("object"!==Et(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Et(e)?e:String(e)}function Tt(t,e){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tt(t,e)}var xt=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tt(t,e)}(e,t);var r,n,i,u=e.prototype;return u.init=function(){this.currentSnapshotId="",this.currentMutationId="",this.currentMutationNo=0},u.options=function(){return{mutation:!0}},u.registerMutation=function(){var t=this,e=this.createObserver((function(e){var r=o(8),n=t.currentMutationNo+1,i={type:"mutation",time:Date.now(),detail:e,ssid:t.currentSnapshotId,ssno:n,curr:r,prev:t.currentMutationId};t.anys.write(i),t.currentMutationId=r,t.currentMutationNo=n}));return window.addEventListener("load",(function(){e.observe(document,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),t.recordSnapshot(),Dt(document.documentElement)})),function(){e.disconnect()}},u.recordSnapshot=function(){var t=function(){var t,e=document.doctype,r=e.name,n=e.publicId,o=e.systemId,i={name:r,publicId:n,systemId:o},u=Nt(document.documentElement.innerHTML),a={},c=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=At(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}(document.querySelector("html").attributes);try{for(c.s();!(t=c.n()).done;){var f=t.value,s=f.name,l=f.value;a[s]=l}}catch(t){c.e(t)}finally{c.f()}var p=(y=document.querySelectorAll("input, textarea, select"),v=[],Array.from(y).forEach((function(t){var e=N(t),r="password"===t.type?"***":t.value;v.push({el:e,value:r})})),v);var y,v;return{doctype:i,attrs:a,html:u,values:p}}(),e=o(8),r=window.location.href,n=new URL(r),i=n.pathname.replace(/^([^/])/,"/$1");this.anys.write({type:"snapshot",time:Date.now(),url:{uri:i+(n.search?"?".concat(n.search):""),path:i,protocol:n.protocol.replace(":",""),host:n.hostname,port:n.port,search:n.search,hash:n.hash.replace("#","")},detail:t,ssid:e}),this.currentSnapshotId=e,this.currentMutationNo=0},u.createObserver=function(t){var e=new MutationObserver((function(e){var r=[];_t(e).reverse().forEach((function(t){var e=t.type,n=t.target,o=t.attributeName,i=t.oldValue;if(!function(t){var e;if(null!==(e=t.hasAttribute)&&void 0!==e&&e.call(t,"data-ignore"))return!0;for(var r=t.parentNode;r;){var n,o;if(null!==(n=(o=r).hasAttribute)&&void 0!==n&&n.call(o,"data-ignore"))return!0;r=r.parentNode}return!1}(n)){if("attributes"===e){if(n.getAttribute(o)===i)return;if(r.find((function(t){return t.type===e&&t.target===n&&t.attributeName===o})))return}else if("characterData"===e){var u=n.data;if(u===i)return;if(r.find((function(t){return t.type===e&&t.target===n&&t.target.data===u})))return}r.push(t)}})),r.reverse();var n=[];r.forEach((function(t){var e=t.type,r=t.target,o=t.attributeName,i=t.oldValue,u=r.path||N(r),a=function(t){return N(t).replace(u+"/","")};if("attributes"===e){var c=r.getAttribute(o),f=i;n.push({type:"attribute",target:u,name:o,next:c,prev:f})}else if("characterData"===e){var s=r.data,l=i;n.push({type:"text",target:u,next:s,prev:l})}else if("childList"===e){if("TEXTAREA"===r.nodeName)return;var p=t.removedNodes,y=t.addedNodes,v=t.previousSibling,m=t.nextSibling,d=[],b=Array.from(p).map((function(t){if(!document.body.contains(t)){var e=t.path?a(t):null,r=v?N(v):null,n=m?N(m):null,o={};return e?o.node=e:(o.before=r,o.after=n),o}d.push({node:t,path:N(t)})})).filter(Boolean),h=[],g=Array.from(y).map((function(t){var e=t.nextSibling?a(t.nextSibling):null,r=d.find((function(e){return e.node===t}));if(!r){var n="#text"===t.nodeName,o="#comment"===t.nodeName,i=n?t.data:null,u=o?t.data:null;return{text:i,html:n||o?null:Nt(t.outerHTML),comment:u,sibling:e}}h.push({node:r.path,sibling:e})})).filter(Boolean);n.push({type:"children",target:u,remove:b,insert:g,move:h}),Dt(r)}})),t(n)}));return Dt(document),e},r=e,n&&Lt(r.prototype,n),i&&Lt(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function Dt(t){if(t!==document){var e=N(t);t.path=e}var r=t.childNodes;Array.from(r).forEach((function(t){Dt(t)}))}function Nt(t){return t.replace(/<script([^]*?)>([^]*?)<\/script>/gm,"<noscript$1></noscript>").replace(/<noscript([^]*?)>([^]*?)<\/noscript>/gm,"<noscript$1></noscript>").replace(/<link([^]*?)as="script"([^]*?)>/g,"<link$1$2>").replace(/\n\n*\s*\n*\n/gm,"\n")}function qt(t){return qt="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},qt(t)}function Mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bt(n.key),n)}}function Bt(t){var e=function(t,e){if("object"!==qt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===qt(e)?e:String(e)}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}var Rt=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ut(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{size:!0}},i.createRecordLog=function(){var t=window,e=t.innerWidth,r=t.innerHeight;return{type:"window_size",time:Date.now(),detail:{width:e,height:r}}},i.registerSize=function(){var t,e=this,r=function(){clearTimeout(t);var r=e.createRecordLog();t=setTimeout((function(){e.anys.write(r)}),100)};return this.recordSize(),window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}},i.recordSize=function(){var t=this.createRecordLog();this.anys.write(t)},r=e,n&&Mt(r.prototype,n),o&&Mt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function Ct(t){return Ct="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},Ct(t)}function Kt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$t(n.key),n)}}function $t(t){var e=function(t,e){if("object"!==Ct(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Ct(e)?e:String(e)}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}var Ht=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zt(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{scroll:!0}},i.registerScroll=function(){var t=this,e=0,r=function(r){if(!e){var n,o=r.target;if(r.bubbles){var i=window,u=i.scrollX,a=i.scrollY;n={type:"window_scroll",time:Date.now(),detail:{scrollX:u,scrollY:a}}}else{var c=o.scrollLeft,f=o.scrollTop;n={type:"scroll",time:Date.now(),target:N(o),detail:{scrollLeft:c,scrollTop:f}}}requestAnimationFrame((function(){t.anys.write(n),e=0})),e=1}};return window.addEventListener("scroll",r,!0),function(){window.removeEventListener("scroll",r)}},r=e,n&&Kt(r.prototype,n),o&&Kt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function Xt(t){return Xt="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},Xt(t)}var Yt=["_id"];function Wt(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Zt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gt(n.key),n)}}function Gt(t){var e=function(t,e){if("object"!==Xt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Xt(e)?e:String(e)}function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}var Qt=function(t){function e(e,r){var n,o=Ft(r,4),i=o[0],u=o[1],a=o[2],c=o[3];return(n=t.call(this,e)||this).offlineStore=i,n.urlMonitor=u,n.windowSizeMonitor=a,n.DOMMutationMonitor=c,n.cache={},n}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){var t="ontouchend"in document;return{touch:t,mouse:!t,click:!1,mousedown:!0,mousemove:!0,mouseup:!0,autoReport:!1,reportUrl:new Error("options.reportUrl is required!"),reportInterval:1e4,reportParams:null}},i.registerAutoReport=function(){var t=this,e=this.anys.clientId,r=function(r){var n=r.prev;t.anys.report([{key:"client",value:e},{key:"trace",value:n}]),t.cache={},t.urlMonitor.recordUrl(),t.windowSizeMonitor.recordSize(),t.DOMMutationMonitor.recordSnapshot()};this.anys.on("refreshTraceId",r);var n=setInterval((function(){t.anys.report()}),this.anys.options.reportInterval),o=0,i=function(){if(!o){o=1;var e=Object.keys(t.cache),r={data:Object.values(t.cache),by:"beacon"};e.length&&(t.offlineStore.remove(e),navigator.sendBeacon(t.anys.options.reportUrl,JSON.stringify(r)),t.cache={})}};window.addEventListener("beforeunload",i),window.addEventListener("pagehide",i),window.addEventListener("unload",i);var u=function(e){var r=e.id,n=e.data;t.cache[r]=n};return this.anys.on("writeOfflineLog",u),function(){t.anys.off("refreshTraceId",r),t.anys.off("writeOfflineLog",u),clearInterval(n),window.removeEventListener("beforeunload",i)}},i.read=function(t){return this.offlineStore.read(t)},i.arrange=function(t){var e=[],r=0;return t.forEach((function(t){e[r]=e[r]||[],e[r].push(t),e[r].length>200&&r++})),e},i.send=function(t){var e=this,r=[],n=[];if(t.forEach((function(t){var e=t._id,o=Wt(t,Yt);n.push(e),r.push(o)})),r.length){var o=this.anys.options,i=o.reportUrl,u=o.reportParams,a=u?function(t,e){var r=function(t){return encodeURIComponent(t)};if(t.indexOf("?")<0){var n=Object.keys(e).map((function(t){return"".concat(t,"=").concat(r(e[t]))})).join("&"),o=P(t.split("#"),2),i=o[0],u=o[1];return i+"?"+n+(u?"#"+u:"")}var a=P(t.split("?"),2),c=a[0],f=P(a[1].split("#"),2),s=f[0],l=f[1],p=s.split("&").map((function(t){return t.split("=").reduce((function(t,e,r){return r?(t[1]=t[1]||"",t[1]+=e):t[0]=e,t}),[])})).reduce((function(t,e){var r=P(e,2),n=r[0],o=r[1];return S(S({},t),{},j({},n,o))}),{});return Object.assign(p,e),c+"?"+Object.keys(p).map((function(t){return"".concat(t,"=").concat(r(p[t]))})).join("&")+(l?"#"+l:"")}(i,u):i;return function(t,e){return new Promise((function(r,n){var o=new(window.__XMLHttpRequest||window.XMLHttpRequest);o.open("POST",t,!0),o.onreadystatechange=function(){4==o.readyState&&(200==o.status?r(o.responseText):n(new Error("ajax post fail with status ".concat(o.status))))},o.onerror=n,o.send(JSON.stringify(e))}))}(a,{data:r}).then((function(){n.forEach((function(t){delete e.cache[t]}))}))}},i.clear=function(){this.cache={}},r=e,n&&Vt(r.prototype,n),o&&Vt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function te(t){return te="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},te(t)}function ee(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ee(Object(r),!0).forEach((function(e){ne(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ne(t,e,r){return(e=ie(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ie(n.key),n)}}function ie(t){var e=function(t,e){if("object"!==te(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===te(e)?e:String(e)}function ue(t,e){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ue(t,e)}Qt.dependencies=[Pt,et,Rt,xt,D,R,H,V,ut,Ht];var ae=function(t){function e(){return t.apply(this,arguments)||this}var r,n,o;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)}(e,t),e.prototype.auth=function(t){this.options.reportParams=Object.assign(this.options.reportParams||{},t)},r=e,n&&oe(r.prototype,n),o&&oe(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(b),ce=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ae(re(re({namespace:"AnysTracer"},t),{},{plugins:re(re({},t.plugins||{}),{},{tracer:Qt})}))}}();var r=anys="undefined"==typeof anys?{}:anys;for(var n in e)r[n]=e[n];e.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})}();
|
|
1
|
+
!function(){var t={d:function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};!function(){"use strict";function r(t){return Array.isArray(t)}function n(t,e){return"function"==typeof t&&(!e||!function(t,e){if("function"!=typeof t)return!1;if(t===Symbol)return!1;if(!t.prototype)return!1;var r=t+"",n=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim(),o=0===r.indexOf("class "),i="[native code]"===n,u=o||i;if(e>=4)return u;var a=n.replace(/function.*?\{.*?\}/gm,"").replace(/return/gm,"").replace(/\n+/gm,";").replace(/\s+/gm,"").replace(/;;/gm,";"),c=/^_classCallCheck\(this,/.test(a),f=/^\(.*?_classCallCheck.*?\)\(this,/.test(a),s=/^[0-9a-zA-Z_;!?:]*?\(this,/.test(a),l=u||c||f||s;if(3==e)return l;var p=Object.getOwnPropertyDescriptors(t.prototype),y=!!Object.keys(p).filter((function(t){return"constructor"!==t})).length,v=l||y;if(2==e)return v;var m=0===a.indexOf("this.")||a.indexOf(";this.")>-1||a.indexOf("=this;")>-1,d=v||m;if(1==e)return d;return!0}(t,2))}function o(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,e="0123456789abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ",r="",n=0;n<t;n++)r+=e.charAt(Math.floor(Math.random()*e.length));return r}function i(t,e,n){var o;return n?(o=Object.getOwnPropertyDescriptors(t),void Object.keys(o).forEach((function(r){var n=o[r],i=n.get,u=n.set,a=n.enumerable,c=n.configurable,f=n.writable;(a||i||u||c&&f)&&e(n,r,t)}))):void(r(t)?t.forEach(e):Object.keys(t).forEach((function(r){var n=t[r];e(n,r,t)})))}t.r(e),t.d(e,{createTracer:function(){return ce}});Symbol("Proxy");var u=["filters","plugins"],a=["filters","plugins","defines"];function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){return s="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},s(t)}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(t,e,r){return(e=d(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function d(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}var b=function(){function t(e){var f=this;this._events=[],this._queue=[];var l,y=(l=this,Object.getPrototypeOf(l).constructor),m=p(p({},t.defaultOptions),y.defaultOptions||{}),d=m.filters,b=void 0===d?[]:d,w=m.plugins,O=void 0===w?[]:w,S=v(m,u),j=e||{},P=j.filters,E=void 0===P?[]:P,_=j.plugins,I=void 0===_?[]:_,A=j.defines,L=void 0===A?[]:A,k=v(j,a),T={},x=[],D={},N=I&&!r(I)&&"object"===s(I),q=N?h(I):r(I)?I:[],M=N?Object.keys(I).map((function(t){return{key:t,value:I[t]}})):[],B=[].concat(c(O),c(q));!function t(e){e.forEach((function(e){var r=e.dependencies||[];r.forEach((function(t){B.unshift(t)})),t(r)}))}(B);var U=B.filter((function(t,e){return e===B.indexOf(t)})),R=[],C={};U.forEach((function(t){var e,r,n,o=null===(e=M.find((function(e){return e.value===t})))||void 0===e?void 0:e.key;if(o&&C[o])return n="plugin named '".concat(r=o,"' has been registered"),void(C[r]instanceof t?console.debug(n,t,C):console.error(n,t,C));var i=(t.dependencies||[]).map((function(t){return R.find((function(e){return e instanceof t}))})),u=new t(f,i);u.options&&g(T,u.options()),u.defines&&g(D,u.defines()),u.filters&&x.push.apply(x,c(u.filters())),R.push(u),o&&(C[o]=u)})),this._pluginList=R,this.plugins=C,this.options=p(p(p({},S),T),k),this.filters=[].concat(c(b),x,c(E));var K=h(this.options).find((function(t){return t&&t instanceof Error}));if(K)throw K;var $=p(p({},D),L);this.definitions=$,this.clientId=$.client?$.client():o(8),this.traceId=$.trace?$.trace():o(8),this.requestId=o(8);var z={};Object.defineProperties(z,function(t,e){if(r(t))return t.map(e);var n={};return i(t,(function(r,o){n[o]=e(r,o,t)})),n}($,(function(t){return{get:n(t)?t:function(){return t},enumerable:!0,configurable:!0}}))),Object.defineProperties(z,{client:{get:function(){return f.clientId},enumerable:!0,configurable:!0},trace:{get:function(){return f.traceId},enumerable:!0,configurable:!0},request:{get:function(){return f.requestId},enumerable:!0,configurable:!0}}),this._basicLog=z,this.invoke("init"),this._inited=!0,this.invoke("ready"),this.options.autoStart&&this.start()}var e,f,l,y=t.prototype;return y.define=function(t,e){Object.defineProperty(this._basicLog,t,{get:e,enumerable:!0,configurable:!0})},y.on=function(t,e){this._events.push([t,e])},y.off=function(t,e){var r=this;this._events.forEach((function(n,o){n[0]===t&&n[1]===e&&r._events.splice(o,1)}))},y.emit=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];this._events.forEach((function(e){e[0]!==t&&"*"!==e[0]||e[1].apply(e,r)}))},y.invoke=function(t){for(var e=[],r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];for(var u=0,a=this._pluginList.length;u<a;u+=1){var c=this._pluginList[u];if(c[t]&&n(c[t])){var f=c[t].apply(c,o);f instanceof Promise&&e.push(f)}}return Promise.all(e).then((function(){}))},y.refreshTraceId=function(){var t=this.traceId;this.invoke("refreshTraceId"),this.traceId=this.definitions.trace?this.definitions.trace():o(8),this.emit("refreshTraceId",{prev:t,next:this.traceId})},y.refreshRequestId=function(){var t=this.requestId;this.requestId=o(8),this.emit("refreshRequestId",{prev:t,next:this.requestId})},y.start=function(){this.invoke("start"),this.emit("start")},y.write=function(t){if(!this._inited)throw new Error("could not write before ready");for(var e=p(p({},this._basicLog),t),r=this.filters,o=0,i=r.length;o<i;o+=1){if(!(0,r[o])(e))return}for(var u=0,a=this._pluginList.length;u<a;u+=1){var c=this._pluginList[u];n(c.filter)&&!c.filter(e)||n(c.write)&&c.write(e)}this.emit("write",e)},y.report=function(t){var e,r,o=this;if(!this._inited)throw new Error("could not report before ready");var i=new Promise((function(t,n){e=t,r=n})),u={message:t,resolve:e,reject:r};this._queue.push(u);var a=function(e){return function(r){var n=[],i=[];if(e.forEach((function(e){if(e.read){var r=function(t){e.data=t,null!=t&&t.length&&n.push.apply(n,c(t))},o=e.read(t);o instanceof Promise?(o.then(r),i.push(o)):r(o)}})),i.length)return Promise.all(i).then((function(){o.emit("read",t,n),r(n)}));o.emit("read",t,n),r(n)}},f=function(e){return function(r,n){var i=[];if(e.forEach((function(t){if(t.arrange){var e=function(e){t.chunks=e},r=t.arrange(t.data,n);r instanceof Promise?(r.then(e),i.push(r)):e(r)}})),i.length)return Promise.all(i).then((function(){o.emit("arrage",t,e.map((function(t){return t.chunks}))),r(n)}));o.emit("arrage",t,e.map((function(t){return t.chunks}))),r(n)}},s=function(e){return function(r,n){var i=[];if(e.forEach((function(t){t.send&&(t.chunks||[n]).forEach((function(e){var r=t.send(e);r instanceof Promise&&i.push(r)}))})),i.length)return Promise.all(i).then((function(){o.emit("send",t,e.map((function(t){return t.chunks}))),r(n)}));o.emit("send",t,e.map((function(t){return t.chunks}))),r(n)}},l=function(e){return function(r,n){var i=[];if(e.forEach((function(t){t.clear&&(t.chunks||[n]).forEach((function(e){var r=t.clear(e);r&&r instanceof Promise&&i.push(r)}))})),i.length)return Promise.all(i).then((function(){o.emit("clear",t,e.map((function(t){return t.chunks}))),r()}));o.emit("clear",t,e.map((function(t){return t.chunks}))),r()}};this._reporting=!1;return function t(){if(!o._reporting){o._reporting=!0;var e=o._queue.shift();if(e){var r=e.message,i=e.resolve,u=e.reject;o.emit("report",r);for(var c=[],p=[],y=0,v=o._pluginList.length;y<v;y+=1){var m=o._pluginList[y],d={},b=0;n(m.read)&&(d.read=m.read.bind(m),b++),n(m.arrange)&&(d.arrange=m.arrange.bind(m),b++),n(m.send)&&(d.send=m.send.bind(m),b++),n(m.clear)&&(d.clear=m.clear.bind(m),b++),4===b?p.push(d):b&&c.push(d)}!function(t,e){var r,n,o=e.onError,i=e.onSuccess,u=e.onComplete;function a(t){r=t,c()}function c(){if(!n){var e=t.shift();if(!e)return i(),void u();try{var c=e(a,r);c instanceof Promise&&c.catch((function(t){n=t,o(t),u()}))}catch(t){n=t,o(t),u()}}}c()}([a(p),a(c),f([].concat(p,c)),s([].concat(p,c)),l([].concat(p,c))],{onError:u,onSuccess:i,onComplete:function(){o._reporting=!1,t()}})}}}(),i},y.send=function(t){t=r(t)?t:[t];var e=this.invoke("send",t);return this.emit("send",t),e},y.stop=function(){this.invoke("stop"),this.emit("stop")},e=t,f&&m(e.prototype,f),l&&m(e,l),Object.defineProperty(e,"prototype",{writable:!1}),e}();function h(t){return Object.keys(t).map((function(e){return t[e]}))}function g(t,e){return Object.keys(e).forEach((function(r){var n=e[r];t[r]=n})),t}function w(t){return w="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},w(t)}function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function j(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===w(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _(t){return _="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},_(t)}function I(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,A(n.key),n)}}function A(t){var e=function(t,e){if("object"!==_(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===_(e)?e:String(e)}b.defaultOptions={autoStart:!0};var L=function(){function t(t){this.anys=t,this.$effects={}}var e,r,n,o=t.prototype;return o.start=function(){var t=this;if(this.options){var e=this.options(),r=Object.keys(e),n=this.anys.options;r.forEach((function(e){n[e]&&function(e){var r="register".concat(e.replace(e[0],e[0].toUpperCase()));if(t[r]){var n=t[r]();t.$effects[e]=n}}(e)}))}},o.stop=function(){var t=this;if(this.options){var e=this.options(),r=Object.keys(e),n=this.anys.options;r.forEach((function(e){var r=t.$effects[e];n[e]&&r&&r(),t.$effects[e]=null}))}},e=t,r&&I(e.prototype,r),n&&I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function k(t){return k="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},k(t)}function T(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,x(n.key),n)}}function x(t){var e=function(t,e){if("object"!==k(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===k(e)?e:String(e)}var D=function(){function t(t){this.anys=t}var e,r,n,i=t.prototype;return i.options=function(){return{namespace:new Error("options.namespace is required!")}},i.defines=function(){var t=this;return{client:function(){var e=t.anys.options.namespace,r="Anys.".concat(e,".clientId"),n=localStorage.getItem(r);return n||(n=o(8),localStorage.setItem(r,n)),n},trace:function(){var e=t.anys.options.namespace,r="Anys.".concat(e,".traceId"),n=sessionStorage.getItem(r);return n||(n=o(8),sessionStorage.setItem(r,n)),n}}},i.refreshTraceId=function(){var t=this.anys.options.namespace,e="Anys.".concat(t,".traceId"),r=o(8);sessionStorage.setItem(e,r)},e=t,r&&T(e.prototype,r),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement,r=t.nodeName,n=t.path;if(n)return n;if("BODY"===r||"HTML"===r||"HEAD"===r)return r;var o=[],i=t,u=t.parentNode,a=function(t){var e=t.nodeName,r=t.parentNode;return r?[].filter.call(r.childNodes,(function(t){return t.nodeName===e})).indexOf(t):-1};if("#"===r[0]){var c=a(t);o.push("".concat(r,":").concat(c)),u=(i=u).parentNode}for(;u&&i!==e;){var f=i.nodeName;if("BODY"===f||"HTML"===f||"HEAD"===f)o.push(f);else{var s=a(i);o.push("".concat(f.toLowerCase(),":").concat(s))}u=(i=u).parentNode}return o.reverse(),o.join("/")}function q(t){return q="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},q(t)}function M(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,B(n.key),n)}}function B(t){var e=function(t,e){if("object"!==q(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===q(e)?e:String(e)}function U(t,e){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},U(t,e)}var R=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{input:!0}},i.registerInput=function(){var t=this,e=function(e){return function(r){var n=r.target,o=r.type,i=r.inputType,u=r.data;if("insertCompositionText"!==i&&("compositionend"!==o||u)){var a=n.tagName,c=n.value;if(!n.getAttribute("data-ignore")){var f=n.getAttribute("type"),s=e({tagName:a,value:c,type:f,target:n});if(s){var l={type:"input",time:Date.now(),el:N(n),detail:s};t.anys.write(l)}}}}},r=e((function(t){var e=t.tagName,r=t.value,n=t.type;return"INPUT"===e&&"radio"!==n&&"checkbox"!==n&&"password"!==n?{value:r,type:n}:"INPUT"===e&&"password"===n?{value:"***",type:n}:"TEXTAREA"===e?{value:r,type:"textarea"}:void 0})),n=e((function(t){var e=t.tagName,r=t.value,n=t.type;return"SELECT"===e?{value:r,type:"select"}:"INPUT"!==e||"radio"!==n&&"checkbox"!==n?void 0:{value:r,type:n}})),o=e((function(t){var e=t.tagName,r=t.value,n=t.type;return"TEXTAREA"===e?{value:r,type:"textarea"}:"INPUT"===e?{value:r,type:n}:void 0}));return document.addEventListener("input",r,!0),document.addEventListener("compositionend",r,!0),document.addEventListener("change",n,!0),document.addEventListener("paste",o,!0),function(){document.removeEventListener("input",r),document.removeEventListener("compositionend",r),document.removeEventListener("change",n),document.removeEventListener("paste",o)}},r=e,n&&M(r.prototype,n),o&&M(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function C(t){return C="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},C(t)}function K(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$(n.key),n)}}function $(t){var e=function(t,e){if("object"!==C(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===C(e)?e:String(e)}function z(t,e){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},z(t,e)}var H=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&z(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{mouse:!("ontouchend"in document),click:!0,mousemove:!1,mousedown:!1,mouseup:!1,wheel:!1,contextmenu:!1}},i.addEventListener=function(t,e){if(this.anys.options.mouse){var r=this.createThrottleListener((function(e){var r=window,n=r.innerWidth,o=r.innerHeight,i=e.target,u=e.button,a=e.pageX,c=e.pageY;return{type:t,time:Date.now(),detail:{e:N(i),w:n,h:o,x:a,y:c,button:u}}}),e);return document.addEventListener(t,r,!0),function(){return document.removeEventListener(t,r)}}},i.registerClick=function(){return this.addEventListener("click")},i.registerMouseup=function(){return this.addEventListener("mouseup")},i.registerMousedown=function(){return this.addEventListener("mousedown")},i.registerContextmenu=function(){return this.addEventListener("contextmenu")},i.registerMousemove=function(){return this.addEventListener("mousemove",100)},i.registerWheel=function(){if(this.anys.options.mouse){var t="wheel",e=this.createThrottleListener((function(e){var r=e.target,n=e.deltaX,o=e.deltaY,i=e.deltaZ,u=e.deltaMode;return{type:t,time:Date.now(),detail:{e:N(r),deltaX:n,deltaY:o,deltaZ:i,mode:u}}}),100);return document.addEventListener(t,e),function(){return document.removeEventListener(t,e)}}},i.createThrottleListener=function(t,e){var r=this,n=0,o=0;return function(i){if(!n){var u=Date.now();if(!(e&&o+e>u)){var a=t(i);requestAnimationFrame((function(){r.anys.write(a),n=0,o=Date.now()})),n=1}}}},r=e,n&&K(r.prototype,n),o&&K(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function X(t){return X="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},X(t)}function Y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,W(n.key),n)}}function W(t){var e=function(t,e){if("object"!==X(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===X(e)?e:String(e)}function F(t,e){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},F(t,e)}var Z={type:"window_activity.enter",time:Date.now()},V=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{activity:!0,deadTimeout:0}},i.ready=function(){this.anys.options.activity&&this.anys.write(Z)},i.registerActivity=function(){var t=this,e=function(){if("hidden"===document.visibilityState){var e={type:"window_activity.focusout",time:Date.now()};t.anys.write(e)}else{var r={type:"window_activity.focusin",time:Date.now()};t.anys.write(r)}},r=function(){var e={type:"window_activity.unload",time:Date.now()};t.anys.write(e)};return window.addEventListener("beforeunload",r,!0),document.addEventListener("visibilitychange",e,!0),function(){window.removeEventListener("beforeunload",r),document.removeEventListener("visibilitychange",e)}},i.registerDeadTimeout=function(){var t=this,e=this.anys.options.deadTimeout;if(e){var r,n=function(){clearTimeout(r),r=setTimeout((function(){var e={type:"window_activity.dead",time:Date.now()};t.anys.write(e)}),e)};return document.addEventListener("keydown",n,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("touchstart",n,!0),document.addEventListener("touchmove",n,!0),document.addEventListener("mousemove",n,!0),document.addEventListener("scroll",n,!0),window.addEventListener("resize",n,!0),function(){document.removeEventListener("keydown",n),document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n),document.removeEventListener("touchmove",n),document.removeEventListener("mousemove",n),document.removeEventListener("scroll",n),window.removeEventListener("resize",n)}}},r=e,n&&Y(r.prototype,n),o&&Y(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function G(t){return G="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},G(t)}function J(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Q(n.key),n)}}function Q(t){var e=function(t,e){if("object"!==G(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===G(e)?e:String(e)}function tt(t,e){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tt(t,e)}var et=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tt(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{url:!0}},i.registerUrl=function(){var t=this,e=function(){t.recordUrl()};return window.addEventListener("hashchange",e),window.addEventListener("popstate",e),this.recordUrl(),function(){window.removeEventListener("hashchange",e),window.removeEventListener("popstate",e)}},i.recordUrl=function(){var t=window.location.href,e=new URL(t),r=e.pathname.replace(/^([^/])/,"/$1"),n={type:"url",time:Date.now(),url:t,detail:{uri:r+(e.search?"?".concat(e.search):""),path:r,protocol:e.protocol.replace(":",""),host:e.hostname,port:e.port,search:e.search,hash:e.hash.replace("#","")}};this.anys.write(n)},r=e,n&&J(r.prototype,n),o&&J(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function rt(t){return rt="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},rt(t)}function nt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ot(n.key),n)}}function ot(t){var e=function(t,e){if("object"!==rt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===rt(e)?e:String(e)}function it(t,e){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},it(t,e)}var ut=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&it(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){var t="ontouchend"in document;return{touch:t,touchstart:t,touchend:t,touchmove:t}},i.addEventListener=function(t){var e=this;if(this.anys.options.touch){var r=0,n=function(n){if(!r){var o=window,i=o.innerWidth,u=o.innerHeight,a=n.target,c=n.identifier,f=n.force,s=n.pageX,l=n.pageY,p={type:t,time:Date.now(),detail:{e:N(a),width:i,height:u,x:s,y:l,identifier:c,force:f}};requestAnimationFrame((function(){e.anys.write(p),r=0})),r=1}};return document.addEventListener(t,n,!0),function(){return document.removeEventListener(t,n)}}},i.registerTouchmove=function(){return this.addEventListener("touchmove")},i.registerTouchend=function(){return this.addEventListener("touchend")},i.registerTouchstart=function(){return this.addEventListener("touchstart")},r=e,n&&nt(r.prototype,n),o&&nt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function at(t){return at="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},at(t)}function ct(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ft(n.key),n)}}function ft(t){var e=function(t,e){if("object"!==at(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===at(e)?e:String(e)}var st=function(){function t(){this.queue=[],this.status=0}var e,r,n;return t.prototype.push=function(t){var e,r,n=this,o=new Promise((function(t,n){e=t,r=n})),i={runner:t,resolve:e,reject:r};this.queue.push(i);return this.status||function t(){setTimeout((function(){if(n.queue.length){var e=n.queue.shift(),r=e.runner,o=e.resolve,i=e.reject;r().then(o,i).finally(t)}else n.status=0}),0),n.status=1}(),o},e=t,r&&ct(e.prototype,r),n&&ct(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function lt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yt(t){return yt="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},yt(t)}function vt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dt(n.key),n)}}function mt(t,e,r){return e&&vt(t.prototype,e),r&&vt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function dt(t){var e=function(t,e){if("object"!==yt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===yt(e)?e:String(e)}var bt=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.name,r=t.version,n=void 0===r?1:r,o=t.stores,i=!e;e||(e="__indb__"),o&&Array.isArray(o)&&o.length||(o=[{name:"__indb__",isKv:!0}]),this.cache={},this.connection=null,this.name=e,this.version=n,this.stores=o;var u=indexedDB.open(e,n);if(u.onupgradeneeded=function(t){var e=t.target.result,r=Array.from(e.objectStoreNames),n=[];o.forEach((function(o){var i=null;if(r.indexOf(o.name)>-1)i=t.target.transaction.objectStore(o.name);else{var u=o.isKv?"key":o.primaryKeyPath,a=!o.isKv&&o.autoIncrement;i=e.createObjectStore(o.name,{keyPath:u,autoIncrement:a})}var c=i.indexNames;c&&c.length&&Array.from(c).forEach((function(t){return i.deleteIndex(t)})),o.indexes&&o.indexes.length&&o.indexes.forEach((function(t){i.createIndex(t.name,t.keyPath||t.name,{unique:t.unique,multiEntry:Array.isArray(t.keyPath)})})),n.push(o.name)})),r&&r.forEach((function(t){-1===n.indexOf(t)&&e.deleteObjectStore(t)}))},u.onblocked=function(t){console.error(wt(new Error("indexedDB "+e+" is blocked")))},i)return this.use(e)}var e=t.prototype;return e.connect=function(){var t=this;return new Promise((function(e,r){var n=indexedDB.open(t.name,t.version);n.onerror=function(t){r(wt(t))},n.onsuccess=function(t){e(t.target.result)}}))},e.use=function(t){var e=this.stores.find((function(e){return e.name===t}));if(!e)throw new Error("[InDB]: store ".concat(t," is not existing."));if(this.cache[t])return this.cache[t];var r=new ht({db:this,store:e});return e.isKv&&Object.defineProperties(r,{key:{value:function(t){return r.keys().then((function(e){return e&&e[t]}))}},getItem:{value:function(t){return r.get(t).then((function(t){return t&&t.value}))}},setItem:{value:function(t,e){return r.put({key:t,value:e})}},removeItem:{value:function(t){return r.delete(t)}}}),this.cache[t]=r,r},e.close=function(){return this.cache=null,this.stores=null,this.connect().then((function(t){t.close()}))},t.deleteDatabase=function(t){return new Promise((function(e,r){var n=indexedDB.deleteDatabase(t);n.onsuccess=function(){e()},n.onerror=function(t){r(t)}}))},t.databases=function(){return indexedDB.databases()},mt(t)}(),ht=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.store,r=t.db;if("object"!==yt(e)||!e.name||"string"!=typeof e.name)throw new Error("[InDBStore]: options.store should be a store config object.");if(!(r instanceof bt))throw new Error("[InDBStore]: options.db should be an instanceof InDB.");this.db=r,this.store=e,this.name=e.name,this.primaryKeyPath=e.isKv?"key":e.primaryKeyPath,this._queue=[]}var e=t.prototype;return e.transaction=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=function(){var r=t.name,n=e?"readwrite":"readonly",o=t.db.connection;return(o?Promise.resolve(o):t.db.connect()).then((function(e){t.db.connection=e;var o=e.transaction(r,n),i=function(){t.db.connection=null,t._queue.shift()};return o.oncomplete=i,o.onabort=i,o.onerror=i,o}))},n=this._queue[this._queue.length-1],o=n?n.then((function(){return r()})):r();return this._queue.push(o),o},e.objectStore=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.name;return this.transaction(t).then((function(t){return t.objectStore(e)}))},e.cursor=function(t){var e=t.index,r=t.range,n=t.direction,o=t.onTouch,i=t.onDone,u=t.onError,a=t.writable,c=void 0!==a&&a;return this.objectStore(c).then((function(t){var a=e?t.index(e):t,c=a.openCursor(r,n);c.onsuccess=function(t){var e=t.target.result;e?o(e,a):i(e,a)},c.onerror=function(t){u(wt(t))}}))},e.request=function(t){var e=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).writable,n=void 0!==r&&r;return new Promise((function(r,o){e.objectStore(n).then((function(e){var n=t(e);n.onsuccess=function(t){var e=t.target.result;r(e)},n.onerror=function(t){o(wt(t))}}))}))},e.iterate=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.index,o=r.range,i=r.writable,u=void 0!==i&&i,a=r.direction,c=void 0===a?"next":a;return new Promise((function(r,i){e.cursor({index:n,range:o,writable:u,direction:c,onTouch:function(e,n){t(e,(function(){return e.continue()}),(function(){n.transaction.commit(),r()}))},onDone:function(){r()},onError:function(t){i(t)}})}))},e.batch=function(t){var e=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).writable,n=void 0===r||r;return this.transaction(n).then((function(r){var n=e.name,o=[],i=r.objectStore(n);return t.forEach((function(t){var e=new Promise((function(e,r){var n=t(i);n.onsuccess=function(t){var r=t.target.result;e(r)},n.onerror=function(t){r(wt(t))}}));o.push(e)})),Promise.all(o)}))},e.get=function(t){if(!Array.isArray(t))return this.request((function(e){return e.get(t)}));var e=t.map((function(t){return function(e){return e.get(t)}}));return this.batch(e,{writable:!1})},e.keys=function(){var t=this.primaryKeyPath,e=[];return this.each((function(r){var n=gt(r,t);e.push(n)})).then((function(){return e}))},e.all=function(){var t=[];return this.each((function(e){t.push(e)})).then((function(){return t}))},e.count=function(){return this.request((function(t){return t.count()}))},e.each=function(t){return this.iterate((function(e,r){var n=e.value;t(n),r()}))},e.reverse=function(t){return this.iterate((function(e,r){var n=e.value;t(n),r()}),{direction:"prev"})},e.some=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(n,o){var i,u=[],a=0,c=r,f=r+e;r<0&&(i="prev",e=Math.min(e,-r),f=(c=-(r+e)||0)+e),t.iterate((function(t,e,r){a<c?(a++,e()):a<f?(u.push(t.value),a++,e()):r()}),{direction:i}).then((function(){r<0&&u.reverse(),n(u)})).catch(o)}))},e.first=function(){return this.some(1).then((function(t){return t[0]}))},e.last=function(){return this.some(1,-1).then((function(t){return t[0]}))},e.find=function(t,e){return this.request((function(r){return r.index(t).get(e)}))},e.query=function(t,e,r){var n=this,o=function(){switch(r){case">":return IDBKeyRange.lowerBound(e,!0);case">=":return IDBKeyRange.lowerBound(e);case"<":return IDBKeyRange.upperBound(e,!0);case"<=":return IDBKeyRange.upperBound(e);case"%":case"!=":case"in":return;default:return IDBKeyRange.only(e)}}(),i=[];return new Promise((function(u,a){n.cursor({index:t,range:o,onTouch:function(t,n){var o=t.value,u=gt(o,n.keyPath);"!="===r?u!==e&&i.push(o):"%"===r?"string"==typeof u&&u.indexOf(e)>-1&&i.push(o):"in"===r?Array.isArray(e)&&e.indexOf(u)>-1&&i.push(o):i.push(o),t.continue()},onDone:function(){u(i)},onError:function(t){a(t)}})}))},e.select=function(){var t=this.store.indexes||[],e={};t.forEach((function(t){var r=t.name,n=t.keyPath;e[r]=n}));for(var r=function(t,e,r){if(void 0===t)return!1;switch(r){case">":return t>e;case">=":return t>=e;case"<":return t<e;case"<=":return t<=e;case"!=":return t!==e;case"%":return"string"==typeof t&&t.indexOf(e)>-1;case"in":return Array.isArray(e)&&e.indexOf(t)>-1;default:return t===e}},n=function(t,e,n){if(!e.length&&!n.length)return!1;for(var o=0,i=e.length;o<i;o++){var u=e[o],a=u.keyPath,c=u.value,f=u.compare,s=gt(t,a);if(!r(s,c,f))return!1}if(!n.length)return!0;for(var l=0,p=n.length;l<p;l++){var y=n[l],v=y.keyPath,m=y.value,d=y.compare,b=gt(t,v);if(r(b,m,d))return!0}return!1},o=[],i=arguments.length,u=new Array(i),a=0;a<i;a++)u[a]=arguments[a];u.forEach((function(t){for(var r=[],n=[],i=0,u=t.length;i<u;i++){var a=t[i],c=a.key,f=a.value,s=a.compare,l=a.optional,p=e[c]||c;l?r.push({keyPath:p,value:f,compare:s}):n.push({keyPath:p,value:f,compare:s})}o.push([n,r])}));var c=[];return this.each((function(t){(function(t){for(var e=0,r=o.length;e<r;e++){var i=lt(o[e],2),u=i[0],a=i[1];if(n(t,u,a))return!0}return!1})(t)&&c.push(t)})).then((function(){return c}))},e.add=function(t,e){if(Array.isArray(t)){var r=t;if(r.length<2)return this.add(t[0],e);var n=r.map((function(t){return function(r){return r.add(t,e)}}));return this.batch(n)}return t?this.request((function(r){return r.add(t,e)}),{writable:!0}):Promise.resolve()},e.put=function(t,e){if(Array.isArray(t)){var r=t;if(r.length<2)return this.put(r[0],e);var n=r.map((function(t){return function(r){return r.put(t,e)}}));return this.batch(n)}return t?this.request((function(r){return r.put(t,e)}),{writable:!0}):Promise.resolve()},e.delete=function(t){if(Array.isArray(t)){var e=t;if(e.length<2)return this.delete(e[0]);var r=e.map((function(t){return function(e){return e.delete(t)}}));return this.batch(r)}return t?this.request((function(e){return e.delete(t)}),{writable:!0}):Promise.resolve()},e.remove=function(t){var e=this.primaryKeyPath;if(Array.isArray(t)){var r=t;if(r.length<2)return this.remove(r[0]);var n=r.map((function(t){var r=gt(t,e);return function(t){return t.delete(r)}}));return this.batch(n)}if(!t)return Promise.resolve();var o=gt(t,e);return o?this.delete(o):Promise.resolve()},e.clear=function(){return this.request((function(t){return t.clear()}),{writable:!0})},mt(t)}();function gt(t,e){if(null!=e){if(!Array.isArray(e)){var r=function(t){return t.toString().split(/\.|\[|\]/).filter((function(t){return!!t}))}(e);if(!r.length)return t;for(var n=t,o=0,i=r.length;o<i;o++){var u=r[o];if(void 0===n[u])return;n=n[u]}return n}for(var a=0,c=e.length;a<c;a++){var f=gt(t,e[a]);if(void 0!==f)return f}}}function wt(t){var e=t.message;return t.message=-1===e.indexOf("[IndexedDB]")?"[IndexedDB]: "+e:e,t}function Ot(t){return Ot="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},Ot(t)}function St(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jt(n.key),n)}}function jt(t){var e=function(t,e){if("object"!==Ot(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Ot(e)?e:String(e)}var Pt=function(){function t(t){this.anys=t,this.queue=new st}var e,r,n,o=t.prototype;return o.options=function(){return{namespace:new Error("options.namespace is required!"),autoReport:!1,expireTime:1728e5}},o.init=function(){var t="logs",e=new bt({name:this.anys.options.namespace,version:2,stores:[{name:t,primaryKeyPath:"_id",autoIncrement:!0}]});this.db=e.use(t)},o.ready=function(){var t=this,e=this.anys.options.expireTime;if(e)var r=0,n=setInterval((function(){t.queue.push((function(){return t.db.some(100,r)})).then((function(o){if(o.length){var i=Date.now(),u=[];o.forEach((function(t){var r=t._id,n=t.time;i-n>e&&u.push(r)})),u.length&&t.queue.push((function(){return t.db.delete(u)})),r+=100,r-=u.length}else clearInterval(n)}))}),1e4)},o.write=function(t){var e=this;this.queue.push((function(){return e.db.add(t)})).then((function(r){e.anys.emit("writeOfflineLog",{id:r,data:t})}))},o.read=function(t){if(t){if(!Array.isArray(t))return;if(t.some((function(t){return!t.key})))return}else t=[{key:"client",value:this.anys.clientId},{key:"trace",value:this.anys.traceId}];return this.select(t)},o.clear=function(t){var e=this;return this.queue.push((function(){return e.db.remove(t)})).catch((function(){}))},o.select=function(t){var e=this;return this.queue.push((function(){return e.db.select(t)}))},o.remove=function(t){var e=this;return this.queue.push((function(){return e.db.delete(t)})).catch((function(){}))},e=t,r&&St(e.prototype,r),n&&St(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}();function Et(t){return Et="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},Et(t)}function _t(t){return function(t){if(Array.isArray(t))return At(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||It(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(t,e){if(t){if("string"==typeof t)return At(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?At(t,e):void 0}}function At(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kt(n.key),n)}}function kt(t){var e=function(t,e){if("object"!==Et(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Et(e)?e:String(e)}function Tt(t,e){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tt(t,e)}var xt=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tt(t,e)}(e,t);var r,n,i,u=e.prototype;return u.init=function(){this.currentSnapshotId="",this.currentMutationId="",this.currentMutationNo=0},u.options=function(){return{mutation:!0}},u.registerMutation=function(){var t=this,e=this.createObserver((function(e){var r=o(8),n=t.currentMutationId,i=t.currentMutationNo+1,u=t.currentSnapshotId;t.currentMutationId=r,t.currentMutationNo=i;var a={type:"mutation",time:Date.now(),detail:e,snapshotId:u,numberOfSnapshot:i,mutationId:r,prevMutationId:n};t.anys.write(a)})),r=function(){t.recordSnapshot(),Dt(document.documentElement),e.observe(document,{characterData:!0,attributes:!0,childList:!0,subtree:!0})};return"complete"===document.readyState?r():window.addEventListener("load",r),function(){e.disconnect()}},u.recordSnapshot=function(){var t=function(){var t,e=document.doctype,r=e.name,n=e.publicId,o=e.systemId,i={name:r,publicId:n,systemId:o},u=Nt(document.documentElement.innerHTML),a={},c=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=It(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}(document.querySelector("html").attributes);try{for(c.s();!(t=c.n()).done;){var f=t.value,s=f.name,l=f.value;a[s]=l}}catch(t){c.e(t)}finally{c.f()}var p=(y=document.querySelectorAll("input, textarea, select"),v=[],Array.from(y).forEach((function(t){var e=N(t),r="password"===t.type?"***":t.value;v.push({el:e,value:r})})),v);var y,v;return{doctype:i,attrs:a,html:u,values:p}}(),e=o(8);this.currentSnapshotId=e,this.currentMutationNo=0;var r=window.location.href,n=new URL(r),i=n.pathname.replace(/^([^/])/,"/$1"),u={type:"snapshot",time:Date.now(),url:{uri:i+(n.search?"?".concat(n.search):""),path:i,protocol:n.protocol.replace(":",""),host:n.hostname,port:n.port,search:n.search,hash:n.hash.replace("#","")},detail:t,snapshotId:e};this.anys.write(u)},u.createObserver=function(t){var e=new MutationObserver((function(e){var r=[];_t(e).reverse().forEach((function(t){var e=t.type,n=t.target,o=t.attributeName,i=t.oldValue;if(!function(t){var e;if(null!==(e=t.hasAttribute)&&void 0!==e&&e.call(t,"data-ignore"))return!0;for(var r=t.parentNode;r;){var n,o;if(null!==(n=(o=r).hasAttribute)&&void 0!==n&&n.call(o,"data-ignore"))return!0;r=r.parentNode}return!1}(n)){if("attributes"===e){if(n.getAttribute(o)===i)return;if(r.find((function(t){return t.type===e&&t.target===n&&t.attributeName===o})))return}else if("characterData"===e){var u=n.data;if(u===i)return;if(r.find((function(t){return t.type===e&&t.target===n&&t.target.data===u})))return}r.push(t)}})),r.reverse();var n=[];r.forEach((function(t){var e=t.type,r=t.target,o=t.attributeName,i=t.oldValue,u=r.path||N(r),a=function(t){return N(t).replace(u+"/","")};if("attributes"===e){var c=r.getAttribute(o),f=i;n.push({type:"attribute",target:u,name:o,next:c,prev:f})}else if("characterData"===e){var s=r.data,l=i;n.push({type:"text",target:u,next:s,prev:l})}else if("childList"===e){if("TEXTAREA"===r.nodeName)return;var p=t.removedNodes,y=t.addedNodes,v=t.previousSibling,m=t.nextSibling,d=[],b=Array.from(p).map((function(t){if(!document.body.contains(t)){var e=t.path?a(t):null,r=v?N(v):null,n=m?N(m):null,o={};return e?o.node=e:(o.before=r,o.after=n),o}d.push({node:t,path:N(t)})})).filter(Boolean),h=[],g=Array.from(y).map((function(t){var e=t.nextSibling?a(t.nextSibling):null,r=d.find((function(e){return e.node===t}));if(!r){var n="#text"===t.nodeName,o="#comment"===t.nodeName,i=n?t.data:null,u=o?t.data:null;return{text:i,html:n||o?null:Nt(t.outerHTML),comment:u,sibling:e}}h.push({node:r.path,sibling:e})})).filter(Boolean);n.push({type:"children",target:u,remove:b,insert:g,move:h}),Dt(r)}})),t(n)}));return Dt(document),e},r=e,n&&Lt(r.prototype,n),i&&Lt(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function Dt(t){if(t!==document){var e=N(t);t.path=e}var r=t.childNodes;Array.from(r).forEach((function(t){Dt(t)}))}function Nt(t){return t.replace(/<script([^]*?)>([^]*?)<\/script>/gm,"<noscript$1></noscript>").replace(/<noscript([^]*?)>([^]*?)<\/noscript>/gm,"<noscript$1></noscript>").replace(/<link([^]*?)as="script"([^]*?)>/g,"<link$1$2>").replace(/\n\n*\s*\n*\n/gm,"\n")}function qt(t){return qt="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},qt(t)}function Mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bt(n.key),n)}}function Bt(t){var e=function(t,e){if("object"!==qt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===qt(e)?e:String(e)}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}var Rt=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ut(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{size:!0}},i.createRecordLog=function(){var t=window,e=t.innerWidth,r=t.innerHeight;return{type:"window_size",time:Date.now(),detail:{width:e,height:r}}},i.registerSize=function(){var t,e=this,r=function(){clearTimeout(t);var r=e.createRecordLog();t=setTimeout((function(){e.anys.write(r)}),100)};return this.recordSize(),window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}},i.recordSize=function(){var t=this.createRecordLog();this.anys.write(t)},r=e,n&&Mt(r.prototype,n),o&&Mt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function Ct(t){return Ct="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},Ct(t)}function Kt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$t(n.key),n)}}function $t(t){var e=function(t,e){if("object"!==Ct(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Ct(e)?e:String(e)}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}var Ht=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zt(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){return{scroll:!0}},i.registerScroll=function(){var t=this,e=0,r=function(r){if(!e){var n,o=r.target;if(r.bubbles){var i=window,u=i.scrollX,a=i.scrollY;n={type:"window_scroll",time:Date.now(),detail:{scrollX:u,scrollY:a}}}else{var c=o.scrollLeft,f=o.scrollTop;n={type:"scroll",time:Date.now(),target:N(o),detail:{scrollLeft:c,scrollTop:f}}}requestAnimationFrame((function(){t.anys.write(n),e=0})),e=1}};return window.addEventListener("scroll",r,!0),function(){window.removeEventListener("scroll",r)}},r=e,n&&Kt(r.prototype,n),o&&Kt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function Xt(t){return Xt="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},Xt(t)}var Yt=["_id"];function Wt(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Zt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gt(n.key),n)}}function Gt(t){var e=function(t,e){if("object"!==Xt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Xt(e)?e:String(e)}function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}var Qt=function(t){function e(e,r){var n,o=Ft(r,4),i=o[0],u=o[1],a=o[2],c=o[3];return(n=t.call(this,e)||this).offlineStore=i,n.urlMonitor=u,n.windowSizeMonitor=a,n.DOMMutationMonitor=c,n.cache={},n}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)}(e,t);var r,n,o,i=e.prototype;return i.options=function(){var t="ontouchend"in document;return{touch:t,mouse:!t,click:!1,mousedown:!0,mousemove:!0,mouseup:!0,autoReport:!1,reportUrl:new Error("options.reportUrl is required!"),reportInterval:1e4,reportParams:null}},i.registerAutoReport=function(){var t=this,e=this.anys.clientId,r=function(r){var n=r.prev;t.anys.report([{key:"client",value:e},{key:"trace",value:n}]),t.cache={},t.urlMonitor.recordUrl(),t.windowSizeMonitor.recordSize(),t.DOMMutationMonitor.recordSnapshot()};this.anys.on("refreshTraceId",r);var n=setInterval((function(){t.anys.report()}),this.anys.options.reportInterval),o=0,i=function(){if(!o){o=1;var e=Object.keys(t.cache),r={data:Object.values(t.cache),by:"beacon"};e.length&&(t.offlineStore.remove(e),navigator.sendBeacon(t.anys.options.reportUrl,JSON.stringify(r)),t.cache={})}};window.addEventListener("beforeunload",i),window.addEventListener("pagehide",i),window.addEventListener("unload",i);var u=function(e){var r=e.id,n=e.data;t.cache[r]=n};return this.anys.on("writeOfflineLog",u),function(){t.anys.off("refreshTraceId",r),t.anys.off("writeOfflineLog",u),clearInterval(n),window.removeEventListener("beforeunload",i)}},i.read=function(t){return this.offlineStore.read(t)},i.arrange=function(t){var e=[],r=0;return t.forEach((function(t){e[r]=e[r]||[],e[r].push(t),e[r].length>200&&r++})),e},i.send=function(t){var e=this,r=[],n=[];if(t.forEach((function(t){var e=t._id,o=Wt(t,Yt);n.push(e),r.push(o)})),r.length){var o=this.anys.options,i=o.reportUrl,u=o.reportParams,a=u?function(t,e){var r=function(t){return encodeURIComponent(t)};if(t.indexOf("?")<0){var n=Object.keys(e).map((function(t){return"".concat(t,"=").concat(r(e[t]))})).join("&"),o=P(t.split("#"),2),i=o[0],u=o[1];return i+"?"+n+(u?"#"+u:"")}var a=P(t.split("?"),2),c=a[0],f=P(a[1].split("#"),2),s=f[0],l=f[1],p=s.split("&").map((function(t){return t.split("=").reduce((function(t,e,r){return r?(t[1]=t[1]||"",t[1]+=e):t[0]=e,t}),[])})).reduce((function(t,e){var r=P(e,2),n=r[0],o=r[1];return S(S({},t),{},j({},n,o))}),{});return Object.assign(p,e),c+"?"+Object.keys(p).map((function(t){return"".concat(t,"=").concat(r(p[t]))})).join("&")+(l?"#"+l:"")}(i,u):i;return function(t,e){return new Promise((function(r,n){var o=new(window.__XMLHttpRequest||window.XMLHttpRequest);o.open("POST",t,!0),o.onreadystatechange=function(){4==o.readyState&&(200==o.status?r(o.responseText):n(new Error("ajax post fail with status ".concat(o.status))))},o.onerror=n,o.send(JSON.stringify(e))}))}(a,{data:r}).then((function(){n.forEach((function(t){delete e.cache[t]}))}))}},i.clear=function(){this.cache={}},r=e,n&&Vt(r.prototype,n),o&&Vt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(L);function te(t){return te="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},te(t)}function ee(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ee(Object(r),!0).forEach((function(e){ne(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ne(t,e,r){return(e=ie(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ie(n.key),n)}}function ie(t){var e=function(t,e){if("object"!==te(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===te(e)?e:String(e)}function ue(t,e){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ue(t,e)}Qt.dependencies=[Pt,et,Rt,xt,D,R,H,V,ut,Ht];var ae=function(t){function e(){return t.apply(this,arguments)||this}var r,n,o;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)}(e,t),e.prototype.auth=function(t){this.options.reportParams=Object.assign(this.options.reportParams||{},t)},r=e,n&&oe(r.prototype,n),o&&oe(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(b),ce=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ae(re(re({namespace:"AnysTracer"},t),{},{plugins:re(re({},t.plugins||{}),{},{tracer:Qt})}))}}();var r=anys="undefined"==typeof anys?{}:anys;for(var n in e)r[n]=e[n];e.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})}();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|